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.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Ultraviolet, Roy