Backgrounds
Lives in: backgrounds/
Places your story happens in. Folders and formats: Pictures, sound, and folders. Script sugar: Stage directions.
Pictures on disk
| On disk | In the story |
|---|---|
backgrounds/street.jpg | [bg street] or [bg street fade 0.5] |
Write the name without the extension. Formats: .png, .jpg / .jpeg, .webp, .svg.
Change place
[bg street]
[bg street fade 0.5]
[bg park slide_left 0.6]
[bg clear]
| Piece | Effect |
|---|---|
| Name | Load that picture |
fade / slide_* | How it enters (default for a plain [bg name] is a short fade) |
| Duration | Seconds |
clear | Remove the background |
As data:
{ "type": "bg", "value": "street", "transition": "fade", "duration": 0.5 }
value: null clears. Same-track music rule does not apply here — each bg sets the place.
Effects on a background
You can attach a shader (and optional parameters) on the background command. Leave the shader key out to keep what is there; set it to null to clear. Full shader authoring: Shaders. Sticky omit vs null: Sticky state and clear.
Command fields opacity, modulate, and visible set how the plate looks; live binds can drive the same look from flags — including image to swap the picture (same stems as value, under backgrounds/). Bind image swaps are instant; use [bg … fade …] when you want a transition.
Day / night from a flag:
{
"type": "bg",
"value": "street",
"bind": {
"image": {
"flag": "time",
"map": { "day": "street", "night": "street_night" },
"default": "street"
}
}
}
Prefer a sprite/object for small overlays; keep bg for the full scene picture. Show/hide hooks on the command still work as elsewhere.
Richer rooms
Backgrounds that behave like multi-layer places (hotspots, room camera) are still early — In development. Ship with single pictures and [bg …] today.
Usually you need
| Want | Write |
|---|---|
| Show a place | [bg street fade 0.5] |
| Clear | [bg clear] |
| Slide in | [bg park slide_left 0.6] |
Next
People on stage: What a character is · then Sprites and objects