Sign in to follow this  
MickeyMouse

Dropping players in P2P lock-step model

Recommended Posts

MickeyMouse    201
I'm wondering what is the typical way of handling dropping nodes when using P2P lock-step networking model. To be more specific, in my case: - game session once started can not be joined - nodes can be dropped at any time (due to many reasons, e.g. network failure) - when node is dropped I still want to continue the game I believe I'm using rather typical lock-step approach in that: - the game is 100% deterministic (i.e. the game state is the same for each frame for each node/machine) - each node captures its input (i.e. keyboard / gamepad state), stores it in an "input buffer" every frame (that's for now, but I want to improve it later so that input capture occurs less frequently than the game update) and then sends it to everyone else - after receiving input for given frame from all other nodes, the input is being applied to the game (so, the input is always delayed by roughly fixed time) Now the main problem in more details: To allow for the game to be continued after node is dropped, all other nodes must agree on what is last input of the dropped node to be processed by everyone. Once agreement is made they also may need to exchange input from dropped node between each other. This is all needed so the game stays deterministic, in particular, dropped node must be removed from the game simulation on the same frame on each (other) node. Also, this gets even more complicated by the fact that other nodes may be dropped in the meantime of making that agreement. So far, I'm coming up with some complex solutions where - after dropping node - each other node requests missing inputs from everyone else. After receiving all missing inputs, the node removal is finalized. There's also some nasty cases when other nodes disconnect at that time which I'm not sure how to handle properly. Let me know if there's anything not clear enough and I'll try to describe the problem a bit better. Thanks for any help. [Edited by - MickeyMouse on February 8, 2010 4:36:33 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this