Have more questions? Join our Discord

How a game works

What Boardweaver is

Boardweaver is a website where designers build digital board games and people play them online: with friends, at events and in playtests. A designer, or a coding agent working for one, builds a game through the Boardweaver MCP server.

Word Meaning
game One board game on Boardweaver: its source files, art, pages and theme. MCP tools name it by gameDefinitionId.
commit A saved version of the game's files. The commit tool refuses a version that does not build or whose unit tests fail (Testing a game).
beta channel The game's newest commit. Only the game's members can play it.
published version The commit the designer releases to every player.
studio The part of the website where a designer edits a game, commits it and reads its match errors.
lobby Where players gather before a match: they pick the game and its version, and take seats.
match One play of a game at one commit, from setup to game over.

The two halves of a game

A game has two halves:

  • Game logic in Rust, in /src/lib.rs and the modules it declares. They decide every move.
  • A client in React, in /src/frontend.tsx. It draws the board from what the game logic allows and sends the player's moves.

The game logic never draws anything. The client never decides a rule.

Every new game starts as tic-tac-toe. Read both halves with get_example: tic-tac-toe-rust and tic-tac-toe-rust-client.

Words every section uses

Word Meaning
seat One player in the match, named by a PlayerId. A PlayerId is an opaque number: never assume it is 1, 2, 3.
view What one seat sees of the state, without anything the seat may not see. A spectator gets a view too.
offer One legal move for one seat: an Offer, which is an action, an intent and a label.
intent What an offer does to the seat's open decision: choice, confirm or cancel.
step One offer the seat took.
decision The steps a seat sends together, as one move.
draft The steps of the open decision, already shown on the seat's board and not yet sent.
reveal A step whose result depends on something the seat cannot see, such as the top card of a deck.
game functions The six functions of the Game trait that a game writes. A trait is Rust's name for an interface.

One move, start to end

  1. Boardweaver sends each seat its view.
  2. The client shows the seat's offers, which the game logic's offers function returned.
  3. The player takes an offer. A choice or cancel step joins the draft and shows at once.
  4. A confirm step, a step that draws randomness, or a reveal ends the decision. The client sends the decision to Boardweaver.
  5. Boardweaver applies the decision with the game logic, saves it, and sends every seat its new view.

How decisions and drafts work is in Offers, intents and decisions.

Which section answers which question

Question Section
How do I build a game, start to finish? Build a game
What can the state hold? The state
How do the game logic and the client read one copy of a table or card list? Data files
Who sees what? Hidden information
What must each game function do? The game functions
How does the game logic change the state? Changing the state
How do I offer moves and tag intents? Offers, intents and decisions
How do I shuffle, roll or draw? Randomness and determinism
How do I write a computer opponent? Bots
How do I check my game works? Testing a game
Why did a build or a match fail? Builds, limits and errors
How do I draw the board? The React client, boardweaver/react reference
How do I write the rules pages, the marketing page or the theme? Write the rules pages, Write the marketing page, Design the theme