As promised, the Whirlygigs are slightly more “map aware” and will avoid picking a target spot which will cause them to fall off an edge. I tried using raycasting from the physics engine but I had a few issues with my use of it, so I’ve adopted a simple grid-based detection system by looking at the map data itself. Not as neat a solution, and it can miss some things (obstacles), but it works for now. I’m having trouble with Hypercam2 at the moment, so you’ll have to trust me that it works without a video. 🙂
There is room for improvement in enemy awareness, of course. Sometime in the future I will look into making the enemies know when they are heading for an edge and try to avoid it.
Something else added is a zone awareness, where if the player is X distance away from the enemy, it will wake up and become active.Â If the player gets further away the enemy will go back to “sleep” at certain times.Â The necessity of this intial sleep state is when a player puts enemies on a level, if they are across the level from the start position and the enemies can move around before the player gets to them, they will be all out of place and not where they should be.Â This could ruin a level’s difficulty or predictability.Â It’s an obvious thing to code for, but still took some time to implement.
I’m going to take a break from coding and spruce up the coin graphics and visual properties in the game. Then I will try to touch up the Classic View (camera) so it works better with no Z-fighting and uses a proper backdrop.Â After those minor touch-upsÂ it is on to the editor additions I have been planning since I finished gems and coins. This includes a small overhaul of how “specials” are handled. Right now they are all 1×1, but I think it would be much better if I could make them larger, and treat them like Widgets are treated. This is a pretty big change, as I will be breaking something I just got working a few months back, but it is worth it in the end!