# boardgameio/boardgame.io

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/boardgameio-boardgame-io).**

12,261 stars · 811 forks · TypeScript · mit

## Links

- GitHub: https://github.com/boardgameio/boardgame.io
- Homepage: https://boardgame.io
- awesome-repositories: https://awesome-repositories.com/repository/boardgameio-boardgame-io.md

## Topics

`boardgames` `game-engine` `javascript` `multiplayer` `react` `react-native` `tabletop` `turn-based`

## Description

Boardgame.io is a framework for developing turn-based, multiplayer games for the web. It functions as a game engine and orchestrator that manages the complexities of state synchronization, player turn order, and rule enforcement across a distributed network of clients.

The framework utilizes pure functions to handle state transitions, ensuring that game logic remains predictable and consistent for all participants. By structuring game flow into hierarchical phases and turn-based segments, it automates transitions and enforces rules, preventing illegal moves while maintaining a synchronized view of the game state across all connected clients.

The system supports responsive user interfaces through optimistic updates, allowing clients to predict and display move outcomes locally before receiving server confirmation. It provides a comprehensive set of tools for managing game flow, including the ability to subdivide turns into stages and trigger automated events to advance gameplay.

## Tags

### Game Development

- [Asynchronous Game Frameworks](https://awesome-repositories.com/f/game-development/game-engines-frameworks/asynchronous-game-frameworks.md) — Provides a comprehensive framework for building turn-based games with managed state and logic transitions.
- [Turn Orchestration Systems](https://awesome-repositories.com/f/game-development/turn-orchestration-systems.md) — Designate control to specific players for a sequence of moves before automatically passing the turn to another participant to maintain orderly and fair gameplay. ([source](https://boardgame.io/documentation/))
- [Game Development](https://awesome-repositories.com/f/game-development.md) — Provides a framework for building turn-based multiplayer games with integrated state and rule management.
- [Game Engines](https://awesome-repositories.com/f/game-development/game-engines-frameworks/game-engines.md) — Acts as a JavaScript game engine for creating web-based games with consistent rule enforcement.
- [Game Flow Orchestrators](https://awesome-repositories.com/f/game-development/online-multiplayer/game-servers/game-flow-orchestrators.md) — Execute automated actions to advance progress by ending turns or transitioning between defined segments to keep the game moving forward for all participants. ([source](https://boardgame.io/documentation/))
- [Game Rule Validation](https://awesome-repositories.com/f/game-development/game-engines-frameworks/game-engines/game-rule-validation.md) — Enforces game rules and automates flow sequences to prevent illegal moves in digital tabletop gameplay. ([source](https://boardgame.io/documentation/))
- [State Synchronization Engines](https://awesome-repositories.com/f/game-development/online-multiplayer/game-servers/state-synchronization-engines.md) — Distributes game data between clients and servers to ensure a consistent view of turn and player status. ([source](https://boardgame.io/documentation/))
- [Turn Stage Managers](https://awesome-repositories.com/f/game-development/turn-orchestration-systems/turn-stage-managers.md) — Provides granular control over game flow by subdividing turns into distinct, rule-enforced stages. ([source](https://boardgame.io/documentation/))
- [State Management Patterns](https://awesome-repositories.com/f/game-development/open-source-games/game-data-repositories/state-management-patterns.md) — Updates game data using pure functions to maintain a reliable history of moves and actions.
- [Phase Configuration Modules](https://awesome-repositories.com/f/game-development/game-engines-frameworks/game-engines/game-rule-validation/phase-configuration-modules.md) — Groups game logic into distinct segments that override rules for moves or turn order. ([source](https://boardgame.io/documentation/))

### Web Development

- [Multiplayer Synchronization](https://awesome-repositories.com/f/web-development/multiplayer-synchronization.md) — Synchronizes game state between servers and clients to ensure all participants see the same data.
- [State Synchronization](https://awesome-repositories.com/f/web-development/state-synchronization.md) — Maintains consistent game state across distributed clients and servers using incremental updates.

### User Interface & Experience

- [Optimistic UI Patterns](https://awesome-repositories.com/f/user-interface-experience/optimistic-ui-patterns.md) — Provides responsive user interfaces by predicting move outcomes locally before server confirmation.

### Software Engineering & Architecture

- [Functional State Management](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/functional-state-management.md) — Calculates state transitions using deterministic pure functions to ensure predictable game logic.
- [Event-Driven Architectures](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures.md) — Automates game flow transitions and rule enforcement through an event-driven architecture.
- [Game Phase Structures](https://awesome-repositories.com/f/software-engineering-architecture/hierarchical-configuration-frameworks/game-phase-structures.md) — Structures game logic into nested phases where specific rules and move sets are dynamically applied.
