Better Wave-Spawning and Incremental Debris

Yesterday, I worked on the wave system and thoroughly broke it. I was trying to use the Muffel package as a clean way to add arbitrary execution pauses in my array of functions, but within the functions themselves, it didn’t seem to work. Disappointing, and the wave system was broken through the evening.

This evening, I retooled it, having the functions take the spawner as an argument (so they could ask it to stop or restart spawning, etc.), and optionally return a number that would tell the spawner how long to wait before force-running the next wave (via the old Alarm system). I added a parallel wave counter as a public face (since I don’t want the player to see waves increment during “wave steps”), and it all works very nicely.

I built a function to change the background sprite so that I could ramp up the colours, moving towards the big boss. The effect is fun, but I might object-ize it so I can have the transitions fade, rather than pop, for a more polished look.

Finally, I added the incremental damage debris casting, which turned out to be about 30 seconds of work, a couple lines of code, and looks GREAT. I’m delighted.

Maybe shields next…