DEV Community

Discussion on: How to make an online multiplayer game with JavaScript and Fauna

Collapse
 
crimsonmed profile image
Médéric Burlet

Why would you need a database for a rock paper scissors game? The server can process the data in real time.

Thread Thread
 
seanconnolly profile image
Sean Connolly

For the same reason you use a database for any application, to persist data for future use.

What if I want to know how many games are being played, what % of those are being completed, etc.? What if I wanted to implement an "Undo" capability in a more complicated game? What if I wanted to allow players to save their game and come back later? I would need to store all that info somewhere.

Thread Thread
 
crimsonmed profile image
Médéric Burlet

Very true but in your article it didn't mention that's why I was asking.

To go well with socket.io you can easily use sequelize or keyv.

Socket.io also has native support for rooms and broadcasts if you are thinking of expansion. it also supports high data flows.