Dev.to
7/20/2026

The original title is "Building a Private, On-Device AI Dungeon Master in the Browser"
Original: Building a Private, On-Device AI Dungeon Master in the Browser
Short summary
A developer built Grimhollow, a dark-fantasy dungeon crawler whose entire narrative engine runs locally in the browser via WebGPU with no server-side AI processing. The architecture uses scene-bound context windows for low memory footprint, structured JSON output for game state parsing, and constrained randomness to maintain genre consistency. On modern hardware narration appears near-instantly; older machines see 1–2 second delays, with a 2–4GB initial model download.
- •Grimhollow runs an LLM narrative engine entirely on-device via WebGPU, no server calls
- •Scene-bound context windows and structured JSON output keep inference fast and game state synced
- •Modern GPUs get near-instant narration; older hardware sees 1–2s delays with a 2–4GB model download
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



