So I just published my map which I'm quite happy about (Starship Troopers Abandoned GreyHunter) - however there's a bit of lag on the unit response times. It's almost a full second. This is just me soloing it. I tried other maps and I might get half a sec delay or less. Mine just feels like it has a worse delay. Do you know what would cause this? Is it my ridiculous amount of triggers and variables?
It runs smooth with no delay when I play it from the editor.
Please take no offense to this but as someone who's had their map stolen before the in wc3 days I prefer to keep it protected. When you watch the intro scene you spent a day on and they don't even mention you in the credits you get a little peeved.
Just curious if anyone else has ever encountered a longer response delay in their map and if they found a solution to it.
It will be excruciatingly difficult for anyone to help solve your delay/latency problem without seeing the inner workings of your map.
As a general rule of thumb, try using less triggers and less global variables, instead using local variables, parameters and action definitions. Triggers that run periodically to check certain things, or cause certain effects can also be major contributors to 'response delays'. Your map might simply have a hell of a lot of units / action happening at once. In which case, simplifying death animations (through either hiding random deaths via Actor - Events), or altering the actual animation to be less intensive (using third party software), are both viable methods. However, as far as I know this 'delay response' is more indicative of network latency (ie: internets), than actual processing problems.
Find someone who you can trust, and send them the map. Or upload things you think might cause the problem, and ask how to fix these things.
Well I know I get better response times on other maps so its something with mine. I have very little going on in my map as far as units and periodic events.
Turns out my triggers are a huge part of the file size on my map so I deleted all of my disabled ones, reduced some variables (the Achievements variables I cut and pasted in had a 128 integer array that I reduced to 12).
After doing this I noticed its a little better. I still have a lot I can cut out, and a lot of variables I could make Boolean instead of integers, local instead of global, and arrays rather than unique variables. I'll try to clean some more up.
Looking at my Overview Manager I've got:
2,000 actions
300 conditions
100 events
2,700 Function Calls
129 triggers
128 variables
Are these numbers in an ok range? Checking a Campaign map I see it has 1,000 actions and 900 function calls.
My map (link below) has the following
4.40 MB Triggers
3,167 Actions
605 Conditions
42 Events
2,053 Function Calls
58 Triggers
117 Variables
and the only delay I experience is when using my WASD system.
Lag on battle.net is a common issue, which might get better with time as Blizzard fixes the lag.
If possible, try reduce your amount of events as they are what causes the battle.net lag.
Triggers running every 0.01 second or a lot of (Key Pressed) and mouse events is usually the issue.
Huh.. I don't have any Triggers running every .01 sec that I know of or any (key pressed) triggers. Most of mine are all (unit enters region) triggers, (unit dies), (unit created), and (ability used = ___) triggers.
@Dr SuperEvil, yes it is very uninspired desert terrain. Most of my focus is on gameplay.
Speaking of WASD movement and lag, my next map I plan on having WASD movement as a real time overhead shooter (like Asteroids). I'm starting to get cold feet on if its going to be worth my time if there's lag. I think there's a semi lagless WASD movement out their but I have not looked into it yet (somehow linking abilities with movement). Point being, I don't think I'd play one that has lag so why make one? So you have not found a solution for it?
Just a quick edit, the response time is a LOT better now. I have a feeling its more Bnet then my edits, though I did a few. Also playing a 1:42AM on Christmas may help the Bnet lag part.
So I just published my map which I'm quite happy about (Starship Troopers Abandoned GreyHunter) - however there's a bit of lag on the unit response times. It's almost a full second. This is just me soloing it. I tried other maps and I might get half a sec delay or less. Mine just feels like it has a worse delay. Do you know what would cause this? Is it my ridiculous amount of triggers and variables?
It runs smooth with no delay when I play it from the editor.
Try uploading the map on your thread so pros can have a look at it.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Please take no offense to this but as someone who's had their map stolen before the in wc3 days I prefer to keep it protected. When you watch the intro scene you spent a day on and they don't even mention you in the credits you get a little peeved.
Just curious if anyone else has ever encountered a longer response delay in their map and if they found a solution to it.
@GreyHunter4: Go
It will be excruciatingly difficult for anyone to help solve your delay/latency problem without seeing the inner workings of your map.
As a general rule of thumb, try using less triggers and less global variables, instead using local variables, parameters and action definitions. Triggers that run periodically to check certain things, or cause certain effects can also be major contributors to 'response delays'. Your map might simply have a hell of a lot of units / action happening at once. In which case, simplifying death animations (through either hiding random deaths via Actor - Events), or altering the actual animation to be less intensive (using third party software), are both viable methods. However, as far as I know this 'delay response' is more indicative of network latency (ie: internets), than actual processing problems.
Find someone who you can trust, and send them the map. Or upload things you think might cause the problem, and ask how to fix these things.
Well I know I get better response times on other maps so its something with mine. I have very little going on in my map as far as units and periodic events.
Turns out my triggers are a huge part of the file size on my map so I deleted all of my disabled ones, reduced some variables (the Achievements variables I cut and pasted in had a 128 integer array that I reduced to 12).
After doing this I noticed its a little better. I still have a lot I can cut out, and a lot of variables I could make Boolean instead of integers, local instead of global, and arrays rather than unique variables. I'll try to clean some more up.
Looking at my Overview Manager I've got:
2,000 actions
300 conditions
100 events
2,700 Function Calls
129 triggers
128 variables
Are these numbers in an ok range? Checking a Campaign map I see it has 1,000 actions and 900 function calls.
Hmm, terrain looks rather uninspired and uniform.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
My map (link below) has the following
4.40 MB Triggers
3,167 Actions
605 Conditions
42 Events
2,053 Function Calls
58 Triggers
117 Variables
and the only delay I experience is when using my WASD system.
Lag on battle.net is a common issue, which might get better with time as Blizzard fixes the lag. If possible, try reduce your amount of events as they are what causes the battle.net lag. Triggers running every 0.01 second or a lot of (Key Pressed) and mouse events is usually the issue.
Huh.. I don't have any Triggers running every .01 sec that I know of or any (key pressed) triggers. Most of mine are all (unit enters region) triggers, (unit dies), (unit created), and (ability used = ___) triggers.
@Dr SuperEvil, yes it is very uninspired desert terrain. Most of my focus is on gameplay.
Speaking of WASD movement and lag, my next map I plan on having WASD movement as a real time overhead shooter (like Asteroids). I'm starting to get cold feet on if its going to be worth my time if there's lag. I think there's a semi lagless WASD movement out their but I have not looked into it yet (somehow linking abilities with movement). Point being, I don't think I'd play one that has lag so why make one? So you have not found a solution for it?
Just a quick edit, the response time is a LOT better now. I have a feeling its more Bnet then my edits, though I did a few. Also playing a 1:42AM on Christmas may help the Bnet lag part.