Object Editor
Object Editor
The Object Editor is the harness’s 3D geometry editor: it lets you edit a
table’s playfield directly in the rendered scene rather than by hand-editing
.cade source. You pick meshes in the 3D view to place, move, rotate, tune, and
rename the scoring devices (bumpers, slingshots, targets, drops, lanes,
lamps, one-way gates) and draw the walls that shape the playfield. Every edit
rebuilds the live table, so what you change becomes real physics and scoring
immediately.
Unlike the rules, lightshow, and sound editors, this is not a node editor — it works on the 3D scene, not a node graph. It shares only the common toolbar and context-menu chrome with them.
Opening the editor
Press E — or click Object editor (E) in the harness actions — to enter. The camera swings to a straight-down top-down view and the Object editor panel appears on the side; press E again (or Close editor) to leave and restore your previous camera.
While the editor is open the normal gameplay controls are inert — flippers, plunger, start, and cabinet nudge/tilt do nothing, so arrow-key nudges move the selected device instead of shaking the table. Only E (toggle the editor) and P (performance HUD) stay live.
The panel header’s – button minimizes it to a restore tab when you want the full playfield.
What you can edit
The editor is modeless — there’s no Devices/Walls switch to flip. A single Tools palette holds every placement tool, and clicking any object in the scene selects it whatever its kind:
- Scoring devices — bumpers, slingshots, targets, drops, lanes, lamps, and one-way gates. Each device’s name is its switch ID, so renaming a device renames the switch the engine scores on.
- Flippers — movable and tunable (see the inspector), though you don’t place them from the palette.
- Walls — the static geometry that bounds and guides the ball: straight Segment walls, Spline walls (Bézier anchors), and Polygon footprints (convex or concave).
Selecting and moving objects
- Click a device to select it; Shift-click to add or remove one from the selection; drag a box over empty playfield to marquee-select several.
- Drag the selection to move it — a whole group moves together, and translucent floor discs preview where it will land.
- Shift-scroll over a selected rotatable device spins it about its own center, or use the on-canvas move / rotate gizmos (floor plane only).
- Arrow keys nudge the selection (hold Shift for a coarser step).
- Snap to grid in the panel constrains placement to a grid whose step you set (in table units — 1 unit = 5 cm).
Only the ball release is inspect-and-rename only; it can’t be moved or placed.
Camera navigation
The 3D view has its own camera gestures, independent of selection:
- Scroll to zoom about the cursor.
- Middle-drag or hold Space + drag to pan.
- F to frame — zoom-to-fit the current selection, or the whole table when nothing is selected.
The inspector
Selecting one object fills the inspector with its editable detail. For a
device that’s the head glyph and kind, then rows for Name (switch ID),
position (x, z), and — depending on the device — rotation°,
radius, length, width, and, for lamps, light type (GI or RGB) and
rest color. A Layer dropdown assigns the device to a layer, and any
grouping Tags from the .cade device block are shown read-only.
Two device kinds add a block of feel controls:
- Slingshot — a Slingshot sub-block with sliders (each paired with a number field) for strength, back depth, height, and bounce, alongside the shared length and rotation°.
- Flipper — strength (0–100, scales launch power) and sweep° (the up-stroke arc), plus length and rotation°. Selecting several flippers at once fans an edit out across all of them.
Type a new value and it applies on change; Apply rename commits a name change, and Revert discards uncommitted edits. A Wall selection shows the matching wall fields — name, endpoints, Thickness, Height, and Samples/seg for curved walls — while its shape is edited by dragging handles in the scene. A status line below the inspector reports whether each edit validated.
Placing devices and drawing walls
The Tools palette is a grid of tools, plus a Wall ▾ tile. Each chip carries a 1–9 digit badge and a letter mnemonic; press either, or click the chip, to arm the tool — then click the playfield to drop the device. Right-click or Esc cancels the armed tool.
| Tool | Key | What it places | Scores |
|---|---|---|---|
| Bumper | B | Pop bumper | 500 |
| Slingshot | S | Kicker slingshot | 100 |
| Target | T | Standup target | 1000 |
| Drop | D | Drop target | 1000 |
| Switch | L | Rollover switch | 150 |
| Lamp | G | Light insert (GI or RGBA) | — |
| One-way gate | O | One-way ball gate | — |
| Trough | H | Drain / trough | — |
The mnemonics can safely reuse letters the game binds (S starts a game, T nudges) because gameplay keys are inert while the editor is open.
The One-way gate passes a ball along one direction and blocks it from the
other — a placeable replacement for the old fixed shooter-lane gate. The
Trough is the volume that swallows a ball and ends its life; placing one is
what clears a “needs placement” drain warning (a plain Switch named drain
looks similar but makes one physical drain report twice).
The three tools with no score — lamp, one-way gate, and trough — are that way by design: a lamp is output-only, a one-way gate is passive geometry, and a trough’s switch drives the ball lifecycle rather than an award.
Names the editor mints
Placing a device names it <kind>_NNN — bumper_001, one_way_gate_001 — in
the same lowercase, underscore-separated style the table’s built-in devices use.
That name is the switch ID the engine scores on, so the spelling matters: the
sample table pre-authors a scoring rule for each name the palette mints, which is
why a bumper you just dropped scores 500 the first time a ball hits it, with no
rule-writing at all.
A tile’s label is cosmetic and separate from the name it mints, so the palette can be re-worded without silently renaming devices.
Clicking the Wall ▾ tile a second time opens a drill-down with Segment (drag to draw), Spline, and Polygon (click to drop anchors or vertices, then Enter or right-click to finish). Selected walls can be combined with Merge (union) of two or more, or Subtract (A − B) of exactly two, from the context menu.
Right-clicking the playfield opens a context menu for the rest — add a device, paste, duplicate, copy/cut, delete, align (edges or centers), distribute, and move to layer.
Binding an asset to a device
Right-clicking a device offers a single Bind asset… entry, which opens the asset browser over both inventories at once — media you’ve uploaded (models, images, audio, video) and what the live table already has (synth patches, clips, lightshows, triggers). Pick a row and the editor binds it the way that kind of asset is meant to be bound; you don’t have to know which of those two worlds the thing came from.
Jumping to another editor
Right-clicking a single device offers Open in editor with an entry for each editor the device is wired into — Rules editor, Light editor, and Sound editor — each as a Same tab / New tab choice. Opening one deep-links into that editor focused on the device, so you can jump from a bumper in 3D straight to its scoring rules, lamp, or sound without hunting for it.
The Browser: outliner, tags, rules, and layers
A right-rail Browser island (with its own – minimize button) collects the list panels that track your table:
- Devices (outliner) — a searchable list of every device; click a row to select and reveal it in the scene.
- Tag groups — one chip per device tag; click a chip to select and highlight every device carrying that tag, click it again to clear.
- Rules involving selection — the autofire and scoring rules that touch the current selection, so you can see what a device (or a whole tag group) actually drives without leaving the editor.
- Layers — organize devices into named layers you can add, rename, and delete. Each layer has a visibility toggle and a lock toggle — devices on a locked layer are fully non-interactive, so you can freeze part of the table while you work on the rest. Assign a device to a layer from its inspector or the right-click move to layer menu.
Diagnostics
Problems with the current table surface in the global bottom bar, not the editor panel — so they stay visible even with the editor closed. A Diagnostics chip reads the outstanding count (and · Needs placement when devices still need a home); clicking it expands a dock listing each issue. Layout-validation problems and lightshow lamp mappings that point at a device that no longer exists both show up here, and any row with a device target is click-to-select, so a warning takes you straight to the object that caused it.
Undo, saving, and autosave
Every edit is undoable: Ctrl-Z undoes and Ctrl-Shift-Z / Ctrl-Y redoes, back to the start of the session. The toolbar shows a ● unsaved badge whenever there are uncommitted edits.
To keep your work:
- Export downloads the table as a portable
.showcade.json(devices, walls, and layers) and clears the unsaved badge; Import loads one back through the same validation. - Save to .cade (Options menu) writes your edits back into the running
engine’s
.cadesource and downloads the updated text. This needs the real engine — it’s a no-op on the stub. - Autosave keeps a copy in the browser while you have unsaved edits; on the next load a banner offers to restore the last session (also under Options).
Live edits and the engine
The Object Editor edits the live table: each change rebuilds the table
through the same path the .cade loader uses, so a moved bumper collides and
scores, a renamed device reports under its new switch ID, and a new lamp lights
immediately. Edits also persist across a reload and sync live between open
windows — move a device in one tab and the same table’s editor in another tab
follows. If the engine later applies a rules change, that clears the editor’s
override so the engine’s version wins. In sample mode the editor still runs
against the bundled sample table, but engine-only actions like Save to .cade
are unavailable.