Concepts
Concepts
Conceptual reference for how Cade’s runtime behaves — events and signals, modes and game flow, driven devices, scoring safety, variable state sync, and related subsystems. These pages explain the model behind the configuration so you can reason about edge cases and advanced setups.
Events & Signals
- Signals vs Event Handlers
Which of Cade's three event layers — hardware, signals, or event handlers — to reach for, for each class of problem.
- Event Aggregation
Score on patterns of events — bursts, cross-device coincidences, and spinner rate tiers — with the burst, coincidence, and rate primitives.
- Action Block Fields
The three things an actions { } block can do — emit an event, activate a signal, or award points — and why they aren't interchangeable.
Modes & Game Flow
- Organizing Modes into Modules
Every mode belongs to a module that owns its variables, handlers, and scoring — top-level mode blocks are no longer parsed.
- Game-Passive Modes & Device Control
Attract, tilt, and initials-entry modes, plus the target/select/apply primitives for declarative device inhibition.
- Multiball and Ball Lifecycle Events
The system.ball.* / system.play.* lifecycle events, and choosing eject_ball vs kick_ball to drive multiball correctly.
- Scoring Safety Mode and Fallback Points
How Cade keeps a game running through scoring faults using fallback points and automatic safety mode.
Devices & Output
- Driven Devices
The shared layer behind coils, motors, servos, and targets — identity, events, state bindings, and input-driven reactions.
- Kick Ball Action
Fire a ball already held by a kicker without changing the ball-in-play count — the counterpart to eject_ball.
- Synthesis
Define oscillator-based synth patches with ADSR envelopes and trigger them from events — no audio files required.
Validation & State
- Syncing Outputs to Variable State
Keep lights and other variable-driven outputs in sync across game end, player switch, and player restore.
- Reserved Keyword Validation
Cade's reserved identifiers, and how cade validate and cade migrate catch and rename conflicts.
- Scenario Testing
Verify exact scoring, variable, and event outcomes with .cade.test files run against the real engine in CI.