How to prevent stutter/pause/lag for GROUP ACTIVATE/Respawn via script! - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-03-2017, 05:30 AM   #1
deadlyfishes
Member
 
deadlyfishes's Avatar
 
Join Date: Oct 2015
Location: San Jose, California
Posts: 181
Default How to prevent stutter/pause/lag for GROUP ACTIVATE/Respawn via script!

So everyone knows the issue where you try to spawn in an air, ground, ship or static group into your mission and then it's usually followed by a short stutter, pause, or lag spike (for multiplayer).

Some of these issues have been mentioned here:
https://forums.eagle.ru/showthread.php?p=3134763
https://forums.eagle.ru/showthread.php?t=66606
https://forums.eagle.ru/showthread.php?t=184509

(Sorry of someone already brought this up or is already well-known but I haven't seen to much about anywhere myself and it was pretty big to us when we found out)

This happens when you spawn in units OUT OF THIN AIR using GROUP ACTIVATE, mist.respawn or any of the MOOSE commands.

I've been fighting with this issue with my Through The Inferno PvE server which can see up to 45 players during peak hours.

It only gets worse the more players you have on your server and how big the group your spawning is.

Long story short after much testing we've figured out how to solve this issue, and now we're able to spawn multiple groups of units, of any size. (something reasonable, obviously if you spawn 50 ground units at once with radar, you'll run into issues if your machine can't handle it.)

The issue is much more apparent on multiplayer servers, but it's still there in single player.

So here's how to handle it for each type of unit:

Air Vehicles: (STATIC UNITS DON'T WORK AS WELL!)

Place one of each type of air unit that you spawn in your mission at an airfield that is not in use.

Set their commands to:
Immortal
Invisible
Take off from ramp
Check
UNCONTROLLED

(Sometimes it's a good idea to do this for each player slot as well).

Ground/Ship/Static:

Set their commands to:
Immortal
Invisible

Keep their AI ON. We've tried AI OFF before and it still stutters/pauses when you spawn in ground units.

You can put these anywhere and hide them if you'd like.

Remember that scripts like CTLD have statics and units, so be sure to put those in there as well.

Other ways to help optimize performance with many ground units:

Try using a trigger zone for enemy ground units to turn off their AI on or off.

CONDITION PART OF COALITION IN ZONE > GROUP AI ON [REDSAM]
CONDITION ALL OF COALITION OUT OF ZONE > GROUP AI OFF [REDSAM]

The only issue we've had before is having close to a hundred active ground units on the map, especially many with radars causing noticeable and continuous lag. Nothing we can do about this without some heavy external processing which is quite a doozy to pull off well.

Let me know if this isn't working, I'm sure you may have missed something. Feel free to join our server and ask me to show you that we're able to spawn several aircraft groups (about 20) plus several ground unit groups at once without any lag or stutter at all
__________________
"Through The Inferno"
Endless, Dynamic, Open-World Experience for DCS World
Official Website
Join our Discord Server

Through The Inferno Missions:
Single Player:
Caucasus | NTTR - Las Vegas | Normandy (WWII)
Multiplayer Servers:
Dedicated Multiplayer

Discord Username: deadlyfishes#1869
____
Intel i7 7700k OC 5ghz | Titan Xp (SLI) | 64GB DDR4 RAM
deadlyfishes is offline   Reply With Quote
Old 10-03-2017, 09:14 PM   #2
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 1,983
Default

Moose SPAWN ensures that it has all units spawned at the start of the mission. Late activated. Then it activates them when the spawn every is called... Without performance impact indeed. Like 600 units with various options like random routes, random zones, random templates, random ....

http://flightcontrol-master.github.i...awn.html#SPAWN
__________________

Last edited by FlightControl; 10-03-2017 at 09:16 PM.
FlightControl is offline   Reply With Quote
Old 10-03-2017, 09:26 PM   #3
deadlyfishes
Member
 
deadlyfishes's Avatar
 
Join Date: Oct 2015
Location: San Jose, California
Posts: 181
Default

Quote:
Originally Posted by FlightControl View Post
Moose SPAWN ensures that it has all units spawned at the start of the mission. Late activated. Then it activates them when the spawn every is called... Without performance impact indeed. Like 600 units with various options like random routes, random zones, random templates, random ....

http://flightcontrol-master.github.i...awn.html#SPAWN
I remember using MOOSE before and I still had the issue with spawning in units in a MP environment and still had the stutter/pause.

Once you've destroyed them or when the unit is done, they become un-cached right?
__________________
"Through The Inferno"
Endless, Dynamic, Open-World Experience for DCS World
Official Website
Join our Discord Server

Through The Inferno Missions:
Single Player:
Caucasus | NTTR - Las Vegas | Normandy (WWII)
Multiplayer Servers:
Dedicated Multiplayer

Discord Username: deadlyfishes#1869
____
Intel i7 7700k OC 5ghz | Titan Xp (SLI) | 64GB DDR4 RAM
deadlyfishes is offline   Reply With Quote
Old 10-03-2017, 09:40 PM   #4
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 1,983
Default

Quote:
Originally Posted by deadlyfishes View Post
I remember using MOOSE before and I still had the issue with spawning in units in a MP environment and still had the stutter/pause.

Once you've destroyed them or when the unit is done, they become un-cached right?
It depends how you use SPAWN.

When you use the InitLimit() method of SPAWN, all groups are spawned late activated in advance.
When you use InitArray(), it even makes them visible before start...

Nice to make large battalions visible in missions.

Unfortunately, DCS had a new bug introduced in multi player.
When groups are visible before start, dynamically spawned but late activated and visible, and when clients connect, the group activations on the server are not synced to the clients. The server will have active groups, and the client won't see them... But this only happens when visible before start.

Another fix for ED todo. This issue was with dcs before, and it has returned:-(

Last edited by FlightControl; 10-03-2017 at 09:45 PM.
FlightControl is offline   Reply With Quote
Old 10-03-2017, 10:30 PM   #5
Winston 60
Member
 
Winston 60's Avatar
 
Join Date: May 2016
Location: Omaha, NE
Posts: 642
Default

deadlyfishes, I have had good luck with a technique similar to yours while not noticing any sync issues. I just use an equal number of statics of the same types as all late activated units, placed on the map somewhere at start, and the "pause" when air, ground or ship groups activate is gone.
__________________
CPU: i7 980x @ 4.2GHz RAM: 24gb Corsair Vengeance
MB:
Gigabyte Sniper X58 w/onboard Soundblaster X-Fi

HD: SanDisk 480gb SSD OS: Win7 Pro 64bit
VIDEO CARD: EVGA GTX 980ti
FTW
MONITOR: LG 34" Ultrawide 2560x1080
MP SERVER: ibuypower i7-4810MQ w/Win7 Home 64bit
GEAR: Saitek X-52 Pro; Combat Rudder Pedals; Throttle Quadrants. Thrustmaster MFD's, TrackIR 5 w/Pro Clip, Turtle Beach X-12 Headset
Winston 60 is offline   Reply With Quote
Reply

Tags
editor, group activate, lag, mission, stutter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:22 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.