Skip to main content

Cascade The Reels

This node implements the "tumbling reels" or "cascade" mechanic.

The Cascade The Reels node removes winning symbols and drops new ones from above.

The Cascade The Reels node takes the current state of the reels and the details of winning lines. It removes the symbols involved in wins, shifts the remaining symbols down (simulating gravity), and fills the empty spaces at the top with new random symbols.

Inputs

Data

DataDescription
ReelsThe current 2D array of symbols.
Winning Lines DetailsThe output from Calculate Winnings, containing positions of winning symbols.

Parameters

DataDescription
Symbol WeightsOptional. Array of weights for generating new symbols. If omitted, it infers from existing symbols.

Actions

SignalDescription
DoTriggers the cascade.

Outputs

Results

DataDescription
ReelsThe new 2D array of symbols after the cascade.

Events

SignalDescription
DoneTriggered when the new reel state is ready.

Usage

Cascading Wins

  1. After a win is processed and paid out, trigger Cascade The Reels.
  2. Use the new Reels output to update the game view.
  3. Loop back to Check Wins with the new reels to see if the cascade created new wins (chain reaction).

Detailed Behavior

  • Gravity: Symbols above a removed symbol fall down to fill the gap.
  • Refill: New symbols are generated at the top.
  • Weighted Refill: If Symbol Weights is provided, it uses them to randomly select new symbols. Otherwise, it picks uniformly from the unique symbols present in the input.

Troubleshooting

  • Not Clearing: Ensure Winning Lines Details contains the correct position data.