i played a game of top-down fighters on bnet recently - and i have to say is was virtually unplayable. this was last night, and the general lag that had been plaguing all bnet games had been effectively removed. i played a number of melee games with no "lag" screens popping up.
no lag screens were popping up in this either, but there was a HUGE delay in keyboard response. it seemed like stopping/starting moving took about .5 seconds to respond, despite there being no other noticeable lag in the game.
i dont' know what system top down fighters used. in my map, key-down/key-up commands modify a velocity variable, and a periodic (every 0.05sec) event updates unit movement for player heroes. i'm hoping TDF used nested-while loops with a wait command or something and that the method i'm employing works.
if not, what is the point of wasd maps? if the response is going to be this laggy and we can't use periodic events to update unit moving without there being game-ruining lag, i'm going to abandon my project. i don't see the point in making a mutiplayer map whose controls are completely unreliable over battle.net. i'm hoping someone else has some good news in response to this...
Well, the trigger relating to button inputs has a huge warning saying not to use it over Battle.net. That told me that it would clearly result in big delays..
Of course, I have no idea what I'm talking about and I'm sure somebody will find a solution for button-input maps, if there is not one already.
i don't have my home computer in front of me, but i believe it just says not to use it excessively, as it will run "any time a player presses a key." i don't think it specifically states not to use it over battle.net.
this to me just implies that for every key, including every hotkey, the trigger is run. granted most maps use triggers that run every second AND every time any unit dies to update scores etc., etc, so having a trigger run that often wouldnt' cause problems. also, it's not like once everyone stats uses units lag builds up. it is immediate with only 1 player using a unit or pressing any keys.
I think the issue is that when a map has a trigger running every .05s to update a score the each player handles the update computer side with no network influence.
With key is pressed (and I'm speculating here)it might be that each player is sending to the host(or every other player) first that "HEY I JUST PRESSED A KEY."
Its kinda hard to explain, but my thinking is that every computer in the game knows that .05 seconds has passed. Every computer in the game knows that ted just walked into region A(because the game it programed to get positional data). And if you only have to deal with positional data then the network strain is not so bad.
But how do you know when Jim presses a key? Once again we know when Jim walks into a region because the game updates Pdata. The only way to know when Jim presses a key is for Jim to tell you and everyone else by adding to the network.
Movement is part of the normal network flow, but ALSO will start to cause lag when you get large armies going at it.
This is the basic idea. Key press events are synchronous, meaning that when a player's client detects a key press, it sends a message to the host, which sends the message to all clients to fire the event. The delay is a product of latency.
@Reves:
dude, your avatar is freaking me out, how the hell can it be so 3d ? :D
on topic: why didn't blizzard implement a local keypress event, that just sends any traffic when the trigger is actually triggered? I'm sure they have a good reason for it, but it still sucks and is not what I expected from a modern engine..
dude, your avatar is freaking me out, how the hell can it be so 3d ? :D
on topic: why didn't blizzard implement a local keypress event, that just sends any traffic when the trigger is actually triggered? I'm sure they have a good reason for it, but it still sucks and is not what I expected from a modern engine..
Because it's an RTS engine, not a FPS engine, and therefore doesn't do client-side prediction (which is basically impossible for an RTS, too many things under the control of a player to have any sort of meaningful prediction.)
Well, you could do a work around with skill keys set with the hotkeys being wasd. It'd be really messy, but now you're only checking if a skill in initiated.
i played a game of top-down fighters on bnet recently - and i have to say is was virtually unplayable. this was last night, and the general lag that had been plaguing all bnet games had been effectively removed. i played a number of melee games with no "lag" screens popping up.
no lag screens were popping up in this either, but there was a HUGE delay in keyboard response. it seemed like stopping/starting moving took about .5 seconds to respond, despite there being no other noticeable lag in the game.
i dont' know what system top down fighters used. in my map, key-down/key-up commands modify a velocity variable, and a periodic (every 0.05sec) event updates unit movement for player heroes. i'm hoping TDF used nested-while loops with a wait command or something and that the method i'm employing works.
if not, what is the point of wasd maps? if the response is going to be this laggy and we can't use periodic events to update unit moving without there being game-ruining lag, i'm going to abandon my project. i don't see the point in making a mutiplayer map whose controls are completely unreliable over battle.net. i'm hoping someone else has some good news in response to this...
Well, the trigger relating to button inputs has a huge warning saying not to use it over Battle.net. That told me that it would clearly result in big delays..
Of course, I have no idea what I'm talking about and I'm sure somebody will find a solution for button-input maps, if there is not one already.
i don't have my home computer in front of me, but i believe it just says not to use it excessively, as it will run "any time a player presses a key." i don't think it specifically states not to use it over battle.net.
this to me just implies that for every key, including every hotkey, the trigger is run. granted most maps use triggers that run every second AND every time any unit dies to update scores etc., etc, so having a trigger run that often wouldnt' cause problems. also, it's not like once everyone stats uses units lag builds up. it is immediate with only 1 player using a unit or pressing any keys.
I think the issue is that when a map has a trigger running every .05s to update a score the each player handles the update computer side with no network influence.
With key is pressed (and I'm speculating here)it might be that each player is sending to the host(or every other player) first that "HEY I JUST PRESSED A KEY."
Its kinda hard to explain, but my thinking is that every computer in the game knows that .05 seconds has passed. Every computer in the game knows that ted just walked into region A(because the game it programed to get positional data). And if you only have to deal with positional data then the network strain is not so bad.
But how do you know when Jim presses a key? Once again we know when Jim walks into a region because the game updates Pdata. The only way to know when Jim presses a key is for Jim to tell you and everyone else by adding to the network.
Movement is part of the normal network flow, but ALSO will start to cause lag when you get large armies going at it.
SO here is the best way I can put it.
Its like he just created a HUGEEEEEEEEE army of 200 units.
@Reves: Go
This is the basic idea. Key press events are synchronous, meaning that when a player's client detects a key press, it sends a message to the host, which sends the message to all clients to fire the event. The delay is a product of latency.
I know that! I'm trying to explain in layman's whats happening under the hood :p
Because it's an RTS engine, not a FPS engine, and therefore doesn't do client-side prediction (which is basically impossible for an RTS, too many things under the control of a player to have any sort of meaningful prediction.)
Well, you could do a work around with skill keys set with the hotkeys being wasd. It'd be really messy, but now you're only checking if a skill in initiated.
@Reves: Go
"This is the basic idea" was directed towards your post, the rest was for the original poster :P
Does it still cause a lot of lag?