Ok, first off let me say that I am officially taking this too far but other games do it, so how do they do it?
What I'm talking about is the appearance of zero lag. When I shoot my gun and kill someone in Call of Duty, I'm 90% sure there is still lag there, but its just behind the scenes. My xbox shoots my gun instantly, relays the info, then tells other xbox's that I killed the guy, along with telling that guy he got owned. This way it looks smooth on my screen, then syncs up with everyone else a little later. It looks smooth on their screen because they didn't know I actually shot half a sec earlier. Is this right?
What I want is the same sort of thing: A player presses move, look, or do whatever with their unit, on their screen the unit responds instantly, on everyone elses screen they match up with a periodic trigger to sync everyone together. Think about it, when you press an ability button, the highlight graphic shows instantly, then you get the delayed response from when Bnet registers it. Camera movements are also instant.
I'm just throwing this idea out there to see what others think. Won't work, could work? Obviously I have my own game in mind but there are some other great action games already made that could implement it and make their maps playable. (sorry WASD guys, it just doesn't work well with lag)
I personally feel like it would be too much work for too little benefit if its even possible but who knows, maybe you can just *turn wait for bnet response off* then set something else up to sync.
The problem as far as I know it is you can't register somethings without b.net getting involved, like checking the camera pitch/yaw, keyboard bottoms, including any abilities used. I just don't think its possible unless you can register commands on the client side only and choose what to send over b.net. For first person shooter, everything is done locally on the players computer, the commands are sent one way, and depending on the game, your side knows if you hit the object or not so it can just tell the other players they such and such got hit and died, or in another game I played the shot data was sent and the players side decided if they were in the line of fire or not allowing the players to dodge the hit.
Edit: After thinking about it for a while you could try something like a "what if" system. Although b.net will make a delay every time you use the mouse/bottom/ability and you cannot stop the delay if you can find some way to get a general idea of the delay you could use a system to track previous unit movements and use math to check if the unit was in the line of fire when you tried shooting.
The way fps games host and the way sc2 b.net hosts are two completely different things. This is the reason for the lag in the first place. Bnet basically processes all player inputs where as most fps games your hardware processes inputs into coordinates and things entering the game engine and reports those things to the server. Which then updates the other players.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
The way fps games host and the way sc2 b.net hosts are two completely different things. This is the reason for the lag in the first place. Bnet basically processes all player inputs where as most fps games your hardware processes inputs into coordinates and things entering the game engine and reports those things to the server. Which then updates the other players.
Actually from what I understand, Console games use a 2nd game engine for their online play. I only get this information from when they we're talking about mortal kombat, and what the guys from Bungie(well what used to be bungie, now some microsoft group whos name I forget), Said that they, and most other developers, use different engines for different things, Like an online engine and an offline engine.
Just from what I have heard from devs when talking about their games.
And I think they were talking about reach when the halo team said it, It COULD have been Anniversary(Great game) though not sure.
Actually from what I understand, Console games use a 2nd game engine for their online play. I only get this information from when they we're talking about mortal kombat, and what the guys from Bungie(well what used to be bungie, now some microsoft group whos name I forget), Said that they, and most other developers, use different engines for different things, Like an online engine and an offline engine.
Just from what I have heard from devs when talking about their games.
And I think they were talking about reach when the halo team said it, It COULD have been Anniversary(Great game) though not sure.
Sounds about right. In SC2 there's one engine which communicates with b.net and other players, another for data (units at point, unit is in range to fire weapon), and another for the all the visuals.
Thanks guys, its a little enlightening to hear about this stuff. This is kind of how I thought it worked. And also where some games have the receiving end tell the sender if he got hit, I do recall games where I thought I shot someone only to have them 'teleport' to a different location. Infuriating when it happens, but having my gun shoot when I pull the trigger rather than a half a sec later is better for that game type.
Now with Starcraft some things are done locally. Granted all of them are just visuals, camera, ability buttons lighting up, units highlighting, I was wondering if it was theoretically possible to change that so I could give unit commands and launch abilities or triggers instantly, and just have their visuals displayed on the local machine, then send the data via triggers or whatever to other players to sync up what everyone is doing / did. I have a feeling it would take programming far beyond my reach and a potential being banned for 'hacking' the game.
Basic Online First Person Shooter
An FPS engine calculates mathematical formulae, angles of bullets ricocheting off walls, bullets entering flesh, explosions occurring and hurling glass in x, y and z directions. And ultimately whether or not a player has been hit, and by whom.
All that the network (or the "online engine") needs to know, is the co-ordinates in 3d space which are considered "toBePlayer". The local engine handles everything else (more or less), and simple passes this information across to all players in game.
Summary: it is a very efficient and lag-less method of transmitting as little information as possible, while retaining good gameplay mechanics, graphics, visuals etc.
A Game Like Starcraft 2
It essentially works in the opposite sense to the above example. There is a hell of a lot of information needed to be synced between up to 16 players at once. All units, statistics, health, energy, shields, cooldowns, resources, research progresses etc, unit progress per production structure etc... ALL need to be passed across the network, all the time... ...AND then us custom map makers come along and throw megabytes of triggers, functions and libraries at the already straining network - and expect it to work laglessly.
Summary: To create a synthetic environment which will minimise or create the illusion of 'no lag' - at this stage - would be impossible. The way the Starcraft 2 engine is hard-coded in conjunction with Battle.net2, is pretty much a brick wall in your face.
Conclusion: Your best bet is to wait for Blizzard to optimise their server-side code. Or, the unlikely scenario that we are given even more power within the Galaxy Editor to customise raw data (ie: optimisation).
When you need to send information over b.net, like a WASD system, how does the game deal with it?
Does the game send the information, continue to run, and perform the action at a later time.
Ex: You tell a unit to move, it sends information, unit will continue to move in previous direction until other players reply, then it will tell the unit to move in the new direction.
Also, can you perform local triggers, such as a trigger event responds to someone pressing the W key and in the actions you perform a action for only that player? If you've used GAx3 you can tell actors to move for only one player (locally I think).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok, first off let me say that I am officially taking this too far but other games do it, so how do they do it?
What I'm talking about is the appearance of zero lag. When I shoot my gun and kill someone in Call of Duty, I'm 90% sure there is still lag there, but its just behind the scenes. My xbox shoots my gun instantly, relays the info, then tells other xbox's that I killed the guy, along with telling that guy he got owned. This way it looks smooth on my screen, then syncs up with everyone else a little later. It looks smooth on their screen because they didn't know I actually shot half a sec earlier. Is this right?
What I want is the same sort of thing: A player presses move, look, or do whatever with their unit, on their screen the unit responds instantly, on everyone elses screen they match up with a periodic trigger to sync everyone together. Think about it, when you press an ability button, the highlight graphic shows instantly, then you get the delayed response from when Bnet registers it. Camera movements are also instant.
I'm just throwing this idea out there to see what others think. Won't work, could work? Obviously I have my own game in mind but there are some other great action games already made that could implement it and make their maps playable. (sorry WASD guys, it just doesn't work well with lag)
I personally feel like it would be too much work for too little benefit if its even possible but who knows, maybe you can just *turn wait for bnet response off* then set something else up to sync.
Thoughts?
If I understand right...
The problem as far as I know it is you can't register somethings without b.net getting involved, like checking the camera pitch/yaw, keyboard bottoms, including any abilities used. I just don't think its possible unless you can register commands on the client side only and choose what to send over b.net. For first person shooter, everything is done locally on the players computer, the commands are sent one way, and depending on the game, your side knows if you hit the object or not so it can just tell the other players they such and such got hit and died, or in another game I played the shot data was sent and the players side decided if they were in the line of fire or not allowing the players to dodge the hit.
Edit: After thinking about it for a while you could try something like a "what if" system. Although b.net will make a delay every time you use the mouse/bottom/ability and you cannot stop the delay if you can find some way to get a general idea of the delay you could use a system to track previous unit movements and use math to check if the unit was in the line of fire when you tried shooting.
@GreyHunter4: Go
The way fps games host and the way sc2 b.net hosts are two completely different things. This is the reason for the lag in the first place. Bnet basically processes all player inputs where as most fps games your hardware processes inputs into coordinates and things entering the game engine and reports those things to the server. Which then updates the other players.
@SouLCarveRR: Go
Isn't that what I said? well in not so many words. lol
Actually from what I understand, Console games use a 2nd game engine for their online play. I only get this information from when they we're talking about mortal kombat, and what the guys from Bungie(well what used to be bungie, now some microsoft group whos name I forget), Said that they, and most other developers, use different engines for different things, Like an online engine and an offline engine.
Just from what I have heard from devs when talking about their games.
And I think they were talking about reach when the halo team said it, It COULD have been Anniversary(Great game) though not sure.
Sounds about right. In SC2 there's one engine which communicates with b.net and other players, another for data (units at point, unit is in range to fire weapon), and another for the all the visuals.
Thanks guys, its a little enlightening to hear about this stuff. This is kind of how I thought it worked. And also where some games have the receiving end tell the sender if he got hit, I do recall games where I thought I shot someone only to have them 'teleport' to a different location. Infuriating when it happens, but having my gun shoot when I pull the trigger rather than a half a sec later is better for that game type.
Now with Starcraft some things are done locally. Granted all of them are just visuals, camera, ability buttons lighting up, units highlighting, I was wondering if it was theoretically possible to change that so I could give unit commands and launch abilities or triggers instantly, and just have their visuals displayed on the local machine, then send the data via triggers or whatever to other players to sync up what everyone is doing / did. I have a feeling it would take programming far beyond my reach and a potential being banned for 'hacking' the game.
@GreyHunter4: Go
In short:
Basic Online First Person Shooter
An FPS engine calculates mathematical formulae, angles of bullets ricocheting off walls, bullets entering flesh, explosions occurring and hurling glass in x, y and z directions. And ultimately whether or not a player has been hit, and by whom.
All that the network (or the "online engine") needs to know, is the co-ordinates in 3d space which are considered "toBePlayer". The local engine handles everything else (more or less), and simple passes this information across to all players in game.
Summary: it is a very efficient and lag-less method of transmitting as little information as possible, while retaining good gameplay mechanics, graphics, visuals etc.
A Game Like Starcraft 2
It essentially works in the opposite sense to the above example. There is a hell of a lot of information needed to be synced between up to 16 players at once. All units, statistics, health, energy, shields, cooldowns, resources, research progresses etc, unit progress per production structure etc... ALL need to be passed across the network, all the time... ...AND then us custom map makers come along and throw megabytes of triggers, functions and libraries at the already straining network - and expect it to work laglessly.
Summary: To create a synthetic environment which will minimise or create the illusion of 'no lag' - at this stage - would be impossible. The way the Starcraft 2 engine is hard-coded in conjunction with Battle.net2, is pretty much a brick wall in your face.
Conclusion: Your best bet is to wait for Blizzard to optimise their server-side code. Or, the unlikely scenario that we are given even more power within the Galaxy Editor to customise raw data (ie: optimisation).
Just a question I thought of.
When you need to send information over b.net, like a WASD system, how does the game deal with it? Does the game send the information, continue to run, and perform the action at a later time. Ex: You tell a unit to move, it sends information, unit will continue to move in previous direction until other players reply, then it will tell the unit to move in the new direction.
Also, can you perform local triggers, such as a trigger event responds to someone pressing the W key and in the actions you perform a action for only that player? If you've used GAx3 you can tell actors to move for only one player (locally I think).