Game Development
Cờ Tướng Vua
Discipline
Browser Game
A chess army against a xiangqi army on one board, each side on its own rules. Chess has 53 moves to mate. Play the bot at three levels or get paired online 1v1, on a 2D or 3D board.
Play in your browserThe brief
What it is and how it was built.
Cờ Tướng Vua puts the two games Vietnamese players grow up with on one board. The top half holds a chess army and the bottom half a xiangqi army, with the river between them. Neither side borrows the other's rules. A cannon still needs exactly one piece to jump over before it can capture, a horse can still be blocked, an elephant never crosses the river. On the chess side knights jump, pawns promote on the last rank and the king can castle. One rule joins the two: the king and the general may never stand face to face on an open file.
The hard part was balance. A chess army has eight pieces per rank and a xiangqi board has nine files, so the first version left one file empty. Chess now gets a third knight and a ninth pawn, 18 pieces against 16. To stop Chess from simply grinding Xiangqi down, it plays against a clock: mate within 53 moves or Xiangqi wins by holding out. The number came from letting the bot play itself 120 games at each setting. At 60 moves Chess won 64% of games; at 53 it was 57 to 63.
The bot is an alpha-beta search with a capture extension, running in a Web Worker so the board never freezes while it thinks. Super hard searches 5 to 6 moves deep. Online play has no rooms: press Play online and you are paired with the next person who does the same. The Node.js server runs the same rules file as the game and checks every move, gives each move 60 seconds and keeps a dropped player's seat for 20 seconds. It runs in its own container, apart from the website.
The 2D board is drawn on Canvas and is the lighter of the two. The 3D board is built in Three.js with toy-like pieces and three fixed camera angles; free rotation was left out so players never lose sight of the board. Switching boards mid-game keeps the position. Everything is in Vietnamese and English, including Uncle Tu, a sidewalk uncle who comments on captures, checks and results.
Scope delivered
What we delivered.
- 0118 chess pieces against 16 xiangqi pieces on one 9 by 10 board
- 02Each side moves by its own rules, and the king and general may never face each other
- 03Chess must mate within 53 moves, a number tuned over 120 bot-vs-bot games
- 04Bot at three levels; Super hard looks 5 to 6 moves ahead
- 05Online 1v1 with no rooms, and the server checks every move
- 06Flat 2D board and a 3D board with three fixed camera angles, in Vietnamese and English
Category
Game Development
Technology
Canvas 2D · Three.js (WebGL) · JavaScript · Alpha-beta search in a Web Worker · Node.js WebSocket server (Docker) · esbuild
Studio
Golden Sea Studios
Ho Chi Minh City, Vietnam
This project proves
Game DevelopmentA board game that runs straight in the browser, with a three-level bot, online 1v1 on a server that checks the rules, and both 2D and 3D boards.
Have a similar challenge?
Send us a few lines and we will talk it through.
Cờ Tướng Vua is a free game made by Golden Sea Studios as a portfolio showcase, with no real money and no redeemable items.



