One of the things going through my mind lately was how to properly handle the over->under problem with the AI waypoints.
I don't need to support navigating over-under, but I do need to automatically place the waypoints such that two points with
the same x & z coords, one possibly on a statue's arm that would be walkable, and one on the floor beneath.
What I'm doing now is to sample each 1x1 meter section of the level, and if I find walkable triangles there, I set the
grid location to walkable. I ignore duplicates, so whichever one comes first wins. I thought about breaking ties with height,
but this doesn't work b/c for a bridge the high bridge part wins over the pool bottom, and for a statue, the low floor wins.
Another thing I have been thinking about is, once I have the grid, how to sweep a capsule through the level to verify walkability.
Here is a shot of an enemy getting stuck on the side of the pool b/c he thinks he can get up there by walking :
Yesterday I realized I can handle both problems much more simply if I reverse the tasks, and use the capsule to find the walkable
areas in the first place.
I will simply start the capsule at the player's start position in the level, force it down until it hits something, and make this the first walkable grid area. Then just push the capsule n,s,e & w and see if it successfully navigates where it was trying to go. Also I will make sure it doesn't fall too far, etc. For each successful navigation, mark that grid as walkable, and continue.
Eventually, all walkable areas on the level will be explored. This should handle ramps, short drops, pits and walls equally well. This also will make the tops of walls unwalkable, unless the player can literally get up there.
Another task for this afternoon is to further flesh out the enemy AI, so it can have some brains for hunting down the player without being omniscient.
Here is a shot of me hiding in a stream, while the AI appears to be looking for me.