SOURCE / PINNED RELEASE
Made of little things.
Outbreak: Soycoon City
- Release
- db7750b1d009…
- Author-recorded commit
- 3ee3f5fd27a6…
- License
- LICENSE
- Author’s source reference
- nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-b87c04571a9
Archive hash verified: dbebdc772b142a1c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
# Checked-in levels
`demo.json` is the game's canonical precinct. It contains world-map room positions,
floor plans, paired connections, collision props, cosmetic dressing, spawns,
camera positions/look targets/lenses/trigger areas, gameplay rules and linked art.
`level.schema.json` describes the version 1 format. Runtime validation also checks
collisions, door spacing and reciprocal links.
All distances are meters. Room coordinates use X/Z around the room center;
`origin` places the room on the editor's precinct map. Cameras use XYZ, with Y
as height. `doors[].to` names the destination room and `targetDoor` its matching
return endpoint. Each camera's `background.asset` references an inventory ID.
File `path` values are relative to the repository root. SHA-256, MIME and size
describe the exact checked-in bytes.
To add a level:
1. Copy `demo.json` to another JSON file in this folder; give it a distinct `id`
and `name`. Every level JSON here is included in the Levels picker at build.
2. Edit the JSON or export a layout from the graphical editor. Keep the paired
door endpoints, valid spawns and camera coverage. Set rules in Level settings.
3. Put reviewed PNG/JPEG/WebP backgrounds in `src/art/`, list their paths in
`assets`, and assign `background` references. Images must be 4:3, at most
4096 pixels per side and under 2 MB each. Omit a binding to use a procedural bake.
4. After generating and reviewing art against each camera schema, run
`pnpm level:stamp levels/your-level.json` to record hashes and geometry signatures.
This stamps every binding; use it only after reviewing all affected shots.
5. Run `pnpm verify`, play the level in `soyli dev`, then commit its JSON and
linked files together. Keep the combined inline build inside the host budget.
Map origins, zones and difficulty changes preserve backgrounds. Changes to room
dimensions, props, doors, dressing or camera geometry require reviewing new art.
The stored geometry signature prevents a mismatched image being silently reused.
`pnpm test:levels` checks file hashes and signatures for every repository level.
Player-exported JSON may carry custom `backdrop` data URLs. For a repository level,
save those bytes as raster files and convert them to inventory/background links.
For Nostr publication, the app performs that conversion automatically and uploads
an immutable package plus its image files. Those remote packages use `url` in place
of a repository `path`; resource loading verifies MIME, size and SHA-256.
Camera `zone` accepts either `{ "x": 0, "z": 0, "w": 8, "d": 8 }` or
`{ "points": [{ "x": -2, "z": -2 }, { "x": 2, "z": -2 },
{ "x": 0, "z": 2 }] }`. Polygon vertices run around the boundary; concave
shapes are supported, but crossings, touching non-adjacent edges, duplicate
vertices and zero-area shapes are rejected. Use 3–24 points. Boundary points are
included. `priority` is an integer 0–100 (default 0). A higher-priority framed
shot wins; active zones have 7 cm hysteresis. Optional `door` references a local
door ID. `fallback: true` makes a wide shot the lowest-priority frame recovery.
Cameras must frame the actor's feet and head to be selected. Door approach shots
retain the doorway wall rather than cutting it away. Coverage warnings check
framing/props; visual schema/art review is still necessary for custom scenes.
Optional `herbs` lists up to 20 clear-floor green pickups per room, for example
`{ "id": "green-1", "kind": "green", "x": 1, "z": 2 }`. Runtime collection
and healing are session state and never mutate level JSON. Each heals at most
35 HP, capped by the level's starting-health rule. Pickups reset on restart. The
demo supplies one per room. Polygons, priorities, associations and herbs remain
in version-1 map exports, storage drafts and Nostr packages; old rectangle-only
levels remain valid.
Linked-art inventory allows up to 96 backgrounds; shared image bytes remain
bounded to 30 MB and each image to 2 MB. This accommodates all 32 demo camera
shots as artists replace procedural views with reviewed prerenders.
