OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Ironman on 22 Apr 2008, 19:56:42

Title: CreateVehicle vs map editor.
Post by: Ironman on 22 Apr 2008, 19:56:42
Ok the question is, what helps make a mission run smoother (ie. no screen lag or any other kind of lag)?

Should you use a script to create OPFOR or should you just put them in editor?

This is for missions that are pretty large scale.
Title: Re: CreateVehicle vs map editor.
Post by: Cheetah on 22 Apr 2008, 20:37:03
What helps?

Spawning units, deleting (dead) units, using a limited number of (repeating) triggers

Might work to put the AI on the other side of the map and teleport them on site once they are required - not sure if that works though.

Also, cut down on the number of tanks and helicopter - those tend to cause lag (it seems to be that way).
Title: Re: CreateVehicle vs map editor.
Post by: Rommel92 on 22 Apr 2008, 21:29:53
Tip for placed units, if you find it easier to do so (it is  :P, unless of course your talking Evolution scale, where its constant).
Waypoints that are looped (ie patrol) should be hooked on a presence trigger, too much moving at anyone time causes the greatest amount of lag.

The most common "laggers" are those in the air, as the x,y,z position is being updated greatly, with no resolve (ie a finish), and its difference is great, hence having a lot can create a lot of lag as it substitutes to even out the distribution of network bandwidth.

Otherwise, make sure spawned units are setup correctly, and try as hard as possible to find scripts with infinite loops, to rid of them as they can create a memory leak, or atleast act as a permanent lag.

 ;)
Title: Re: CreateVehicle vs map editor.
Post by: Ironman on 23 Apr 2008, 08:17:46
Ok, well this is more of a discussion than really helping me. It is just games like Domination have units spawn in towns, Evolution is based off of presence of BlueFor.

I wanted to know what worked best, transporting, spawning, or placing. Maybe there isn't a definitive answer.

This is what I got so far though:

Limited amount of WP's on map that cycle, especially air units
Limited amount of Enemy vehicles
A lot of added objects very close together
...

keep it coming please, it will help me and others
Title: Re: CreateVehicle vs map editor.
Post by: myke13021 on 23 Apr 2008, 13:37:50
The question is set too general to give a definitive answer. It depends on the mission, the objectives, is it designed with almost fixed missionflow (player is forced to move from A passing B to reach C) or is there a lot of freedom what players does in which order. Is it a large scale mission covering the whole island or is it located in one village only.

Depending on that, using spawn scripts like the excellent DAC 2.0 from mapfact or my own A-CEP might help to save ressources. Also dead body removal (i think there's one at ofpec ressources) or reducing group size (cache units) whenever no enemies (looking from groups side view) are around are worth to think of.

On the other side, if your mission requires a better control what happens when and which unit/group has to be where, editorplaced units/groups are the better way.

At the end, sometimes a mix of both ways will probably lead to the best possible result. Place the units in editor that are mandatory for the missionflow, use spawn scripts to save ressources and add some randomness to the mission.
Title: Re: CreateVehicle vs map editor.
Post by: Wolfrug on 23 Apr 2008, 13:57:16
In Operation Dawning Hope I used Kronzky's Urban Patrol Script to great effect: it allows you to for instance copy singular units or whole groups and randomly place them in an area decided by you. Don't let the name of the script fool you - they can patrol forests and hills just as well as they patrol cities. So what I did was I put down my initial soldiers/groups behind buildings/out of the way, and then tied their "spawning" to a Present trigger: when any of the player's units were inside the trigger, UPS would fire and place random patrols all over the area.

Of course, this doesn't "cache" the units if you leave the area again, but for most SP (or why not MP?) missions that shouldn't matter: you can just set it up for each target area and the units will be spawned in on demand. Some specialized units you might want to place by hand (tanks, target units, etc), but the engine can handle that.

However, if you're planning on making a REALLY large-scale mission, you'll want to use DAC 2.0 for all your unit-spawning needs. :) Although it can cause some lag as well, of course...

Wolfrug out.
Title: Re: CreateVehicle vs map editor.
Post by: Ironman on 24 Apr 2008, 01:20:31
Thanks for you input guys, I hope more people post this kind of info.



What about placing units in Open buildings. I use a guess and check with the setpos command..... what does everyone else use?