A simple, lightweight game engine for creating choice-based interactive stories using HTML, CSS, JSON, and JavaScript. Inspired by Twine, Storybase, and classic Choose Your Adventure games.
- Create interactive stories with branching choices
- Scene and ending management via JSON data files
- Easy customization with HTML and CSS
- Lightweight, fast, and browser-based
- No dependencies; pure JavaScript implementation
- Open local:
- Clone the repository:
git clone https://github.com/prcpham-dev/StoryBuilder-GameEngine.git
- Open
index.htmlin your browser to start playing or editing stories.
- Open web browser:
- Story content is defined in JSON files (
data/scene1.js,data/endings.js, etc.). - Customize visuals with
style.cssand logic withengine.js. - Simple scene set up:
"Scene_3": {
"text": `Testing <br><br>
{Choice 1.} <br>
{Choice 2.}
Layout will be:
Testing
Choice 1.
Choice 2.`,
"choices": [
{ "label": "Choice 1.", "next": "Scene_4", "requires": ["Scene_2"] },
{ "label": "Choice 2.", "next": "Scene_5", "requires": ["Scene_1"] },
]
},MIT License