Even on a LAN the effects of latency can affect game play – it all depends on the nature of the game. Some people argue that your reflexes are not fast enough for the latency on a LAN to matter. That is crap. The latency can cause the screen to redraw with “wrong” information. If the display is synchronized to the video beam then for sure you will get a complete frame of garbage. You will notice that… That is when you will begin to react to the erroneous information. It may take 100ms for your reaction to complete, and the screen may have refreshed with the correct game state by that time, but it is too late.
Depending on the nature of the game most of the time the bogus information won’t be off far enough to matter. But sometimes it might matter, it all depends. Fast-action “twitch” games it would seem are the most vulnerable.
A most interesting thread. I remember reading an article about GT4 on PS2, where this problem was mentioned and stated as one of the reasons for the delay to release. As it stands GT4 supports LAN gaming but not online. I guess they couldn’t solve those >15ms latencies.
I haven’t tried writing an online game yet (on my todo list ), but I would transmit linear & angular positions and velocities and use the velocities to provide local prediction of future position. This requires that all players are time-synched, which is an issue in itself when the round trip delays are variable.
Player to player interactions are still a problem. A sudden swerve to avoid a collision, may not reach the other player until 500ms later (via server), which is obviously ludicrous. Peer to Peer would halve this, which has to be a good thing, but then there’s all the problems with trying to tunnel though NAT routers (or insist that users forward ports). Trouble is even 250ms is way too much latency.
So I suspect that means either:
i) LAN gaming only (or local internet, say on the same cable segment)
OR
ii) No collisions between cars (they just pass through each other)
Maybe one could tart up the no-collision scenario a touch. If your computer detects a collision with another car, it could make a limited authority alteration to your control inputs. i.e. if you ram from behind, your car slows down a touch, if you side-swipe, your steering angle is adjusted slightly to make your track more parallel with the other car. There is however no effect on the other car; collisions are handled locally. This means you can’t ram the other car off the track (unless the collision is also detected locally by the other player’s comp, which also makes a steering correction).
Thus, if the other player attempts to sideswipe you, but you have moved in the meantime, you see the other car make a velocity correction for no apparent reason. If this is a small correction, it will just look like the other driver is swerving to avoid you, rather than as the result of an impact. I reckon this is Ok.
However this raises the question of how large a correction can be made. If it is unlimited then the other car may appear to spin off the track for no apparent reason. Also if you crash into the other car then it is possible that you spin off and the other car appears uneffected.
Limiting the maximum correction to making your track parallel to the velocity of the other car would reduce this weirdness, but there would still be some artifacts in extreme cases. There would also be no spectacular crashes.
Just for you US people, birmingham is about 140 miles away from london. The server tested was in Surrey, which adds another 20 miles. 160 Miles in short…
Im gonna be doing a very rough test today, with collisions, to see if this really is a huge problem and at what ping does it actually become a huge problem. Maybe even have a ping ban so that if players have a ping larger than the maximum allowed for this game, they get banned…Or even sent to another server which is titled “EXPECT LAG!”
Hummm. On coming into a sharp curve, the last transmitted velocity may be straight ahead. Due to latency at the other end, this could result in the predicted position appearing to be off-track on the other players’ computers, when in reality the first player made it round the curve. This would appear as cars skidding off & then miraculuously jumping back onto the track.
One solution is to cause all remote cars to slide round the track edges, unless a positive off-track position is reported from the remote players computer. There will still be some position jumping as cars go round the track though.
Another possibility is to have all cars belonging to remote players being driven by the same program as is used for computer cars in a single player game. When a position/velocity fix comes in, the car data is updated. This means that cars will try to go round the curves on the best track available from the current position/velocity. If the remote player provided position/velocity is such that there is no way to stay on track, the predicted path will now go off-track. This looks like a fair solution.
Another approach is to put a delay on remote cars. That will give them a chance to send their real positions before you start guessing what they did. The local car would be ahead in time of the other cars, but it would reduce the jumpingness of correcting extrapolated positions.
That would work, although there could be arguments about who has won, since you could visibly come in first, when in real time you are behind the other player.
The main trouble with multi-player is of course finding some long suffering friends to test it with you
I know a couple of people with a terminally ill condition known as “TestWhatDPMakes”. Its a rare and tragic disease… :
I did a couple of tests across birmingham today (<10ms ping), and it doesn’t seem to be a problem! I gotta test it to london tomorrow, see how much it is affected…
Does that translate to: “Give the local player a head start.” ???
In which case everyone thinks they are in the lead, only to find out at the end who really won. Collisions between cars can’t make sense in that case. Each local machine would have a different state entirely. E.g. player 2 thinks they bumped player 1, but player 1 thinks he is far away from player 2. Whose car bounces? On which screen does the bounce show?
Thanks for the suggestions everyone. Its been really helpfull.
Me and my mate implemented a PeerToPeer network for the game and it seems to be keeping up to the job with a ping of no more than 20 across the UK with around 10 people playing. So its looking up and the collisions are better now.
I think it is only cable modem users who see pings that low here. ADSL gives a ping of more than that just getting to the local exchange. It also helps that cable modems here are bandwidth limited to relatively low values (3MB/s max, and most are 1MB/s). This helps because the bandwidth limiting doesn’t kick in for a second or so, meaning that small packets go at the real modem speed.
You sure? Because my mate (who actually implemented the SuperServer) is on ADSL in surrey (virgin is his ISP)…
Mark, would you mind if you ran a little networking test to see your ping with small packets? I’d like to see the pure ping between my connection and yours…I’l PM you the details if your not busy?
I don’t mind doing a test. I have cable at home and ADSL at work. From work a ping to the BBC is currently averaging around 26ms, whereas at home it is often down to around 14ms. You can contact me at mthornton at optrak.co.uk (not sure why I bother to disguise that, every spammer in the universe already has the address).
Hmm. I think you need a new DSL provider :P. Typical worst-case response for me is 14ms onto the provider’s network (their dsl-router.blah.blah etc) and 15-24ms for any sites that have good connectivity to them (e.g. stuff in LINX/telehouse/etc). This has been the same with each of the last 3 providers I’ve had in 3 places around the UK a bit more than a hundred miles or so apart.
e.g. sitting in a house in a private road several miles from the nearest village (population circa 500) marooned in the countryside I’m getting sub-20ms pings getting beyond LINX.
Random reasonably large UK sites, including ones I know are hosted in non-London towns like e.g. Cambridge, I’m getting sub-25 ms pings.
…OTOH, IME cable providers in the UK (I’ve had IIRC 4 in 4 different towns/cities) have generally had basic ping of 35ms to get to the provider, and typically 40ms to get anywhere close, 55-65ms to get anywhere interesting. However, it’s been more than 2 years since I last had a cable modem, so my knowledge there is probably way out of date :).
Given that from work it is 26ms ping to the nearest visible bit of BTs infrastructure, changing ISP would be pointless. No unbundled lines available, and NTL can’t get a line in to the premises (can’t get wayleave).
My 400ms number is from a number of years ago (my TEN days). Its possible ISPs have imrpoved or ebven the infrastructure has imrpvoed some what. We were also dealing mostly with analog modems which have their own issues and problems, but AIR that 400ms high end spike was somethign we even saw over ISDN liones. It was rare but we’d see it.