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.
- Write rules
- Board
- Online play
- AI opponent
How it works
-
1. Write the rules
npx boardmadang new my-gamecreates a game folder that starts as tic-tac-toe. Inindex.jsyou write the starting board, how a move changes it, whose turn it is, who won, and what to draw.npx boardmadang devshows both players' boards side by side, so you can play both sides and fix things as you go. -
2. Upload it
Upload the zip from
npx boardmadang packon 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. 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.
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
- The code enforces the rules. Illegal moves can't be made, and wins are decided automatically. With tools that only give you a board and pieces, players have to police the rules themselves.
- Everything for online play is there. Matchmaking, rooms, chess clocks, spectating, and replays are handled for you.
- You get an AI opponent. Play alone against an AI trained AlphaZero-style, and see from its self-play games whether the first or second player has the edge. About the AI
- Free and open source. The server and site are AGPL-3.0 and the SDK is MIT, on GitHub. You keep the copyright of the games you upload.
Games you can make
- One-on-one board games where two players take turns
- Boards up to 32×32, placing in cells or on intersections
- Chess pieces, go stones, X and O, and lettered tiles like janggi or shogi pieces
- Placing, moving, capturing, painting, and special actions (buttons such as pass)
Games made on Boardmadang
- Tic-tac-toeFill a row, column, or diagonal first to win.
- Splat ChessChess where every square your piece crosses turns your color. Paint all around an enemy piece to capture it.
- CellmokuGomoku on a board that grows. Play next to your own stones to earn more cells, and stretch the board toward five in a row.
- Twelve JanggiA tiny janggi on a 3×4 board with four pieces each. Captured pieces switch sides and come back.
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.