Jump to content
  • Advertisement
Sign in to follow this  

Dropping players in P2P lock-step model

This topic is 3054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!