TD – an entire day of programming is good for the soul!

Programmed from 10 in the morning to about 11 in the evening (with a couple of hours lunch and dinner pauses).

When everything “works as intended” it is really hard to stop, so things I got done today:
* State-transitions
* Tower placement (an ugly way, but it works!)
* Projectile shooting

Things to do tomorrow:
* Collision between projectiles and enemies
* Esc-menu with Resume, Quit to Main Menu and Quit to Windows.´

States: Got Start-menu, Main game and an Exit-screen, which plays when the player quits the game.
Towers: As it is now, and it seems to work, is that the entire map is made up of TileObjects. Those tiles have a type-property which is a symbol, ‘1’, ‘2’, ‘3’ … ‘a’, ‘b’, ‘c’ …. It also has a Boolean that says if it is possible to place a new tower there. So, all the tiles that one can place a tower on are set to true at the start. Then when a tower is places somewhere this Boolean is set to false so no other tower can be placed there.
Projectiles: When an enemy within a towers range, a projectile is spawned and fired towards the enemy’s current position. The projectile is shown as a 10×10 dark rectangle, I don’t know if we will do anything more advanced or if we leave it as it is.
Collisions: I need to check for collision between the projectiles and the enemies.
Esc-menu: Pause and fade the game a bit while displaying a menu with the options: Resume, Exit to Menu and Exit to Windows.

Will be a “long” day of programming tomorrow too :-D