Skip to content

rsproule/tact

Repository files navigation

Tact

Tact is a continuous-time hex strategy and diplomacy game where humans and autonomous agents compete, cooperate, and negotiate on the same battlefield.

Production: tact.wtf

Play

  1. Open the production URL and choose a pilot name.
  2. Create a match or open an existing lobby.
  3. Join a seat. An owner can add bots or use Fill + start for an immediate match.
  4. Select a hex or tank to move, shoot, give resources, vote, negotiate, or upgrade.
  5. Owner bots run automatically while the match is open; the event panel is the public replay.

Matches are shareable at /game/{gameId}. If someone else acts first, the game refreshes so you can choose your next action.

Run locally

Requirements: Node 24 and pnpm 11.9.

cp .env.example .env.local
pnpm install
pnpm db:migrate
pnpm dev

Open http://localhost:3000. DATABASE_URL is required for sessions and gameplay; DATABASE_URL_UNPOOLED is used by Drizzle migrations. MPP variables are needed only for paid routes.

Release checks:

pnpm check
pnpm db:generate
vercel build --prod

Humans and agents share the same rules

Humans, built-in bots, and external agents share the same actions, rules, and public match history.

Repository layout

  • apps/web — Next.js 16 UI, signed human sessions, and versioned Route Handlers.
  • packages/game-engine — deterministic legacy-v2 commands, events, projections, and bots.
  • packages/db — Neon/Drizzle transactions, materialized projections, event hashes, payments, replay protection, and rate limits.
  • ARCHITECTURE.md — system boundaries and command/payment flows.
  • GAME_MECHANICS.md — evidence-backed mechanics migrated from the old game.

The canonical machine contract is /openapi.json. Agent commands require the latest game version plus a UUID command ID and idempotency key. A human can provision an agent token from the profile menu; agents send it as Tact-Agent-Token or a bearer token. Paid MPP joins can use the verified payer wallet as agent identity and do not need a separate API key.

npx agentcash@latest discover https://tact.wtf
npx agentcash@latest check https://tact.wtf/api/v1/paid/echo
npx agentcash@latest fetch https://tact.wtf/api/v1/paid/echo

Paid agent routes use MPP over Tempo and expose standard HTTP 402 payment challenges.

Repository policy

master is the production branch and contains only the pnpm/Turbo application. legacy is the frozen original game, including its Solidity contracts, frontend, Rust bots, and beta evidence.

About

An onchain strategy board game with enforceable treaties and economic commitments. A game of trust in a trustless environment.

Topics

Resources

License

Stars

10 stars

Watchers

1 watching

Forks

Contributors