Open Source — Google Boardgame.io
State Management for Turn Based Games made easy

Hey everyone, today I want to show you a trending open-sourced repository on GitHub — Google’s boardgame.io.
Boardgame.io is a state management package for turn based games. Or as Google puts it:
The goal of this framework is to allow a game author to essentially translate the rules of a game to a series of simple functions that describe how the game state changes when a particular move is made, and the framework takes care of the rest. You will not need to write any networking or backend code.
No pun intended — but this is a game changer. This drastically reduces the barriers to entry for anyone, anywhere, that wants to create a turn based solo/multiplayer game for users all over the internet.
Features
- State Management: Game state is managed seamlessly across browser, server and storage automatically.
- Prototyping: Debugging interface to simulate moves even before you render the game.
- Multiplayer: All browsers connected to the same game are synced in real time with no refreshes required.
- Logs: Game logs with the ability to time travel (viewing the board at an earlier state).
- UI toolkit: React components for common game elements (cards etc.).
How it Works
Game state is managed in two objects. These objects are available on both the client and server and boardgame.io syncs them seamlessly. All you have to do is define functions that tell the state how to change when certain actions/moves occur.
In case this is still a little confusing, Google has created a great tutorial on how to use boardgame.io. The tutorial will walk you through setting up a tic-tac-toe game to work with react and boardgame.io. Here’s the final project of what you’ll learn how to build:
Check out Google’s boardgame.io on GitHub if you want to code turn based board games with JavaScript!
Closing Notes:
Thanks for reading! If you’re ready to finally learn Web Development, check out The Ultimate Guide to Learning Full Stack Web Development in 6 months.
I publish 4 articles on web development each week. Please consider entering your email here if you’d like to be added to my once-weekly email list, or follow me on Twitter.