Game Speed

Game Speed

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
10053r
Posts: 297
Joined: 28 Feb 2005, 19:19

Game Speed

Post by 10053r »

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.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Intresting, is this only the construction plane that does this? Or do other planes do this as well? If this is true, then if we optimize the con plane, we could reduce lag alot. What mod is this in? XTA or AA or what?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Try EE, no con planes for specifically that reason. :lol:

But yes, con plane massing is extremely annoying.
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post by HAARP »

It's the nanolathe.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Yes. And that will be fixable, if modders wish to fix it, with several different methods in the next version of Spring.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ah, you've gotta have a reason to look through NanoBlobs, hehe ;)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Collision detection is the bottleneck when many units are close to each other, because many units are in the same quad and certain parts of the collision detection are O(n^2) in the number of units per quad.

A true quadtree could reduce this to O(n log n).
10053r
Posts: 297
Joined: 28 Feb 2005, 19:19

Post by 10053r »

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?
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Post by bobthedinosaur »

Argh wrote:Yes. And that will be fixable, if modders wish to fix it, with several different methods in the next version of Spring.
such as?
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

i think he is referencing AF's tags that allow u to remove nanospray and the wireframes. That patch also allows teamcolor to be applied to nano spray or have the modder set a specific nano spray color for the... race?
Post Reply

Return to “Engine”