boardgame.io helps you build turn-based games in JavaScript by describing moves as functions. It handles game state, storage, and online multiplayer so you can skip low-level networking code.
Overview
boardgame.io is a JavaScript engine for creating turn-based games such as board games, card games, and tabletop-style experiences. You write simple functions that define how game state changes when a move is made; the engine turns that logic into a playable game with synchronized state across clients.
Built-in capabilities include coordinated state across clients and server, real-time multiplayer sync across platforms, optional AI bots, game phases with different rules and turn orders, a lobby for matchmaking and game creation, and a prototyping interface to simulate moves before you build a full UI. A plugin system supports extensions, and you can use a plain JavaScript client or bindings for React and React Native.
Game logs support reviewing earlier board states. Installation is via npm for use in your own game projects. The engine targets developers who want structured turn-based game logic with networking and persistence handled by the framework rather than written by hand.
Key features
- Automatic game state management
- Real-time multiplayer synchronization
- Auto-generated AI opponents
- Multi-phase game rules
- Player lobby and matchmaking
- Move prototyping without full UI
- React and React Native bindings
- Time-travel game logs
Use cases
- Online board game prototypes
- Card game multiplayer apps
- Turn-based tabletop digital versions
- React-based browser games
- Cross-platform mobile turn-based games