DDS causing lag
Mar 7 2015, 5:08 am
By: MetalGear  

Mar 7 2015, 5:08 am MetalGear Post #1



I've been using the direct damage system (blowing up scarabs by moving them to unwalkable locations) for a while now. It only occurred to me recently that it causes extreme lag issues. If you use the DDS in your map, then with each scarab blown up, the lag gets progressively worse until someone crashes or freezes out.

Does anyone know any way to combat this issue, or know why it happens?



None.

Mar 7 2015, 11:21 am Oh_Man Post #2

Find Me On Discord (Brood War UMS Community & Staredit Network)

Okay man well it depends, you may just have a huge number of scarabs constantly spawning in some corner of the map.

If you're doing this you may get lag - but what you would primarily notice is all the attack sprites disappearing. This is because the DDS system uses all those sprites up. If this isn't what you're doing then I can't help you.

If this is your problem then the solution is you have to only create the amount of scarabs you need. Use a death counter, where X Death counter = X scarabs. Then you move those scarabs to a location over and over, so they're just frozen there - until they're ready to be moved to where you want them to detonate.

I don't know the timing precisely, but I think something like after 4 seconds the scarabs begin detonating spontaneously. They don't stay alive forever. I think when they detonate is random, but it's always AT LEAST 4 seconds (not sure on that number - that's an estimate). So make sure you have moved them to the desired location before that 4 seconds is up, or you run the risk of them already having detonated before your triggers move them.

Hope this helps.




Mar 7 2015, 11:44 am MetalGear Post #3



Yes I became aware of the sprite issue in previous maps. But only 29 scarabs exist at one time. The trigger runs every second, so perhaps I could reduce the problem by slowing it down to 4 seconds, but it won't solve the problem.

My intuition is that, technically speaking, when you order the scarabs to move to unwalkable location, although the unit physically disappears, it still continues to be treated as a functioning unit. So the game is processing a progressively higher number of units until it crashes.

Well, unless anyone else can solve this problem there's probably not much I can do. Unless there's another method to detonating scarabs?



None.

Mar 7 2015, 1:47 pm Oh_Man Post #4

Find Me On Discord (Brood War UMS Community & Staredit Network)

Well why do you need to have 29 scarabs existing every 4 seconds in your game? Surely if the DDS is a spell or ability or w/e you need to only create those scarabs when that spell/ability is cast?




Mar 8 2015, 3:34 am MetalGear Post #5



It was so that there was no delay. It takes 4 cycles to reliably build all the scarabs. But now that I think about it, 4 cycles isn't that long. I can change that so the DDS only triggers when the spell is cast. Now the only question is whether the lag is caused by the scarab creation triggers or the scarab detonation triggers. If it's caused by the detonation triggers there may be nothing I can do to reduce lag.



None.

Mar 8 2015, 7:06 am Oh_Man Post #6

Find Me On Discord (Brood War UMS Community & Staredit Network)

Well, let's see how that works. You may just have to incorporate the delay into your spell in order to bypass the issue. It's not like the delay is very noticeable - you can get scarabs very quickly.




Mar 10 2015, 10:44 am MetalGear Post #7



I did what you said, now the DDS only functions when the spells are cast. Ready for testing!



None.

Aug 1 2015, 10:39 am Wormer Post #8



What are the results of this test? I was going to use scarabs to deal some splash damage in a map, but if you say it means every detonation brings it closer to the crash then it's really sad. Hopefully the DDS system concept exists for a while now, there are quite some maps using it and none have reported lag issues yet. Maybe it's just a coincidence and something else is causing the crash and lag? This is very important to me right now.

As a side question, how do you manage to explode scarabs moving them to unwalkable location? I remember I was doing it successfully in the past, but now I can't get it to work. I'm using the action: Move Units to Location(All, "Scarab", Player, "Big Location", "Unwalkable Location"). Are there some special preconditions to make them explode successfully? Probably I have to do it only for one scarab? or scarabs must be owned by P12? or reaver that launched the scarab must be removed? If there is a matter, before executing this action scarabs are ordered a junk yard dog at location to spread them a bit.

EDIT: Gladly I can't confirm this lag issue, because I'm running the test map for already 4 hours straight and yet don't notice any lag... Probably it's something else that causing the lag/crash for you. Regarding my question, I think it's the JYDg scritpt that messes the thing with scarabs, right?

EDIT2: 6 hours straight ain't going to crash me...

EDIT3: 7 hours 45 minutes straight, a NEO has occured and cluttered Reavers but the game hasn't crashed yet. There is no lag either. I guess I am calling it an end now.

EDIT4: Elapsed time 7:49:15.

Post has been edited 7 time(s), last time on Aug 1 2015, 7:47 pm by Wormer.



Some.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Mysylia52, Roy, jun3hong