Mercury Posted August 13, 2022 Report Share Posted August 13, 2022 Has anyone tried implementing webRTC to change from a server-client model to a peer-to-peer model? 1 Quote Link to comment Share on other sites More sharing options...
Mercury Posted August 13, 2022 Author Report Share Posted August 13, 2022 Or maybe Boost::Asio. Quote Link to comment Share on other sites More sharing options...
seeh Posted August 13, 2022 Report Share Posted August 13, 2022 (edited) no i ddnt. but i know https://matrix.to/#/#jojiiMail:matrix.jojii.de is per to peer and also syncthing.net mastadon also i think https://social.tchncs.de/web/@play0ad@mastodon.social ah you proably dont need it for chat. ah 'Boost.Asio is a cross-platform C++ library for network and low-level I/O programming' maybe matrix: " it is designed to function in real-time, which means it is ideal for building systems that require immediate exchange of data, such as Instant Messaging "https://matrix.org/docs/guides/introduction Edited August 13, 2022 by seeh Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 13, 2022 Report 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. Quote Link to comment Share on other sites More sharing options...
Mercury Posted August 13, 2022 Author Report 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. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted August 13, 2022 Report 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.