I just did a bit of QA in debug mode, and I thought the results were pretty interesting. It seems that the #1 reason that I could find for game speed dropping below 1.0 without it being set there was construction swarms of planes.
It didn't seem to matter whether they were building or not, but when they got into "behive mode" where they were all hovering in a big sphere, thats when the game speed started dropping. I'm wondering if there is some sort of special case optimization that can be done to handle this instance? Perhaps the default behavour of construction aircraft can be changed so that they get locked up and move as one cohesive whole, or maybe a special "group unit" can be auto created / modified / destroyed as needed?
Actually, without getting too sidetracked from the original point, "group units" would allow for a Supreme Commander type game: vastly increasing the scale of war that Spring could handle.
Game Speed
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Sure it's the nanolathe? I suppose there ARE a lot of particles, but I'd have thought my computer could handle those. I was thinking it might be more to do with the pathfinding. All those planes constantly bumping into each other... A hits B hits C hits D hits B hits A hits C hits B hits D, times the number of planes you've got circling over the project.
Anyway, what's the method to improve it?
Anyway, what's the method to improve it?
I dont think it is collision detection. At least, if it is collision detection, then debug mode is lying about it. Collisions did not take the majority of cpu time. The highest amount was in "Sim Time" followed closely by "Unit Handler".
It is also not the nanolathe. I observed the same behavour whether the planes were building or not (I specifically did not turn on .nocost so that they would have to build).
I think the swarms are definately consuming cpu time with O(n^2) or something on that order though, because if I divide them in half, then they take less cpu and the game speeds up. Perhaps it really is collision detection and the debugger is not separating that out properly?
It is also not the nanolathe. I observed the same behavour whether the planes were building or not (I specifically did not turn on .nocost so that they would have to build).
I think the swarms are definately consuming cpu time with O(n^2) or something on that order though, because if I divide them in half, then they take less cpu and the game speeds up. Perhaps it really is collision detection and the debugger is not separating that out properly?
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31