Skip to main content

Slot Spin

This node executes a single game round on the server.

The Slot Spin node is the main entry point for running a slot game logic cycle.

The Slot Spin node sends a request to the XFORGE game engine to perform a full spin. It handles random number generation, reel stopping, win checking, and feature triggering (Free Spins, Cascades) in one atomic operation. It returns the complete result state needed to visualize the spin.

Inputs

Slot Configuration

DataDescription
Reel StripsThe reel strips to use.
RowsNumber of rows.
ColumnsNumber of reels.

Game Parameters

DataDescription
Bet AmountThe bet for this spin.
Payout FormulaFormula for payouts.
Initial Free SpinsCurrent free spins balance (if any).

Plugins

DataDescription
Free SpinsEnable Free Spins logic.
Cascading ReelsEnable Cascading Reels logic.
Reel WaysEnable Reel Ways logic.

Session

DataDescription
Session IDUnique ID for the player session (for tracking state).
SeedOptional. Force a specific RNG seed (for debugging).

Actions

SignalDescription
SpinTriggers the spin.

Outputs

Results

DataDescription
Full ResponseThe complete JSON response from the engine.
Spin ResultsObject containing the grid (slotResults), total payout, and win details.
Stop Positions ListArray of indices where the reels stopped.
Is Big WinBoolean. True if win > 1000x bet.

Events

SignalDescription
SuccessTriggered when the spin result is ready.
FailureTriggered on error.

Usage

Main Game Loop

  1. Player clicks "Spin".
  2. Trigger Spin on this node.
  3. On Success:
    • Pass stopPosList to your Reel Visualizer or animation logic to show the reels stopping.
    • Wait for animation to finish.
    • Show win lines using Spin Results.
    • Update balance.

Detailed Behavior

  • Atomic: The entire game logic (spin -> check wins -> cascade -> check wins again...) happens on the server in one go. The response contains the final state and the history of what happened (e.g., intermediate cascade grids).
  • Security: Since logic runs on the server (or simulated server environment), the client cannot cheat the RNG.

Troubleshooting

  • Invalid Config: Ensure Reel Strips are populated (e.g., from Generate Reel Strips).