I was hoping one of you guys could help me out on this.
I'm working on a game and I wanted the enemies to have the ability to walk on backdrops, turn around when they hit a wall, and also turn around when they reach an edge of a platform, all that good stuff.
I followed that example and gave my enemy's a behavior that was pretty similar for moving. At first I tried doing fast loops but it seems it wouldn't work when I had more than 1 enemy on the screen. So instead of fast loops, I did the method in that tutorial and just duplicated events.
With 1 enemy in the frame I thought it was working pretty well, and it was doing everything I wanted it to. But I soon realized that putting a lot of enemies on the screen resulted in a severe framerate drop. When the object count reaches about 60, the game begins to slow down and then just goes to a crawl around 70 objects.
I'm pretty sure its because of the enemy behaviors that have the duplicated events.
My question for you is.... is there any way to make an intelligent platform enemy without using detectors, and not slow the game down to a crawl?
Converted an old MMF movement to MMF2, I don't if it's any faster than your current though...
http://rapidshare.de/files/25290014/ai.mfa.html
I don't use behaivors in this engine since i never really liked them...
I guess that the performance hit wasnt actually from the enemies with fake fast loops, but the vast amount of backdrop objects I had in the frame. Replacing them with large quick backdrops solved the problem.
I didnt think backdrop objects put that much strain on runtime but I guess I was wrong. o_o