News for hackers. Stuff that matters.
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by stuxnet79 on Sunday December 10, 2017 @01:08PM (#15892595)
Very curious about this as well. I was expecting this submission to be an endorsement for WebRTC.
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by meritt on Sunday December 10, 2017 @02:58PM (#15893197)
WebRTC really isn't suitable for multiplayer gaming due to it being entirely P2P. You need the server to operate as a single source of truth and enforce clients to play by the rules.
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by londons_explore on Sunday December 10, 2017 @05:56PM (#15893942)
Having both models works well...

TCP from a master server to every client.

and

UDP low latency links from every client to every other client.

The client code sends a sample of received UDP packets to the server over the TCP connection, who will then verify that all info contained in the packets is true and accurate and nobody was cheating.

It's a nice model because you get the super low latency between clients, and at the same time within a few hundred milliseconds you can detect cheaters and kick/ban them.

Obviously, you have to design your game to handle asynchronous lossy information from many different sources and nobody having a complete and whole view of the game until half a second later or so. Thats quite do-able though by timestamping every event and then running rollback-able or checkpointed synchronous simulation on all clients.

Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by alanning on Monday December 11, 2017 @04:47PM (#15900797)
Know of any games that have implemented this method?
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by lxtx on Sunday December 10, 2017 @03:35PM (#15893359)
It is not entirely P2P, a server can act as a "peer" for all clients and handle the connections itself.
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by gregmac on Sunday December 10, 2017 @09:19PM (#15894719)
I'm not that familiar with WebRTC, but can the server not act as the only peer?
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by TheCowboy on Sunday December 10, 2017 @03:11PM (#15893252)
Is it entirely P2P? It seems like it has use cases for streaming audio and video, where low-latency is desired and dropped packets are acceptable.
Re:Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game by meritt on Sunday December 10, 2017 @03:30PM (#15893338)
Yep. The server provides signaling (who the peers are, what data is being requested/should be snet, etc) but you're absolutely correct: WebRTC primarily envisioned for high-bandwidth peer-to-peer suitable content such as video/audio/file-sharing.

People have tried using it for gaming (e.g. server is the master peer) but it's tenuous and folks should just stick to WS.