Since my last update I’ve started work on the Zombie Survival game. I’ve changed the ‘block world’ premise some. You won’t be able to dig into the terrain but you can get resources like wood/stone, craft items and objects, and build a defensive structure. As of right now I have the movement system in place, the day/night cycle, growing crops, placing / digging farm tiles to grow crops on, basic damage system (only code for melee weapons).
The tile placement system is pretty neat. I cast a small ray from each corner of the tile model and check to see the difference in elevation at each corner. If there’s a large difference (like half the model was on a cliff, the other half open air) it turns red and you can’t build there. One of the biggest differences in my code (between this game and my previous X-Com inspired game) is the use of dynamic variables. In the previous game, for example, I had a show inventory function for each type of item (weapon, ammo, consumable). In this game, any time I’ve run into a similar problem I’ve been able to use dynamic variables with typecasting and inheritance to reduce the amount of code I need.
Here are some screenshots; they don’t really show much at all but I want to add them so I can hopefully look back on them at far how the game has progressed.
Obviously the graphics are all placeholders and mainly just primitive geometric shapes with a color applied to them.