pheyvaer / solid-chess

A decentralized chess app build on top of Solid.
https://pheyvaer.github.io/solid-chess/
MIT License
51 stars 12 forks source link

Realtime chess #38

Closed scenaristeur closed 5 years ago

scenaristeur commented 5 years ago

Can't you use solid'/Notification or solid'/websocket first to use realtime, and if the opponent is not connected send to mailbox ?

pheyvaer commented 5 years ago

I use notifications to synchronise the boards. It does have a delay of 5 seconds, because the interval between two checks of the inbox for new notifications is set to 5 seconds.

You could set up a websocket connection between two running applications, but you will need to let others know that a user is online (which you could do via notifications again). The question is, however, if in this case the increased number of notifications, as people switch between games often maybe, is justified. In the case you would be dealing with like an FPS, RTS, MMO, then yes websockets would be better I think, considering that there is a lot more data shared among the players.