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.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy