Jump to content

peer to peer, webRTC


Recommended Posts

4 hours ago, Mercury said:

Has anyone tried implementing webRTC to change from a server-client model to a peer-to-peer model?

What do you want to achieve exactly, the game uses P2P lockstep (as in everyone computes everything), but it has only one CNetServer to reduce the need for everyone to have open ports.

Link to comment
Share on other sites

Currently everyone sends their commands to the server who then collates them and sends them out to everyone. Peer to peer would skip the server step and thus reduce latency by half and traffic by more then half. As an added bonus, the game would not end when the host disconnects.

Link to comment
Share on other sites

34 minutes ago, Mercury said:

Currently everyone sends their commands to the server who then collates them and sends them out to everyone. Peer to peer would skip the server step and thus reduce latency by half and traffic by more then half. As an added bonus, the game would not end when the host disconnects.

It's more tricky. In a regular implementation peer2peer increases traffic from a single peer and total traffic isn't halfed, usually it's mostly the same as with client-server. Also local state modifications (cheating) and host migration are easy things to abuse.

Link to comment
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
 Share

×
×
  • Create New...