Make your own board game online

Write the rules of your board game in JavaScript, and Boardmadang handles the board, online matches, replays, and an AI opponent. It's free, and friends join with a single link, nothing to install.

  1. Write rules
  2. Board
  3. Online play
  4. AI opponent

How it works

  1. 1. Write the rules

    npx boardmadang new my-game creates a game folder that starts as tic-tac-toe. In index.js you write the starting board, how a move changes it, whose turn it is, who won, and what to draw. npx boardmadang dev shows both players' boards side by side, so you can play both sides and fix things as you go.

  2. 2. Upload it

    Upload the zip from npx boardmadang pack on the Register a game page. It checks that your code follows the rules every game must follow, plays 200 random games to look for errors, and checks the speed. Win one game against yourself (the clear check), then add a name, a description, and the rulebook.

  3. 3. Play together

    Your game shows up in the game list. Matchmaking, rooms, spectating, and replays work right away. Press "Make an AI" on your profile to get an AI opponent and first-player win rates too.

What a game looks like

A game is one object. You write only the rules, not the networking, the screen, or who the opponent is.

index.js
1export default {
2  id: 'my-game',
3  board: { places: 'cells', rows: 3, cols: 3 },
4  pieces: 'xo',
5  maxActions: 9,
6
7  setup(rng) { // starting state
8    return { board: Array(9).fill(null), turn: 0 };
9  },
10  play(state, player, action) { // illegal move: return the same state
11    const i = action.row * 3 + action.col;
12    if (player !== state.turn || state.board[i] !== null) return state;
13    const board = state.board.slice();
14    board[i] = player;
15    return { board, turn: 1 - player };
16  },
17  turn(state) { return state.turn; }, // whose turn
18  result(state) { return null; },  // { winner } when it's over
19  view(state, player) { /* pieces to draw */ },
20};

When someone clicks a square, both players' browsers feed the same move to play() in the same order. So both always see the same board, and you never write a game server.

What's different

Games you can make

Games made on Boardmadang

FAQ

Do I need to know how to code?
The rules are written in JavaScript. You can start by changing the tic-tac-toe in your new folder bit by bit, or give an AI coding tool the SDK docs and your rules to get a first draft.
Does it cost anything?
No. Boardmadang is a free site run by an individual. Players can also play as guests without logging in.
Who owns the games I upload?
You do. Boardmadang uses them only as far as the service needs, such as matches, spectating, replays, and AI opponents. See the terms for details.
Can I make games for three or more players?
Not yet. Only games where two players take turns are supported.