game.toml
The project file at the root of every game folder. Its presence is what makes a folder a
game. It uses a small subset of TOML: one key = value per line, # comments, values that
are double-quoted strings, numbers, true or false.
# samples/gridline/game.toml
name = "Gridline"
title = "Gridline"
organization = "Molten"
version = "1.0.0"
icon = "icon.png"
first_screen = "MainMenu"
escape_quits = false
| Key | Type | Default | Meaning |
|---|---|---|---|
first_screen |
string | required | The screen the game starts on, by name (MainMenu for screens/main_menu.screen) |
name |
string | the folder name | Executable name and application name for player data. Up to 64 ASCII letters, digits, - or _ (checked when shipping) |
title |
string | name |
Window and product title |
organization |
string | Molten |
Groups player data: <user data>/<organization>/<name>/. Same character rules as name |
version |
string | One to four dot-separated integers, each 0-65535 (checked when shipping) | |
icon |
string | A PNG in the game folder, at most 256 x 256 pixels: window icon, Windows executable icon, Linux desktop icon | |
escape_quits |
bool | true |
When true, Escape quits the game. Set false to handle Escape in gameplay |
graphics |
string | "standard" |
The highest graphics tier the game supports: "standard" or "cinematic" (needs a ray-tracing GPU; a GPU without one, or a player's setting, lowers it). At cinematic the game gets ray-traced global illumination (giVolume, M20). See DESIGN.md "Graphics tiers" |
Errors
castc check and the engine report:
| Message | Cause |
|---|---|
missing required setting 'first_screen' |
No first_screen |
unknown first screen 'X' |
No screens/x.screen |
unknown setting 'k' (allowed keys: name, title, icon, version, organization, first_screen, escape_quits, graphics) |
A typo or an unsupported key |
graphics must be "standard" or "cinematic" |
Another value |
duplicate setting 'k' |
A key appears twice |
escape_quits must be a boolean |
escape_quits = "no" |
k must be a string |
A string key given a number or bool |
expected a double-quoted string, number, true, or false |
Single quotes, bare words, arrays or tables |
castc fmt does not format game.toml.
Player settings
Players can put a settings.ini in their data folder for resolution, fullscreen, vsync,
volumes, the graphics tier and the quality preset (quality = low|medium|high). See Shipping.