The game.json file
Lives in: game.json
Every project has one settings file in the project root. The player reads it when the game starts. Anything you leave out uses a sensible default.
A minimal file
{
"title": "My Novel",
"window": { "width": 1280, "height": 720 }
}
That is enough to open a named window at a base size. Story text, choices and pictures still come from story/ and your asset folders.
A fuller starter (still small):
{
"title": "My Novel",
"version": "0.1",
"window": { "width": 1280, "height": 720 },
"typing": { "cps": 28 },
"session": { "allow_back": true }
}
See examples/example-00-boilerplate/game.json and examples/example-01-hello-vn/game.json.
What most games touch
| Block | Job | Page |
|---|---|---|
title, window, version, authors | Name and window | Name, window, language |
typing | How text appears | Text speed and voice beeps |
sounds | Title music, beeps, UI clicks | Music and sounds by default |
session | Saves, Back, title / end | Save, Back and story end |
layout | Choice menus and character places | Choice and character layout |
Later parts of the handbook cover the rest (transitions, cursor, splash, screens look, and so on). Those keys still live in this same file. Advanced: custom extension packs under extensions.
Full map
Every allowed key in one view: game.json file map. Click a key to open the page that teaches it.
Usually you need
| Want | Do |
|---|---|
| Name the game | "title": "…" |
| Set design size | "window": { "width", "height" } |
| Faster / slower text | "typing": { "cps": … } |
| Allow rollback | "session": { "allow_back": true } |