Clark Lavery

Clark Lavery

Web, Games & Graphics Programmer

Knights & Crosses

Knights & Crosses

Tic-tac-toe played as a war. Up to four factions secretly deploy soldiers across a three-by-three board of terrain, lock in, and the whole board resolves at once.

How it plays

  • No turns. Everyone splits the same army across the board at the same time. When all sides have locked in, each square goes to whoever committed the most soldiers to it.
  • Every square has its own rules. A swamp gives no base points, and an obelisk loses a point for each friendly square next to it. Completing a line is worth 3 more.
  • Four factions. Knights, Crossborne, Torchbearers and Starbound. Play against the computer, pass one device around, or play online with friends.
  • A campaign of nine territories, each a battle in a different biome, with a shared reserve of soldiers to spend across the whole campaign.

How it's built

  • The AI treats each battle as a Colonel Blotto problem, the game-theory model of splitting forces across many fronts at once. It searches in a web worker and has several difficulties and eight personalities, all tuned by benchmarking it against itself in simulated games.
  • Online play is peer-to-peer over WebRTC. A commit-and-reveal lock-in means no player, including the host, can see a deployment before it is locked. A TURN relay on Cloudflare connects players behind strict networks.
  • Svelte 5, TypeScript and Vite, shipped as an installable PWA that works on a phone or a desktop.