whatisgithub

What is story-to-game?

shanyin-ai/story-to-game — explained in plain English

Analysis updated 2026-05-18

54HTMLAudience · writerComplexity · 2/5LicenseSetup · easy

In one sentence

Story-to-Game converts novels or scripts into playable branching narrative games using an AI skill, plus a single-file HTML launcher to run them.

Mindmap

mindmap
  root((story to game))
    What it does
      Story to JSON
      HTML launcher
      Branching choices
      Endings and achievements
    Tech stack
      HTML
      JavaScript
      Python
    Use cases
      Adapt novels
      Play in browser
      Validate scripts
    Audience
      Writers
      Storytellers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Turn a novel, screenplay, or story outline into a playable branching narrative game using an AI tool.

USE CASE 2

Run an interactive story game by opening a single HTML file in the browser, no server needed.

USE CASE 3

Track player choices with variables that affect which story paths and endings unlock.

USE CASE 4

Validate a generated story JSON file against 13 checks before loading it into the launcher.

What is it built with?

HTMLJavaScriptPython

How does it compare?

shanyin-ai/story-to-gamedarkly22/gauntlet709166872-cpu/tagcast-ai
Stars545551
LanguageHTMLHTMLHTML
Setup difficultyeasyeasymoderate
Complexity2/52/54/5
Audiencewritervibe coderdata

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

The launcher runs as a single HTML file with no install, Chrome or Edge is recommended for full local file support.

Permissive MIT license, use freely for any purpose including commercial use.

So what is it?

Story-to-Game is a two-part toolkit for turning written stories into playable interactive narrative games. Both parts work together: an AI skill that converts source material into a structured data file, and a browser-based launcher that runs that file as a clickable game. The first part is the launcher, a single HTML file you open directly in a browser with no server setup needed. You load a JSON script file into it and it plays out as a branch narrative game: you read text, make choices, and follow different story paths. The launcher supports scene and chapter systems, variables and conditional branching, meaning values that track your choices and affect which options appear, multiple ending types, achievement tracking, save and load, and display settings such as dark mode and font size. The second part is the AI skill. Rather than manually writing a JSON game file, you paste a novel, screenplay, or story outline into a compatible AI tool, the README recommends ChatGPT, Claude, or Claude Code, and the skill guides the AI through a multi-step adaptation process: extracting the source text's tone and style, designing branching structures, building a state system with tracked variables, and producing the complete JSON output. A validation script checks 13 criteria before you load the result into the launcher. The toolkit is built around one stated principle: branching should deepen understanding of the original work rather than replace it. Every choice is intended to carry immediate, ongoing, and ending level consequences. The project is written in HTML and licensed under MIT.

Copy-paste prompts

Prompt 1
Use the Story-to-Game AI skill to convert this short story into a branching narrative JSON script.
Prompt 2
Explain how the Story-to-Game launcher tracks variables and branching choices during play.
Prompt 3
How do I validate a generated story JSON file with validate.py before loading it?
Prompt 4
Walk me through adding a new ending type to a Story-to-Game JSON script.

Frequently asked questions

What is story-to-game?

Story-to-Game converts novels or scripts into playable branching narrative games using an AI skill, plus a single-file HTML launcher to run them.

What language is story-to-game written in?

Mainly HTML. The stack also includes HTML, JavaScript, Python.

What license does story-to-game use?

Permissive MIT license, use freely for any purpose including commercial use.

How hard is story-to-game to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is story-to-game for?

Mainly writer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.