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


Notices

Reply
 
Thread Tools Display Modes
Old 10-03-2017, 06:30 AM   #1
deadlyfishes
Member
 
deadlyfishes's Avatar
 
Join Date: Oct 2015
Location: San Jose, California
Posts: 277
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 | Persian Gulf | Normandy (WWII) | Normandy (Modern Aircraft)
Multiplayer Servers:
PvE Multiplayer Server | PvP Multiplayer Server
deadlyfishes is offline   Reply With Quote
Old 10-03-2017, 10:14 PM   #2
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,016
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 10:16 PM.
FlightControl is offline   Reply With Quote
Old 10-03-2017, 10:26 PM   #3
deadlyfishes
Member
 
deadlyfishes's Avatar
 
Join Date: Oct 2015
Location: San Jose, California
Posts: 277
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 | Persian Gulf | Normandy (WWII) | Normandy (Modern Aircraft)
Multiplayer Servers:
PvE Multiplayer Server | PvP Multiplayer Server
deadlyfishes is offline   Reply With Quote
Old 10-03-2017, 10:40 PM   #4
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,016
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 10:45 PM.
FlightControl is offline   Reply With Quote
Old 10-03-2017, 11:30 PM   #5
Winston 60
Member
 
Winston 60's Avatar
 
Join Date: May 2016
Location: Omaha, NE
Posts: 640
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
Old 11-06-2018, 04:22 AM   #6
Kolyma
Junior Member
 
Kolyma's Avatar
 
Join Date: Dec 2014
Location: Tennessee, USA
Posts: 70
Default

Quote:
Originally Posted by deadlyfishes View Post
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).

...

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

...
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
Hey thanks for this info. Really helped. I was getting lag with any of the scripting engines. Your suggestions made sense and helped with dynamic spawning new units without lag, regardless of late activation of other kinds of breugelcraft.
__________________
Something clever goes here...
Kolyma is offline   Reply With Quote
Old 11-06-2018, 05:53 AM   #7
deadlyfishes
Member
 
deadlyfishes's Avatar
 
Join Date: Oct 2015
Location: San Jose, California
Posts: 277
Default

Quote:
Originally Posted by Kolyma View Post
Hey thanks for this info. Really helped. I was getting lag with any of the scripting engines. Your suggestions made sense and helped with dynamic spawning new units without lag, regardless of late activation of other kinds of breugelcraft.



Kind of an old thread here.


I notice this REALLY helped 100% on DCS 1.5, but even with this work-around it's somewhat of an issue in 2.5, with a lot of units, heavy volume of players and objects/AI.


Maybe it helps on a smaller scale, but it's not as effective as it used to be on 1.5.


Hopefully fixes and better netcode will come with the supposed dedicated app coming Soon™
__________________
"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 | Persian Gulf | Normandy (WWII) | Normandy (Modern Aircraft)
Multiplayer Servers:
PvE Multiplayer Server | PvP Multiplayer Server
deadlyfishes is offline   Reply With Quote
Old 11-06-2018, 09:15 AM   #8
Maverick87Shaka
Member
 
Maverick87Shaka's Avatar
 
Join Date: Dec 2015
Location: Italy, Milano
Posts: 183
Default

Quote:
Originally Posted by deadlyfishes View Post
......
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
I'll try for sure this trick! Can I ask you the server hardware specs and bandwith? I would like to compare "performance" and specs to see if it's time to upgrade my server.






Quote:
Originally Posted by deadlyfishes View Post

.........
Hopefully fixes and better netcode will come with the supposed dedicated app coming Soon™
We're all dreaming that moment!
Personally I hope this arrives in time for the F-14, I belive will see an increasing multiseat operation also on public server, so we need a better foundations.
__________________
FlighRIG => CPU: RyZen 2700x | RAM: 32GB G.Skill 3200Mhz running at 2600Mhz (Damn RyZen!) | GPU: nVIDIA RTX 2080 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD SATAIII Crucial MX300 750GB | Device: VirPil T-50, ThrustMaster TWCS Throttle and Pedals, TrackHat, MFD Cougar.
Server => [ITA] Banshee TEST server - PvE | Windows Server 2016 | i7-7700K | 32GB DDR4 @2400Mhz | SSD 970 EVO M.2, NVMe | 1Gbps Dedicated Fiber Connection
Maverick87Shaka is offline   Reply With Quote
Old 11-06-2018, 12:48 PM   #9
Kolyma
Junior Member
 
Kolyma's Avatar
 
Join Date: Dec 2014
Location: Tennessee, USA
Posts: 70
Default

Quote:
Originally Posted by deadlyfishes View Post
Kind of an old thread here.


I notice this REALLY helped 100% on DCS 1.5, but even with this work-around it's somewhat of an issue in 2.5, with a lot of units, heavy volume of players and objects/AI.


Maybe it helps on a smaller scale, but it's not as effective as it used to be on 1.5.


Hopefully fixes and better netcode will come with the supposed dedicated app coming Soon™
Yeah, I saw the old thread and bumped it. Nothing else came up with Google search right away and I had decided to finally look into how to mitigate this issue after on-again / off-again attempts at playing around with servers and scripts. The stop-lag when spawning dynamic units was/is a real pain. Depending on where you are in flight it's either a minor distraction or a one, two, three frame slam into the ground kind of problem.

Anyway, I converted my main script from delayed-activated only style to uncontrolled ramp-slotted + delayed-activated controllable & client style units and ran the server for a few hours. Seems for those of us on it that the stop-lag was gone.

Need to try Winston_60's suggestion of using statics instead of ramp-parked units. Something bad about having airbase slots taken with defunct units just to correct dynamic spawns stop-lag. That would make more sense
__________________
Something clever goes here...
Kolyma is offline   Reply With Quote
Old 11-06-2018, 08:54 PM   #10
fargo007
Member
 
Join Date: Jul 2017
Posts: 501
Default

This topic came up again last night for us.

I tried it on the latest openbeta, PG map, and it appears to have zero effect. Looks like it's back to not working.

ETA - Specifically ground units of all types.
__________________



You dig rotorcraft? Training, Quals, Missions, & FUN. Ask me about joining the Black Sharks!

Last edited by fargo007; 11-06-2018 at 08:58 PM.
fargo007 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 03:58 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.