About a year ago I found myself with a couple of weeks worth of evenings free, so I decided to sit down and have a crack at making a game. Not because I had an amazing idea for a story or some mechanics, just to see if I could. A few hours a night for two weeks was enough to make some decent progress on the skeleton of the game, and one day I hope to go back and finish it off, at least to the point where my initial plans are all implemented.
This is the first in a series of posts describing the game (working-and-definitely-not-final title: Extraction), what I’ve done so far, and where I plan to go next, with a focus on the parts I personally found most interesting.
This is the intro screen. All the graphics, IO, everything is done with the built-in C# graphics functions. The graphics are intentionally lo-fi (I have neither the time nor the talent for anything else…) and there’s no 3D or DirectX. Not featured in the screenshot is the complete lack of audio too.
Yes, that background is Perlin Noise. It forms the basis of the map generation, which will be the subject of another post in this series – most likely the next one, since it’s the bedrock everything else is built on. In short though, the code for the noise generator is a stripped down version of the sample from the tutorial Herman Tulleken posted to Dev.Mag.
[Note: As Herman notes, this isn’t actually Perlin noise. But close enough for my needs.]
Gameplay
The core mechanic is a terrain map (generated using the same process as the background to the intro screen) populated with civilians and a small number of zombies. Oh? I didn’t mention? I thought the world could do with another zombie game. The main reason behind that is the AI – I wanted the game to be about the behaviour of the survivors and the zombies, with the player trying to extract as many survivors as possible until there are only zombies left.
Each map is has randomly generated terrain, randomly placed civilians and randomly selected zombies. The player chooses to land their rescue craft at any open area. Civilians who can see the craft run for it. The player can also place beacons in a chain extending from the craft, and civilians can follow this chain back to safety. Zombies, obviously, give chase. The landing craft has some minor, close range defences and a fairly sturdy hull, but can easily be overrun.
The green square at the bottom middle is the rescue craft, the yellow squares linked out from it are the beacons. Orange dots are civilians, red dots are zombies. Green dots are civilians following the chain to safety.
You can also see the button to fire the cannon. This is your only active weapon as a player, and the slow rate of fire and flight time skew it heavily towards terrain clearing and path-making, though it can be effective against grouped zombies.
You can also relocate the landing craft if the area is getting too dangerous, or there is a better rescue spot elsewhere. Again, this takes time and leaves you vulnerable.
And that’s it. That’s the mechanics in a nutshell. The fun (for me) is in the AI, the fun for the player is in getting as many civilians out as possible to boost their score and earn money for the research lab. The lab is next on the todo list, and will let the player upgrade all manner of things – better defence, a better cannon, more beacons, faster relocation time, shorter reloads and a few monstrously expensive one-shot awesomes.
The other plan is to have a difficulty scale, so even though each map is random there is a sense of progression. Combined with bonuses for map-specific achievements (number of kills, some “special” civilians, etc) and even new map types, it should make for a reasonably engaging game.
Better games appear on app stores and download services every day, but I’m not making this for anyone else. I’m having fun with procedural generation, emergent behaviour and AI, and just happen to be doing so in game form.
Next up: either map generation or AI, whatever takes my fancy.
Musical bonus: although it probably won’t feature in my soundtrack series this post was written to the soothing tones of the Endless Space soundtrack: