Sprites and objects
Lives in: sprites/
Props and gadgets on top of the scene — not character folders. Skip this folder until you need a chair, lamp, phone overlay, or flag-driven meter.
A picture on the scene (sprite)
Sprites are data-only (direction file / story data — no [sprite …] sugar in the script today):
{
"type": "sprite",
"id": "chair",
"value": "chair",
"layer": "bg_front",
"x": 625,
"y": 494
}
| Field | Effect |
|---|---|
id | Name of this prop instance |
value | Picture name under sprites/ (or null to hide) |
layer | Draw band: bg_front, fg, or overlay |
x / y | Position |
You can also draw a plain rect or polygon (kind) instead of an image. Optional fade, tint, shader (one per sprite), and live binds work here too.
Reusable objects (*.obj.json + obj)
A catalog object is a file like sprites/meter.obj.json: an id, a default layer, and a list of parts (images or shapes).
{
"id": "meter",
"layer": "overlay",
"parts": [
{ "id": "bg", "kind": "rect", "width": 40, "height": 120, "color": "#343a52e0" },
{
"id": "ptr",
"kind": "polygon",
"points": [[12, 0], [0, 10], [12, 20]],
"bind": {
"y": { "flag": "score", "map": { "1": 90, "3": 50, "5": 10 }, "default": 50 }
}
}
]
}
Show an instance on a moment:
{
"type": "obj",
"object": "meter",
"instance_id": "score_meter",
"show": true,
"x": 16,
"y": 16
}
| Idea | Meaning |
|---|---|
object | Which catalog file |
instance_id | This copy on stage (you can show the same def twice with different ids) |
update | Patch parts on an existing instance |
bind | Live link from a flag to a property (on the def, the instance, or a part) |
apply | Sticky for the session, or node_local for one moment |
A shader on an object applies to the whole instance (all parts composited), not per part.
Objects do not use character-style extends. Parts are a flat list; change them with update and binds — Reusing settings.
Putting the obj on a script scene: Adding direction to a script scene. Flag-driven examples: Reacting to flags live.
Usually you need
| Want | Do |
|---|---|
| One prop picture | sprite with value + position |
| Meter / widget | *.obj.json parts + obj show |
| Follow a flag | bind on a part |
Full map
objects file map · Objects detail