Hotseat and multiplayer #8
Labels
No Label
2d
3d
bug
discussion
feature
high priority
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wanp/townengine#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Games that are likely to be made in Townengine can benefit from having simple and almost-no-effort multiplayer. Think of something like Worms.
It could be as simple as adding a concept of player ids attached to inputs, so that each client can keep their simulation, without any synchronization or explicit messaging.
One question remains: what method of communication to use for intermachine multiplayer, especially that we are willing to have web builds. Settling down on WebSockets could be good. WebRTC is good, but is not easy to integrate and build.
One problem, - late-join players, or reconnecting ones. They need to somehow get the latest state, but as only way of syncing is inputs, one would need to send them all inputs in history to play them back, which is potentially quite a lot. Also history would grow with time, preventing long sessions, or any game with persistence.
Simple way could be is not to do anything, - if your game requires it, - user must write serialization methods for their state exchange. There could be an api introduced to facilitate raw byte transfer at least.