Pop Bumper & Spinner Scoring

recipe bumper spinner scoring

Pop Bumper & Spinner Scoring

Bumpers and spinners are the classic “lots of little hits” devices. The pattern is two layers: award a base value on every hit, then layer a bonus on top when the hits cluster — a burst of rapid bumper pops, or a fast spinner.

Base scoring

Award a flat value each time the bumper fires:

score "event" "bumper_hit" {
  when    = device.pop_bumper.activated
  points  = 100
}

Burst bonus

Detect a flurry of hits with an aggregation "burst" block and pay a bonus when the threshold is reached inside the window:

aggregation "burst" "bumper_frenzy" {
  devices   = [device.pop_bumper]
  window    = "1s"
  threshold = 10
  cooldown  = "5s"
  on_trigger {
    emit = aggregation.bumper_frenzy.burst
  }
}

score "signal" "bumper_frenzy_bonus" {
  when   = aggregation.bumper_frenzy.burst
  points = 5000
}

The base bumper_hit rule keeps scoring normally — the burst bonus is added on top.

Spinner rate tiers

For a spinner, an aggregation "rate" block tiers the sustained spin rate, so a hard rip is worth more than a lazy turn. Each tier carries a multiplier you can apply to your spinner scoring:

aggregation "rate" "spinner_speed" {
  devices = [device.spinner]
  window  = "1s"
  rate_tiers {
    tier {
      min_rate   = 0
      label      = "idle"
      multiplier = 1.0
    }
    tier {
      min_rate   = 5
      label      = "active"
      multiplier = 1.5
    }
    tier {
      min_rate   = 15
      label      = "fast"
      multiplier = 2.5
    }
  }
  on_tier_change {
    emit = aggregation.spinner_speed.tier_change
  }
}

How it works

These use Cade’s event aggregation primitives — burst, coincidence, and rate. For the full set of attributes, the coincidence primitive (cross-device “hot playfield” moments), and how aggregation signals carry their data, see Event Aggregation.