erlloyd / cardtable

A browser-only project to play a few card games with friends
14 stars 4 forks source link

Add support for switching to websocket-based multiplayer #84

Closed erlloyd closed 1 year ago

erlloyd commented 1 year ago

This allows for localStorage-based switching to a websocket-based implementation for multiplayer.

Websockets, while requiring a dedicated backend service, easily allow for >2 players without complicated additional logic. It also is a more well-documented and supported transport mechanism.

The related backend server code can be found at https://github.com/erlloyd/cardtable-multiplayer-server. The goal of that service is still not to store any state, but just be a passthrough to pass state changes to connected clients.