Back to feed
Dev.to
Dev.to
6/17/2026
I built a roguelike whose dungeon master is an LLM running 100% in the browser

I built a roguelike whose dungeon master is an LLM running 100% in the browser

Short summary

A developer built a roguelike game with an LLM dungeon master running entirely in the browser using WebLLM, eliminating server costs and API token burn. The key insight: separate narrative prose (free-form LLM output) from game mechanics (strict JSON contracts), preventing the LLM from breaking rules through flavor text alone. This enables offline play, complete privacy, and scales to unlimited players at zero marginal cost.

  • LLM dungeon master runs 100% in browser (WebLLM) with zero marginal cost
  • Separates narrative prose from mechanics via JSON contracts to enforce game rules
  • Offline-first, privacy-preserving, scales infinitely without token costs

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more