re: [GD-General] Online Gaming
Brought to you by:
vexxed72
From: George W. <ge...@ap...> - 2003-01-24 18:22:06
|
On Thu, 23 Jan 2003 21:42:43 +0000 (GMT), =?iso-8859-1?q?Andrew=20Sharpe?= <ash...@ya...> wrote: > After getting my PS2 network adaptor I've been playing SOCOM online for the > past few days. Today though I put on a copy of Tony Hawk4 and was pretty > surprised with how it played online. Even on what I'd consider to be laggy > servers (200-250 ping) the game seemed remarkably fluent and consistent, i.e. > no warping players. Although I've played lots of FPS games which usually use a > client/server architecture I'd never really played a fast-paced peer-to-peer > game and always assumed that on anything other than LAN or fast broadband the > game would suffer. Although I'm familiar with how C/S architectures work and > how the effects of latency can be compensated for, I've never really given P2P > much thought before in terms of how games can achieve a smooth playing > experience, or even how their network update is structured. Possibilities I > can think of for fast action games using P2P: a) Clients are fully > deterministic and perform a lock-stepped update based on inputs from all > clients. For instance all clients perform their physics update based on inputs > from clients during frame 180 and obtain identical results. Problems: this > means that there's a delay between input & response, even on the local client, > of around half the ping time to the slowest machine. Not too good I'd imagine > on a slow connection. b) All clients send their essential information > (position, orientation, etc) and run their physics based on the last, or > extrapolated details of other players. Problems: clients may come up with > slightly different results due to extrapolated data for other players (e.g. > the client colliding with another vehicle). There's also the problem of > non-player entities in the world, for instance a crate, which may end up with > different positions on different machines if some form of correction is not > performed to remove errors due to the above problem. SOCOM rules! ;-) I've had several times when it looked like I missed a jump (actually started falling down cliff or building, etc.) but then suddenly flashed to the "made it!" position. I would definitely say it's case A (deterministic, lock-step). > There's probably other problems or solutions I've not thought of though! I'd > be very interested in comments from people who've implemented P2P solutions in > games aimed at the online market though, especially to do with how they > handled game world physics and physical non-player entities. Very fascinating > subject. Thanks, Andrew I'm also interested in client/server solutions. How are packets bundled/unbundled into/out of streams? Do developers use sync or async code? Callbacks or runloops? Do you open separate pipes for different queries or is there one client/server stream that all transactions go thru? Inquiring minds want to know! ;-) Can anyone recommend any good "Programming Network Games" books? -- Enjoy, George Warner, Mixed Mode Magic Fragment Scientist Apple Developer Technical Support (DTS) |