Hadang
A two-player strategy board game with realtime online matches, private rooms, local play, and three bot difficulty levels.
- Role
- Creator & Engineer
- Status
- Live
- Stack
- Next.js
- TypeScript
- Convex
- React
- Zustand
- TailwindCSS
- Motion

The problem
Keep moves, wall placement, and clocks consistent across online players while making the same game approachable on one device.
What changed
Players can find an online opponent, invite a friend, share a device, or practice against bots, then revisit online matches through step-by-step replays.
Context
Hadang turns a simple choice into a strategy game: move a pawn toward the opposite side of a 9 by 9 board or place a wall to slow the other player. The experience needed to support quick practice, face-to-face play, and online competition without making players learn separate interfaces.
Engineering decisions
Built a shared TypeScript game engine for legal moves, pawn jumps, wall conflicts, and path validation so every player always retains a route to the goal. Used Convex for realtime matchmaking, private rooms, and server-authoritative online actions and clocks, with reconnect handling. Added local pass-and-play, three bot difficulty levels, match history, player statistics, and replay controls around a responsive Next.js interface.
My contribution
- Built the game engine, responsive board interface, and realtime online match flows.
- Validated wall placement against overlaps and blocked paths while supporting pawn jumps and timed turns.
- Implemented matchmaking, private rooms, reconnect handling, resignation, and rematches with Convex.
- Added local pass-and-play and untimed practice against three bot difficulty levels.
- Built match history, player statistics, and step-by-step replays with recorded clocks and wall ownership.
- Added an installable PWA with an offline shell and reduced-motion support.
Trade-offs
- Online actions and clocks are validated on the server to keep both players consistent; local games run on the device.
- The offline cache supports local play while live room and match pages require a connection.
Lighthouse
- Performance
- 96
- Accessibility
- 100
- Best practices
- 100
- SEO
- 100
Mobile test of the home page, median of three runs, on . Scores vary between runs and devices.
Next project
Questions about this work?
Ask the assistant, or email me directly.