Cade Runtime

A declarative runtime for building and operating pinball machines

Cade Runtime

Heads up: Cade is in an early stage of development. Features, configuration syntax, and APIs may change as the project evolves, and the binary is distributed on an invite basis while things stabilize. Feedback and experiments are very welcome — just expect some rough edges.

Cade (short for Cascade) is a declarative runtime for building and operating pinball machines. Describe your table once in a concise HCL configuration and Cade handles the rest — driving hardware, routing events, keeping score, playing audio, and giving you a live debugging console to see everything as it happens.

Whether you are bringing up a brand-new whitewood, converting a Visual Pinball X table, or iterating on game rules for a production machine, Cade is designed to let you spend your time on game design instead of plumbing.

Try it in your browser

Showcade is a live, browser-based playground for Cade at show.cade.run. A 3D pinball scene with real ball physics runs right in the page — drop a ball, let it bounce off bumpers and targets, and watch Cade score each hit under its .cade rules. No install, no hardware, nothing to set up: just open the link and play.

Alpha: Showcade is an early, experimental demo and very much a work in progress. Expect a rough, evolving scene and missing pieces — it’s here to give you a feel for Cade in motion, not to represent a finished experience.

What a table looks like

Declare a device, then say what happens when it’s hit. Here’s a ramp shot that’s worth more every time you make it — a whole scoring rule, start to finish:

name = "Ramp Runner"

# Count ramp shots this ball
variable "int" "ramp_count" {
  initial = 0
  scope   = "ball"
}

# The ramp device
device "switch" "ramp" "center_ramp" {
  id   = 0x15
  tags = ["playfield", "ramp"]
}

# Award a value that grows with each shot, and bump the counter
score "event" "ramp_shot" {
  when   = device.center_ramp.cleared
  points = 5000 + (var.ramp_count * 1000)

  update {
    ramp_count = var.ramp_count + 1
  }
}

No scripting and no glue code — that’s the entire rule. See Table Configuration for the full reference and a longer worked example.

See it in action

Cade’s interactive console shows a live event tree — each switch hit cascading into signals, scoring, and state changes as the ball is in play:

cade console — live event tree
Loading the cade engine…
feed a switch:
move · collapse/expand · [] jump section · enter inspect · P pause · or click a node

Tour the console to drive it yourself.

Why Cade

  • Declarative from end to end. Devices, events, variables, and scoring rules are all described as configuration. No scripting, no event glue code — just say what the machine is and what should happen.
  • Real-time performance. The event pipeline runs at 50–100 Hz with parallel execution, and the scoring engine resolves rules in well under a millisecond so flipper and coil timing stay tight.
  • Deploys as a single binary. No interpreter, virtual machine, or dependencies to install — copy one self-contained executable onto the cabinet and run. It’s light on the processor, leaving headroom on modest hardware.
  • Hardware-agnostic. Cade speaks to FAST Pinball controllers, Visual Pinball X over a gRPC bridge, and a built-in virtual driver for testing without hardware. Swap drivers without rewriting your table.
  • Composable configuration. Fragments and assemblies let you factor out repeated patterns — flipper wiring, pop bumper scoring, mode scaffolds — and reuse them across tables.
  • Built-in observability. A rich TUI console evaluates expressions, triggers events, inspects variables, and traces event cascades live. An optional web dashboard exposes health and debug endpoints for remote monitoring.
  • Safe by construction. Configuration is validated up front with comprehensive checks for missing references, type mismatches, circular dependencies, and reserved-keyword misuse. Pragmas let you dial validation strictness to match your workflow.

Who It’s For

  • Table designers who want to iterate on rules, scoring, and audio without rebuilding a codebase every time.
  • Hardware integrators bringing up new playfields who need a consistent way to declare devices and wire them to behaviors.
  • VPX authors moving beyond VBScript toward a portable, declarative definition that runs on real hardware too.
  • Tinkerers and home-brew builders who want professional-grade event routing, scoring, and audio without writing it from scratch.

Get Started

  • Getting Started — Install Cade, write your first table, and explore it in the console.
  • Table Configuration — The full reference for .cade files: devices, events, variables, scoring, fragments, and assemblies.
  • Runtime Configuration — Platform drivers, web server, logging, and analytics settings.
  • Console — Tour the interactive TUI used to debug live games.
  • Drivers — Guides for FAST, Visual Pinball, and the virtual driver.

Sections