Procrastination is a hell of a thing. Although I’ve spent periods of the last year trying to learn Unity and C#, much more was spent on Reddit. A few weeks ago, however, I managed to kick myself out of that cycle and start work on my first game. The game in question is essentially a bit like Defender (of old arcade fame) but with inspirations from other sources – one in particular from the 80s on the wonderful C64 called Falcon Patrol.
To add a modern twist I’ll be using 3D graphics viewed from an orthographic perspective, and instead of pre-built levels I’ve opted for procedurally generated maps. This will hopefully keep the game fresh with each new play and help it feel more contemporary.
To begin I started with the map creation. I generated a basic layout in a two-dimensional array (water along the edge, sand inside, then grass and a seeded random amount of trees placed on the grass). After that I went back over the map adding towns, bases and roads (all using the seeded random). I had to ensure the roads linked at each end because, like the inspirations this game is based on, I want it to continually loop. To visualize what the level looked like I wrote the array to the console. As seen below:
- 0 Ocean and towns if in the middle of the map
- 1 Grass
- 2 Trees
- 3 Farm
- 4 Road
- Plus a few others
Next step will be to instantiate prefabs (basic blocks to start with) using the generated array and see how it all fits together.
Credit to Sebastian Lague with this youtube video for getting me started with the procedural generation. Cheers. J