I’ve made the decision to write a teeny game project to learn my way around object oriented programming in BlitzMax a little; that’s something a departure for me, as someone used to dealing with their own objects (fnarr, fnarr) the idea of allowing the language to deal with things feels more than a little… well, strange really. Still, it’s about time I at least started to understand how OOP works.
So what I have so far (yes, at 3am so it’s surprising that any of the code makes sense!) is a keyboard- or joypad-controlled player sprite which in turn can spawn bullet sprites at the stab of a fire button. For the moment at least, another button on the controller spawns attackers that drift down the screen in order to check that the spawning routine works correctly and the collisions are doing what they’re told; right now there’s what feels like a horrific kludge to decommission a bullet after it’s killed a nasty – it’s set out of bounds vertically and the housekeeping is left to catch and remove it on the next iteration… there must be a better way to deal with removing an item from the list!!
