   The Kaillera Method
  Hello,I think most of you know the multiplayer platform for emulators, Kaillera. As the games that are played through an emulator weren't designed to be LAN/internet games, Kaillera has to do the necessary stuff from the outside and maintain synchronicity (I noticed that the games sometimes "lag" a bit to keep both players in sync).My question is: What is the basic principle of how Kaillera handles this? Is it just sending user input along with the emulator's CPU cycle, current frame or something like that (as a timestamp), and how can it keep the game in sync when there's e.g. a ping of 100ms? And do you think that principle could be adopted for "native" games, thus maybe making network programming and syncing easier (with the disadvantage of occassional lags, which could maybe also be "smoothed" when you're directly coding the game instead of just providing networking for an existing emulator game)?   
Quote:What is the basic principle of how Kaillera handles this?FAQ explains it. Each player sends keystrokes, server repeats them to all other clients.There doesn't seem to be any synchronization or latency compensation being done. Quote:Each client blindly assumes the other clients have exactly what it has.Quote:And do you think that principle could be adopted for "native" gamesNot really. Even the simplest networking done "natively" will be more robust.   ;  Well that's strange... I'd swear that the games lag sometimes (it's been a while since I played a game over Kaillera), also, the game would be a complete disaster with pings even greater than 1/60s (assuming that's the frame rate of the emulated system), because they'd completely drift apart.I can't imagine the whole thing working with no syncing in any form...   ;Quote:Original post by ZeHaI can't imagine the whole thing working with no syncing in any form..."Syncing" in this context means "explicitly sending the full state of the emulator around". Even though that isn't done, input is timestamped and applied to all clients at the same time.   ;Quote:input is timestamped and applied to all clients at the same timeWhich means that, if some data is lost and has to be re-sent, everyone has to wait for the re-send, causing lag. You can sometimes see this in RTS games like Starcraft, Warcraft etc as well.;  kaillera uses a tcp server/ client connection.Basically the users must wait until their recieve the answers of input sent.With 100ms ping is playable but with a ping 200 ms it sucks for playing games like street fighter in kailera.I remember i played in kailera some years ago. with a ping  higher than 100 was very annoying thats why i quit playing kailera.   