'Ello again, all.
I'm experiencing quite a bit of slowdown in a project of mine with what I think primarily involves the AI code and Fastloops in an RTS-style game running at 50 FPS. After about fifteen or so enemies on screen/ in the frame at once, the game starts slowing down, and if there's too many enemies, it downright crawls. What I'm looking for is advice on how to optimize my code better to try to prevent possible unnecessary Fastloops. Running it in HWA/ Direct 3D9 speeds it up a tiny bit for me, but I want the game to be able to run with unnoticeable performance issues even on the Standard display mode.
I'm wondering if there's a way to select individual objects and the objects they're grouped with (like shadows or detectors or bullets) without using Fastloops, and also while keeping MMF2 from picking every instance of the object and having it act like only one of them. A lot of the AI uses distance floaters grabbed from the Advanced Direction Object and stores them as Alterable values as well, so a lot of objects have individual values for how far away something is from them, then constantly search to grab those Fixed values from them. Is there another, less resource-dependant way to do this?
It makes me wonder how larger 2D RTS games, like Starcraft, can handle so many units. But then, Starcraft also runs at 24 FPS normally...