So i have been working on my map for quite a while now and avoiding all key detection, my question is, how bad is the "Network Lag" using key detection. my map will be running with 12 players and if i was to implement key detection it would be used about 2-3+ times per minute. any details on network lag for this would be greatly appreciated.
The problem with key detection is that its not used 2-3 times per minute. Its used EVERY time a play presses a key, regardless of if thats the one you were looking for or not. I cant give an exact delay time though..
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
thank you for the response, i am just concerned that with the amount of times the key will be pressed that it will bog the game down, which that alone is worth avoiding the key presses all together.
It won't bog down the game, but you're going to get delay from .5 + depending on what alls going on in your map. So it's not good for anything where you need precision control. But setting up key detection for some ability's would be perfectly fine.
Key detection wont bog down the system if you do it like this
Trigger Key Detect
Events
UI - Player 1 hits key ("a")
Actions
Turn off trigger(this trigger)
Text message (" player 1 hit key a")
wait .5 realtime seconds
turn on trigger(this trigger)
this wont lag really at all.
most people complain about the time it takes for this trigger to activate after clicking the button. It takes a small moment to react
to use the "turn trigger off" each key needs its own trigger for each player so you can properly turn them on and off. this prevents the events from flooding the game as a player holds a key down or hits the key repeditively
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
Are you saying that even if the event specifies the key that needs to be pressed the trigger will fire?? No wonder people avoid trigger wasd movement. Probably useless for anything other than a single player map.
actually the delay of a key event should be equal to the delay for pressing a dialog button for example, so its mainly depending on your ping.
in general if u use triggers with key detection (or any other trigger that fires often), you should try to optimize it as good as possible to avoid lag.
general rule: as more often a trigger fires, as more important it is to optimize it as well as possible. however, trigger optimizing is overrated by lots of people especially at their point of trigger knowledge.
Key detection wont bog down the system if you do it like this
Trigger Key Detect
Events
UI - Player 1 hits key ("a")
Actions
Turn off trigger(this trigger)
Text message (" player 1 hit key a")
wait .5 realtime seconds
turn on trigger(this trigger)
this wont lag really at all.
most people complain about the time it takes for this trigger to activate after clicking the button. It takes a small moment to react
to use the "turn trigger off" each key needs its own trigger for each player so you can properly turn them on and off. this prevents the events from flooding the game as a player holds a key down or hits the key repeditively
I'm sceptic about that. I can't think of a reason why disabling the trigger for a short time would reduce delay. Doesn't make sense in my books. I don't have any solid info that speaks against this though (because I can't be bothered to runs tests..).
About the last paragraph:
If I remember correctly the Key Down event will only be triggered once, even if the player holds down the key for several seconds.
general rule: as more often a trigger fires, as more important it is to optimize it as well as possible. however, trigger optimizing is overrated by lots of people especially at their point of trigger knowledge.
To elaborate a bit:
Basically you don't have to care about trigger optimization at all until players start lagging. It doesn't matter if you have a trigger that fires all 5 minutes or all 0.1 seconds.
As long as the trigger doesn't create a small lag ( = freeze ) when it's run once then the number of executions really don't matter at all.
For Starcraft modding writing efficient triggers is really only needed so you can run very long or complex triggers without lags. Not so you can run them a lot of times.
So i have been working on my map for quite a while now and avoiding all key detection, my question is, how bad is the "Network Lag" using key detection. my map will be running with 12 players and if i was to implement key detection it would be used about 2-3+ times per minute. any details on network lag for this would be greatly appreciated.
The problem with key detection is that its not used 2-3 times per minute. Its used EVERY time a play presses a key, regardless of if thats the one you were looking for or not. I cant give an exact delay time though..
thank you for the response, i am just concerned that with the amount of times the key will be pressed that it will bog the game down, which that alone is worth avoiding the key presses all together.
@moonwatch89: Go
It won't bog down the game, but you're going to get delay from .5 + depending on what alls going on in your map. So it's not good for anything where you need precision control. But setting up key detection for some ability's would be perfectly fine.
Key detection wont bog down the system if you do it like this
this wont lag really at all.
most people complain about the time it takes for this trigger to activate after clicking the button. It takes a small moment to react
to use the "turn trigger off" each key needs its own trigger for each player so you can properly turn them on and off. this prevents the events from flooding the game as a player holds a key down or hits the key repeditively
Interesting, well all the input is greatly appreciated
@zeldarules28: Go
Are you saying that even if the event specifies the key that needs to be pressed the trigger will fire?? No wonder people avoid trigger wasd movement. Probably useless for anything other than a single player map.
actually the delay of a key event should be equal to the delay for pressing a dialog button for example, so its mainly depending on your ping.
in general if u use triggers with key detection (or any other trigger that fires often), you should try to optimize it as good as possible to avoid lag.
general rule: as more often a trigger fires, as more important it is to optimize it as well as possible. however, trigger optimizing is overrated by lots of people especially at their point of trigger knowledge.
I'm sceptic about that. I can't think of a reason why disabling the trigger for a short time would reduce delay. Doesn't make sense in my books. I don't have any solid info that speaks against this though (because I can't be bothered to runs tests..).
About the last paragraph:
If I remember correctly the Key Down event will only be triggered once, even if the player holds down the key for several seconds.
To elaborate a bit:
Basically you don't have to care about trigger optimization at all until players start lagging. It doesn't matter if you have a trigger that fires all 5 minutes or all 0.1 seconds.
As long as the trigger doesn't create a small lag ( = freeze ) when it's run once then the number of executions really don't matter at all.
For Starcraft modding writing efficient triggers is really only needed so you can run very long or complex triggers without lags. Not so you can run them a lot of times.