Ask HN: Any multiplayer game synchronisation experts on HN?
2 comments
I've built something similar and your architecture sounds just fine. With websocket you are able to send the state to the server and just share it across clients.
Maybe you have clients disconnecting and reconnecting with a new id? You need to have a mechanism for identifying browsers (eg. storing something in localStorage)
Given you mention video chat, I wonder if you're relying on webrtc + websocket for signalling. In that case communication between clients would be p2p and a reconnection handled incorrectly could cause state to be lost.
But I'm just guessing.
HN is probably not the right place to get support for this though.
Given you mention video chat, I wonder if you're relying on webrtc + websocket for signalling. In that case communication between clients would be p2p and a reconnection handled incorrectly could cause state to be lost.
But I'm just guessing.
HN is probably not the right place to get support for this though.
Not me. But you could try posting on r/gamedevs for some help maybe.
My game communication interface currently uses websockets and engages a retry mechanism with message acknowledgement, so a message gets resent if the ack fails to arrive within a short period of time. Does anyone know how html5 online multiplayer games like those listed above maintain their state no matter what? can anyone see a problem with my websockets implementation?