You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Think chess. Like what is the backend services/functions you would need to implement a multiplayer chess game, where one player makes a move and pass it on to another player through some kind of service. We don't need to implement server side game engine implementation to start with, but rather a set of services/functions to pass "game state" from one player to another.
Example how it could be implemented
Game state is encoded in any way the client likes. Perhaps JSON but other will also work.
Clients can send state to a SessionId. The SessionId identifies the multiplayer session, most often returned by the match making service.
Every time a new game state is submitted the session state will have a new and updated StateId. The StateId is returned everytime game state is submitted.
Clients can pull latest StateId for a specific SessionId. This allow the clients to "pull" for changes. If any change has occurred, then the StateId will not be the same as the last knows StateId.
As soon as a client figure out the state has changed it can pull/get the last state.
It's then going to be up to the clients and the encoded state to contain information about things like: what does the state mean, who is next to make a move, etc.