GAME ENVIRONMENTS · CREATIVE TOOLS
Turning stories into playable, rule-consistent game worlds.
Kanshan Anywhere Door compiles narrative source material into a structured mystery game. Our team separated generative expression from deterministic rules so players can investigate, present evidence, and reach outcomes without the model rewriting the truth of the world.

- ROLE
- Story-to-game architecture, compiler pipeline, game rules, browser runtime
- TECHNOLOGIES
- TypeScriptReactNode.jsLLM APIsStoryPackageDeterministic reducer
A compiler before a runtime
The pipeline moves through analyze, design, compile, and validate. Instead of streaming an improvised game directly from a model, it produces a structured StoryPackage that can be checked before the browser runtime consumes it.
The flagship Blue Blood slice contains 31 scenes, alongside Journey to the West and Myopic playable material. Shared contracts connect the compiler, local studio, and game runtime.
Deterministic truth, generative expression
Clue variables, structured evidence presentation, game state, and endings are governed by deterministic rules. LLM output is used for expression and dialogue, with rewriting prompts and out-of-character detection rather than authority over facts.
This separation creates a useful environment for studying long-horizon agent behavior: the system can preserve inspectable state while still allowing flexible natural-language interaction.
A game built around its medium
The showcase is a single-player mystery adapted from Zhihu Yanxuan stories. Investigation, dialogue, evidence, and the final accusation take place inside a Zhihu-style interface, including a comment-thread boss encounter.
The project reached the national finals of Zhihu Hackathon S2. The playable system also includes a portal hall, mobile controls, regression tests, and a sandboxed browser experience.
Project context
Kanshan is a team project and hackathon finalist, not a claim of a production game platform. The architecture and playable evidence are public in the repository; story and platform assets retain their documented rights boundaries.