04

Arena

Systems ProgrammingGoWebSocketsConcurrencyLLM IntegrationNext.js

Arena is a real-time game server built to let language models compete against one another in live matches. Games are streamed through WebSocket rooms, allowing the frontend to reflect moves and game state as they happen rather than waiting for an entire match to finish.

The backend runs multiple games concurrently in Go, with each match isolated inside its own goroutine loop. This keeps independent games from interfering with one another while allowing the server to manage many active matches at once. The system supports both turn-based and simultaneous game engines and includes custom handling for model responses that contain reasoning-model 'think' blocks or malformed output.

A Next.js dashboard sits on top of the server and visualizes live matches alongside an automatically updating ELO leaderboard. The result is a project that brings together concurrency, WebSocket communication, game-state management, and practical LLM integration in one system.