Mercury Posted August 13, 2022 Share Posted August 13, 2022 Has anyone tried implementing webRTC to change from a server-client model to a peer-to-peer model? Link to comment Share on other sites More sharing options...
Mercury Posted August 13, 2022 Author Share Posted August 13, 2022 Or maybe Boost::Asio. Link to comment Share on other sites More sharing options...
Stan` Posted August 13, 2022 Share Posted August 13, 2022 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 More sharing options...
Mercury Posted August 13, 2022 Author Share Posted August 13, 2022 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 More sharing options...
vladislavbelov Posted August 13, 2022 Share Posted August 13, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now