A library for creating multiplayer boardgames
Do you want to implement multiplayer turn based game, but replication and visualization is a headache? Worry not, just:
pureboard handle the rest - game is now playable onlinenpm install pureboard
pureboard is a library that allows for easy implementation of multiplayer games, by replicating actions on a state. It's designed for boardgame-like games, but can be used for other projects. It uses zustand for state management, so replicated state on client can be easily used in a React project.
Players are sending actions that can mutate server game state.
First, server tries to apply the action on it's state, and if it's valid, it get's send to all players.
See example directory for example of a online multiplayer connect4 game.
npm install in root directorynpm install in the example directorynpm run dev in the example directory