Thursday 23 September 2010

Terrastrom v1.0.2


I've successfully added my first non-drawn object: Mushrooms. 10,000 of them! They come in shades of blue, green, yellow, white, black and red. I decided to get them to display a mini picture of themselves on the right hand side when stood on. When I implement the inventory it would be nice for everything to have an image, and this way I can have lots of stuff on each square without the map looking cluttered. They are all instances of the same class (Mushroom), but there's some nifty code that allows the world generator to simply enter a colour and x,y co-ords when creating a mushroom, and the constructor does the rest. I tried switching "Drawn" to true in the mushroom class, just for a laugh. This was the result:



I think having non-drawn objects was a good idea.

I also implemented the ability to pause the game. It doesn't sound like much, but it made me build code for control schemes. Now, when the game is running, the control scheme is "player movement controls". When you press Space, it swaps to "paused controls", and the game doesn't run the logic loop until Space is pressed again.

I realised I need to sit down and decide how the game is actually going to play. I want two things. One, to be able to have time flow and watch the game progress around you, as it does now (although I don't know that deer randomly running around in circles is the "progression" I have in mind ultimately). Second, I want rogue-like control over how battles will be fought, and characters are interacted with (i.e. turn based). I am contemplating a game-style which allows both, perhaps a toggle. Maybe like in Dwarf Fortress, when you're attacked it will automatically enter the turn-based mode. When in "rogue-like" mode, the game will pause when the player can move or perform an action. When the player does something, the game will resume, and a timer will run. While the timer is running, the game will play as normal, with animals moving and enemies attacking. When the timer expires, it's the player's turn to move again and the rest of the game pauses. It will appear to work like a rogue-like in that this timer will be very quick, so the game will appear to be running in steps. But it will allow the game to work just like it does when in "continuous" mode, where the game runs even when the player can move. I think I need a few more walks to work to make up my mind about whether this is a good idea or not.

Also - I removed the link for download temporarily. I need to come up with a better way of distributing the game; zipping and uploading the game every day is faffy.  I got my flat mate to download the .zip and it wouldn't run on his machine. I guess the XNA framework isn't built into Windows, making this a horribly unattractive way to provide my game.

Maybe I should bite the bullet and give Silverlight another go, as most of my code will move across once I've figured out graphics.

No comments:

Post a Comment