GyroVorbis wrote:Hey, Trufun. I'm curious how you implemented the snake and mole's logic. Is that through Lua? We are taking very similar scripting approaches, so I'm always interested in seeing how you are handling things.
I haven't tackled *true* AI yet, so right now the enemies are dumb, and everything is handled in the engine. When I get to the real AI I'll put it in Lua.
But...I have a concept of a spawn area. In a spawn area you can specify the type of enemy, min / max # of enemies, and the radius that they spawn within.
I did this to give the game a more organic feel, where the enemies are a little different each time. But I still have the ability to drop a single enemy into the game.
Anyways, when an enemy spawns, I dynamically generate 3 to 5 waypoints within a given radius. The enemies then just walk to each waypoint in a loop. Like I said, they dumb.
I plan on keeping the waypoints for their normal movement, but when they see the player, the AI will kick in. That's the plan anyway.