Tutorial Over: Going Off-Book!

On completing the tutorial, I now start adding features and a framework for building out more of the game according to some features I’ve been kicking around.

This was a major turning point for the game, as I’d completed Shaun Spalding’s Asteroids tutorial and any new features and design directions would be wholly my own.

The shield system I described here went down in one hit, basically giving the player two collisions per life. I’d go on to use a more sophisticated regenerative shield approach much later, when I created shooting enemies and I wanted multiple hits to be survivable.

This is also where I first started thinking about adding “powerup” entities. The inventory system didn’t exist yet (of course), but player stats for physics were now part of a more organized object, as was the “base stats”, so I could revert to base stats whenever a player died, taking away any gains.

Finished the tutorial videos, implementing a lives system and then did a significant overhaul of the player object to abstract functions and universalize/parameterize spawn-in. I also implemented a shield system, and a broader player stat system that allows fine-grained control over aspects of the player’s physics (and as a result, opens up the possibility of introducing powerups). On death, the player reverts to base stats (powerups will be lost).