Predator Explosion
No screenshot, but I’ve got the basic movement and predator/prey dynamic set up now in Version 0.3 of Invasive. (Available here)
Decided to stick with the name Glompers for the invasive species, and Kiwis for the endangered species. Starting with 5 Glompers, the Kiwis all get eaten in about a minute.
So far I’m not doing any real pathfinding at all… The kiwis are choosing a direction randomly each frame (and getting stuck in the SE corners of each island for some reason I haven’t figured out yet), and the Glompers move in one direction until they hit an edge, at which point they change direction. I may change the Kiwis to have the same movement schema as the Glompers…
I think I’m going to need something which the Kiwis can run into that makes them spawn. That can be a player placeable object in addition to the not-yet-implemented traps and walls. Otherwise I think the game will be over before the player has a chance to do anything.
On the plus side, my engine seems to be handling a couple thousand kiwis pretty well! Rather than using Gilbert’s collision detection, I added a map-sized blank bitmap to my Fauna class (which holds all the animals). Since I don’t actually add that bitmap to the stage at any time, it doesn’t seem to be dragging down my rendering performance very much. When the kiwis move, they plot their location on that map as a single pixel, and when the glompers move, they check to see if they’re on a pixel that has the kiwi color. The glompers thus only have to check the entire kiwi list if they’re definately in collision with at least one kiwi. This can probably be optimized further, but it seems good enough for now.
-TF
Neat. I named my project Envasive temporarily, but that’s way too close to your name… OOPS!