FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
malcolmocean
malcolmoceancogs-clippies-1
Public
Like
cogs-clippies-1
Home
Code
5
backend
3
frontend
4
shared
2
README.md
H
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
https://malcolmocean--ce62fa3c8e9411f0867f0224a6c84d84.web.val.run
README.md

LLM Board Game Server

A game-agnostic server that enables LLM-controlled pieces to play physical board games based on photos of the game state.

Features

  • Game Management: Create games with custom rules and piece types
  • Multi-Player Support: Multiple human players can join and control pieces
  • LLM Integration: Each piece is controlled by an independent LLM call
  • Real-time Updates: WebSocket-based live updates as moves are generated
  • Photo-based State: Uses multimodal LLMs to analyze board photos
  • Human Arbitration: No rule enforcement - humans resolve conflicts

Architecture

Backend (/backend/)

  • Hono API server with WebSocket support
  • SQLite database for game state persistence
  • OpenAI Vision API integration for board analysis
  • Parallel LLM processing for simultaneous piece moves

Frontend (/frontend/)

  • Game creation and management interface
  • Player join and piece control pages
  • Real-time move display with WebSocket updates
  • Photo upload and turn processing

Shared (/shared/)

  • TypeScript types for game data structures
  • Utility functions for ID generation and validation

URL Structure

  • / - Homepage with game creation
  • /game/:gameid - Join game page
  • /game/:gameid/manage/:managerid - Game management interface
  • /game/:gameid/play/:username - Player interface
  • /game/:gameid/clone - Clone game with same rules

Game Flow

  1. Game Creation: Manager sets up game rules and piece types
  2. Player Join: Players join with unique usernames
  3. Piece Assignment: Players create and configure their pieces
  4. Turn Processing: Photo upload triggers parallel LLM calls
  5. Move Display: Results stream in real-time via WebSockets
  6. Human Arbitration: Players interpret and apply moves manually

Technical Details

  • Game IDs: 5-character case-insensitive unique identifiers
  • No Authentication: Designed for small playtesting events
  • Stateless LLMs: Each turn uses only current board photo
  • Conflict Resolution: Handled entirely by human players
  • Real-time Updates: WebSocket-based live move streaming
HTTP
  • index.ts
    malcolmocean--ce…84.web.val.run
  • main.ts
    malcolmocean--96…84.web.val.run
Code
backendfrontendsharedREADME.md
H
main.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.