-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suitable For Multiplayer Game State Sync? #2
Comments
What kind of game? WebRTC has a bit of latency but probably not enough to cause any issues with what you're doing. |
I am more concerned about hyperlog + redux - I guess the server would send updates every 100ms or so. I just will have to try I guess :> |
I have not profiled the latency. It is certainly low enough to work for some games. I am really loving generals.io and it would work well for that kind of game. Please let me know if you profile the round trip time. I have written another reducer So there are two logs one for key presses that does not get garbaged and can be used for replays and one for game state positions, velocities etc we keep this as short as possible. When new clients connect they receive a copy of the consensus state from a peer i.e. the latest frame that we know will never change. All other peers are informed of the new comer and send any actions after the consensus. Then the newcomer becomes a normal peer. This should work for up to about 10 peer there is no swarm so traffic grows factorially with number of players. But the engine should be general purpose enough for any arcade game. I will see if I can dig it out. I have not tested it properly but think I got it working. |
I found it and pushed it here: |
You are totally awesome man! I will look into it, Thanks! |
Title says it :)
Sorry if it is a stupid question.
Very Interesting Project!
The text was updated successfully, but these errors were encountered: