Page 1 of 1

optimizations for maps with large unitcount

Posted: Fri Oct 17, 2008 12:03 pm
by Bantha55
All my maps have large unitcounts and you know this brings allways some adverse effects like:

-the map may lagg
-the map may crash if you zoom in with a sniper rifle, bowcaster etc. (matrix error)
-effects may not show up
-too many units with too many loud sounds make the map crash (list pool error)

I searched for ways to optimize them:

-lower the sight distance in the sky file
-add SetMemoryPoolSize ("FLEffectObject::OffsetMatrix", 500) to your lua (more effects will show up but if you have REALLY HIGH unitcounts (just like me) there are although not all)
-use custom sounds that you can change like you want

You see, these aren´t perfect optimizations. Do you know other/better ones?

Re: optimizations for maps with large unitcount

Posted: Fri Oct 17, 2008 4:37 pm
by Eggman
Try designing the map so that only a fraction of the units will ever be on screen at once. I once had a map going with at least 150 units per side, maybe even 200, but I had no problems because the design of the map split the battle up into three different areas, meaning that you would never have more than 100 units on screen at once.

Re: optimizations for maps with large unitcount

Posted: Sat Oct 18, 2008 6:06 am
by Bantha55
yes, i know this helps, but i don´t know how to split up the imperials in my hoth map. like in the movie they come all from one point of the map with the ATATs and ATSTs and so on. If you zoom in then, the map crashes allmost everytime...

Re: optimizations for maps with large unitcount

Posted: Sun Oct 19, 2008 5:20 pm
by Teancum
Use sectors/etc to section off what's visible/shown and what's not. If you have a hill that doesn't allow you to see over the other side, you may want to do sectors so the game isn't trying to render what can't/doesn't need to be seen. Most of that is already handled by the engine, but it helps with optimizations.