Skip to content

boardgame.io

A JavaScript engine for turn-based board games, with built-in multiplayer and state syncing.

Stars
12.5k
Forks
836
Licence
MIT
Language
TypeScript
Last update
7 days ago
Type
Library

What it is

boardgame.io is a JavaScript engine for building turn-based games. You write functions that describe how the game state changes when a player makes a move, and the library turns that into a playable game. According to the README, it handles online multiplayer and state syncing across clients and the server so you do not have to write networking or storage code yourself.

  • Create a turn-based multiplayer game where players take turns making moves
  • Simulate moves to test game rules before building the interface
  • Use the built-in bots (AI) to play against or to test your game
  • Organize game phases with different rules and turn orders

Great for

  • Developers building turn-based board or card games for the browser
  • Prototyping a game's rules before investing in a full user interface
  • Teams wanting multiplayer without writing their own networking layer
  • Developers using React or React Native who want a ready-made game client binding

Not ideal for

  • People who want a finished game to play out of the box; this is a toolkit for building games, not a game itself
  • Real-time action games, since the project is focused on turn-based play
  • Non-programmers, because the library is used through JavaScript or TypeScript code
Step-by-step guide: how to use boardgame.ioInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js and npm

    Install the library from npm

    npm install boardgame.io
  2. 2

    Run it

    • Install the package with npm install boardgame.io
    • Read the full documentation at boardgame.io/documentation to learn the game definition format
    • Define your game's moves and state as functions
    • Run the examples in the examples folder using npm install and npm start from the repository
  3. 3

    Get the most out of it

    • Use the lobby feature for player matchmaking and game creation
    • Use the prototyping interface to simulate moves before building the UI
    • Use the bots to test your game logic automatically
    • Add plugins to extend the engine with new abstractions
    • Use the game log time travel to review earlier board states

Downloads

Strengths

  • Multiplayer and state syncing are handled by the engine, per the README
  • Works with the vanilla JavaScript client or React and React Native bindings
  • Includes game logs with the ability to view earlier states

Trade-offs

  • Scope is limited to turn-based games, as stated in the description and README
  • The README is brief on setup details; the full documentation at boardgame.io holds most of the guidance
  • No formal release is listed, so you would be relying on the main branch or npm package versions

How it compares

ProjectStarsTypeLevelUpdatedBest for
boardgame.io (this)12.5kLibraryintermediate7 days agoDevelopers building turn-based board or card games for the browser
entt13.2kLibraryadvanced4 days agoC++ game developers who want an ECS
JoltPhysics12.1kLibraryadvanced5 days agoC++ game developers who need a physics engine for rigid bodies and collisions
flame10.8kLibraryintermediate4 days agoFlutter developers who want to add a game to an app
godot119kAppbeginner7 days agoIndie game developers who want a free engine with no royalties
react-hook-form44.9kLibraryintermediate5 days agoReact developers building forms with several fields

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.