If you have too many units running around on a map, it gets laggy as all hell. I understand why but would like to test a theory about removing the lag from units altogether. However, I would hate to waste my time so I am just going to ask if anyone has a clue about this.
I know back in the days of SC1/Broodwar you could run into the same issue but the "limitations" for SC2 vs SC1 (as far as unit limits and how it effects lag), is vastly in favor of SC1. Take a map like starship troopers for example, in SC1 it felt more like you were being swarmed because if looked like there were more units. It's like, SC2 has a unit cap of 500 units before it gets laggy, but SC1 had a cap of like 800+.
If, instead of 3d models, you used 2d sprites as units, would it get rid of the lag? Or at least make it where you could have more units on the map? I've got an idea about putting all the SC1/Broodwar units (as sprites) into a map. Would love it if anyone knew whether or not it would allow me to have 1000+ units on the map at the same time without causing lag.
Rollback Post to RevisionRollBack
The Team - TnTProductions
TnTProductions latest Project - Docking Bay 13
TnTProductions Epic RPG in the making - Psionics: Chaos Rising
Check out our website on wixx! http://bulletbutter.wix.com/tntproductions
The only situation where making simplier models will help is when all 1000 units are visible on the same screen. If units are spread along the map and you don't see much of them simultaneously, simplifying the models won't help.
Units are complex objects, each requires lots of cpu time to do all routines on each tact of game world simulation. (You could try to set air mover and remove collisions of the units to see if it help to save some perfomance. But I don't think it will save any noticable amount of perfomance).
Also, the amount of behaviors matters. If you have like 1000+ buffs alive on map, it will affect the perfomance. Not to mention the trigger related lag. Debug info can help to see what are the main lag sources.
The actual models of the units actually only do very little to affect performance, which becomes very noticable when you start working with high poly models. While symblifying the models could potentially have performance benefits, as Zolden said, it doesnt really matter unless its all on the screen. The lag you have will be more related to the data in connection to the units.
I have been trying to solve the mass unit lag for a long time. I think in sc1, it only appears that it can handle more, but sc1 units are huge. You can't fit as many units in sc1 as you can with sc2. I haven't played sc1 in a long time though, so only going by memory here...
Sc2 primary lag comes from units attacking. You can move 800 units across the map and it won't lag that much. But as soon as you give that attack order command, lag drops to like 5 fps.
My theory to reduce lag, remove all the non-essential actors from the map. Actors like showing your units shooting and firing projectiles. Actors showing impact on your units. Remove as many actors as you can, that may reduce lag. Anyone care to try?
Also in each actor, remove as many conditions as possible. Stuffs like helpers, constructions, etc... There's a lot of conditions in each actor. Not sure if any of it helps since the lag still comes from units actually attacking...
What I did to remove lag from my map was to keep all the unit models unloaded until they actually need to be used and then once I'm done with them they get removed.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If you have too many units running around on a map, it gets laggy as all hell. I understand why but would like to test a theory about removing the lag from units altogether. However, I would hate to waste my time so I am just going to ask if anyone has a clue about this.
I know back in the days of SC1/Broodwar you could run into the same issue but the "limitations" for SC2 vs SC1 (as far as unit limits and how it effects lag), is vastly in favor of SC1. Take a map like starship troopers for example, in SC1 it felt more like you were being swarmed because if looked like there were more units. It's like, SC2 has a unit cap of 500 units before it gets laggy, but SC1 had a cap of like 800+.
If, instead of 3d models, you used 2d sprites as units, would it get rid of the lag? Or at least make it where you could have more units on the map? I've got an idea about putting all the SC1/Broodwar units (as sprites) into a map. Would love it if anyone knew whether or not it would allow me to have 1000+ units on the map at the same time without causing lag.
@bulletbutter: Go
I think it would lag about the same as with 3D models, as the lag usually stems from the pathing rather than the graphics with starcraft.
The only situation where making simplier models will help is when all 1000 units are visible on the same screen. If units are spread along the map and you don't see much of them simultaneously, simplifying the models won't help.
Units are complex objects, each requires lots of cpu time to do all routines on each tact of game world simulation. (You could try to set air mover and remove collisions of the units to see if it help to save some perfomance. But I don't think it will save any noticable amount of perfomance).
Also, the amount of behaviors matters. If you have like 1000+ buffs alive on map, it will affect the perfomance. Not to mention the trigger related lag. Debug info can help to see what are the main lag sources.
The actual models of the units actually only do very little to affect performance, which becomes very noticable when you start working with high poly models. While symblifying the models could potentially have performance benefits, as Zolden said, it doesnt really matter unless its all on the screen. The lag you have will be more related to the data in connection to the units.
@bulletbutter: Go
I have been trying to solve the mass unit lag for a long time. I think in sc1, it only appears that it can handle more, but sc1 units are huge. You can't fit as many units in sc1 as you can with sc2. I haven't played sc1 in a long time though, so only going by memory here...
Sc2 primary lag comes from units attacking. You can move 800 units across the map and it won't lag that much. But as soon as you give that attack order command, lag drops to like 5 fps.
My theory to reduce lag, remove all the non-essential actors from the map. Actors like showing your units shooting and firing projectiles. Actors showing impact on your units. Remove as many actors as you can, that may reduce lag. Anyone care to try?
Also in each actor, remove as many conditions as possible. Stuffs like helpers, constructions, etc... There's a lot of conditions in each actor. Not sure if any of it helps since the lag still comes from units actually attacking...
What I did to remove lag from my map was to keep all the unit models unloaded until they actually need to be used and then once I'm done with them they get removed.