I spent three weeks debugging a memory leak that only appeared when the user’s internet connection dropped for more than two seconds. It wasn’t a server timeout. It wasn’t a cache miss. It was the moment I realized that for a real-time, text-based adventure, the round-trip to a cloud API was the bottleneck—not just for latency, but for privacy and reliability.

That frustration led to MysteryMist. It’s a detective game where your typing speed uncues clues, but the core engineering challenge wasn’t the game logic. It was convincing a private on-device AI to run a full narrative engine in the browser, offline, with zero data leaving the device.

The WebGPU Wedge

The premise is simple: you are a detective in a foggy, noir-inspired city. You don’t click to progress; you type. The faster you type, the clearer the vision becomes. Clues appear dynamically based on your input rhythm. But here is the twist: the "DM" (Dungeon Master) is a small model that runs in your browser.

Most web games treat AI as a luxury feature—something you pay for via subscription, which requires a constant network connection. If the server is down, the game is dead. If the network is slow, the immersion breaks.