Skip to content

Tutorial Battle Backdrops

johnjohto edited this page Jul 25, 2026 · 1 revision

Tutorial: Battle Backdrops

Give fights an arena scene keyed to where the battle happens. One optional file is the whole feature — presentation/backdrops.json in your project. No file = no backdrops (the classic black arena), and there is no other switch to flip.

{
 "backdrops": {
  "meadow": "backdrops/meadow.png",
  "myscene": "backdrops/myscene.png"
 },
 "assignments": {
  "default": "meadow",
  "slots":    {"water": "myscene"},
  "maps":     {"LeverCave": "myscene"},
  "tilesets": {"cavern": "myscene"},
  "zones":    {"zone:wick_wilds": "myscene"}
 }
}

The library

backdrops maps a name to a PNG, resolved through the normal project texture chain: assets/<path> in your project first, then the engine's stock set. Every project inherits six original CC0 scenesmeadow, forest, cave, sea, tower, indoor — so you can assign those names without shipping any art at all (Meadowbrook's entire config is "default": "meadow").

To add your own scene, drop a 160×96 PNG under assets/backdrops/ and add a library line. Two tips from the stock set:

  • Draw in your project's palette-ramp colors if you use the palette system — the recolor pass then restyles the scene per map with no shade collapse.
  • Keep it light-biased: battle text and HUD boxes draw over it.

The assignment ladder

Each battle picks its scene on a five-rung ladder, most specific rung first:

encounter slot → map → tileset → zone → default

So a water-slot (surfing) fight beats the map rung, a per-map override beats its tileset, and default catches the rest. Write only the rungs you need. Bramblewick assigns by zone (its two wild routes fight in the forest) plus one map override; the Vermilion overlay assigns by tileset class plus the water slot.

Validation

The file is checked at boot, loudly: every assignment must name a library entry and every library path must load, or the project refuses with the exact name. A typo cannot silently give you a black arena.

In the fight, the backdrop draws clipped to the 160×96 arena and rides screen shake.

Clone this wiki locally