Hi everyone! I've being having a little problem with the in-built RTS behavior in CC now for... er... I think it's been about a year now? <img src="smileys/smiley5.gif" border="0" align="middle" />
Anyways, I've got this little top down game set in a zombie apocalypse. It's open world, and has a relatively large game world, so I knew I'd be pushing things a bit (plus I've probably done some stuff inefficiently). The AI NPCs, which consist of two objects (legs with RTS behavior, body for targetting/shooting), seem to have probems with the buildings.
Here's a screenshot of a section of the game world:
<img src="http://i47.tinypic.com/b9gcia.png" border="0" />
The only solid world object is the walls, which are 3D cubes placed in a grid. Each cube is 60x60, while each building is 9 cubes long. Each building has a two cube wide doorway. The AI (zombies) moves to a random spot every 10 seconds or so when it doesn't detect the player, while when it does detect the player it moves towards him/her.
When the player enters a building though, and the AI has the player detected, the FPS drops like a stone to about 10 FPS or so. Also, when there is more than about 10 zombies on map at a time, the game just drops to 1 FPS from the beginning of the game. The RTS behavior is set to a cell size of 60x60, any higher an it moves odd and haves difficulty navigating.
Is it just because the AI hates moving into confined areas with small entrances, or just because Construct's RTS behavior isn't designed to be used like this?