OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Krieg on 10 Jan 2010, 13:32:10

Title: What is lag caused by?
Post by: Krieg on 10 Jan 2010, 13:32:10
My question is simple: What causes lag in OFP?

1) Too many objects placed in mission editor on the map?
2) Too many objects close to each other?
3) Too many enemy/friendly AI units performing complex operations at once?
4) Something else?

This is important to me because I am making massive tank mission, and I do not want it to be unplayable because of lag.

Thank you :good:,
Krieg
Title: Re: What is lag caused by?
Post by: mboshell on 10 Jan 2010, 15:52:24
I'm not nearly as learned as you Krieg, but I've experienced lag when I have too many units in close proximity to one another, causing too much information to be processed on the screen.  When I spread the units out, the lag is minimized.  I hope this helps!

All of the others are great questions that make sense to me in causing lag, but I'm not experienced enough yet to confirm it.
Title: Re: What is lag caused by?
Post by: RKurtzDmitriyev on 10 Jan 2010, 15:59:56
I'm sure (1) is a factor, probably (3) as well. Number (2) may be a factor, because viewing those objects would put a stress on the video card. Triggers and looping scripts also cause lag, because they have to update regularly.

For massive missions, many editors seem to use createunit and createvehicle to spawn new units at the appropriate time, so that they don't put a useless strain on the computer. Deletevehicle can also be used to delete triggers after they've become useless. Since dead bodies continue to take up the computer's energy, there are also a bunch of dead body removal scripts floating around.

Besides that, I'm mostly as far in the dark as you are. :dunno:
Title: Re: What is lag caused by?
Post by: Krieg on 10 Jan 2010, 16:24:40
Thanks for both answers! They both helped me! :good:

Quote
I've experienced lag when I have too many units in close proximity to one another, causing too much information to be processed on the screen.  When I spread the units out, the lag is minimized.

This will help!

Quote
For massive missions, many editors seem to use createunit and createvehicle to spawn new units

I might try this, but since I already did most of the object placing, it is unlikely.

Quote
Deletevehicle can also be used to delete triggers after they've become useless.

I did use deleteVehicle to delete useless triggers in "Operation Hellfire", useful little command.

Quote
there are also a bunch of dead body removal scripts floating around.

I will check them out!