Whilst working on our new game (do you remember, many moons ago, we had a game called Monster Mash? Well, it’s still under development, and edging closer to being fun), I cut ‘n’ pasted the A* pathfinding algorithm from the multicore brains in Droid Assault into it. The A* algorithm is used in two places in the new game: in the first instance, to ensure that your bases are accessible by at least one enemy spawn point; and in the second instance, so that the gidrahs will trundle towards the base.
The map in the new game – OK, let’s call it Monster Mash even though it’s not called Monster Mash any more – is randomly generated every level. It’s a pretty trivial random generation, which simply involves starting with a map of solid rock, and then carving holes out of it between the bases and spawn points, plus a few other random holes. The end result is pretty nice, with results ranging from about 50% rock to 90% empty. Then we plonk down up to 10 bases which you have to defend (+1 base every 10 levels) – if any one base gets destroyed you lose. And then we plonk gidrah spawn points around the edge of the map, and a few in the middle on the later levels.
Before it approves the map, the generator checks to ensure that every base is accessible to at least one spawn point. We do this by just plotting the path between them using the A* algorithm pinched from Droid Assault.
It didn’t work.
I removed some more of my remaining hair in a violent thrashy motion for a couple of hours.
“How could this be? It’s been working fine in Droid Assault for a year!” I ranted.
Except, of course, it hadn’t. It had been broken all along. All those lovely multicore droids you’d been capturing, hoping they were worth the extra points just because they had the best brains, never worked properly. It’s a miracle they ever managed to find any enemies. In fact it’s only because they have a backup brain that switches to direct attack when enemies are in direct line-of-sight that they ever got around to attacking anything.
So: it’s fixed. And while I was at it, I changed the way flamethrowers inflict damage – it’s more immediate, and the burn time is much shorter. And slowed the wear rate of droids down a little bit so you can keep them a bit longer. Enjoy the new version! Grab version 1.6 directly from Puppygames.
Chaz is going to do a bit of work on the graphics for Monster Mash over the next week or so, and as soon as it’s worth showing everyone, we’ll pop up a screenshot.