pixi-reels
Reference
Presses

Skipping

What a press does to reels that are still spinning, and how tease protection and reel groups limit it.

Players tap the spin button while the reels are still moving. Some want the columns to slam down right now and show the result. Some want them to hurry, but still land with the little bounce. A game that is teasing a big win wants the first tap to drop the boring columns and leave the two teasing ones crawling. And a game with reel groups wants each tap to drop the next group, not everything. All of those are "a skip", and the engine has to make them feel different while staying correct about what has landed and what has not.

pixi-reels splits the problem in two. The mode says how a freed reel lands: a slam puts it on its result frame and lands it in the same tick, while a quicken ends the tease and cuts the stop delay but still plays the spin-out and the bounce. Thegroup says which reels a press frees, and that part is decided from reel groups and tease protection, never from the mode. Three public methods feed a press into that machinery, and the rest of this page follows a press through it.

The three entry points

Figure 1 compares the three methods your game can call, one per column, with the four questions that separate them as rows. Read a column top to bottom. Only skip() carries the once-per-round side effect (the speed boost); only requestSkip() may be called before the result is in; only slamStop() walks past tease protection. Every column ends in the same two internal routines.

beforesetResultsideeffectteaseprotectroutesthroughskip(options?)ReelSet.skipSpin()requestSkip(opts?)ReelSet.requestSkip()slamStop(opts?){ reels } or { except }throwsthe round is notdecided yetqueues_skipPending, skip:queued,fires inside setResultthrowsno result frameto placeonce per roundstandard: speed boostcascade: auto-slam refillsnonepresses withwithSideEffects = falsenoneskipStage onlyis touchedhonouredprotected tease reelsstay uphonouredsees protection setbefore setResultignoredalso ignoresdefaultSkipMode_pressSkip(true)carried acrossexpand() steps_pressSkip(false)skipStage waitsfor the fire_slamWithStageno arg: stage 2, full slamreels/except: partial
The three public entry points, row by row. Only skip() carries the once-per-round side effect; only requestSkip() may be called before the result; only slamStop() walks past tease protection. Every column ends in _slamTargets or _quicken.
public entrywhat your game calls
has a consequencea queue, a side effect, or an honoured protection
inertthrows or does nothing on that row
internal methodwhere the press goes next

skip() is the ordinary player press: it throws before the result is in, honours protection, and the first press that ends a round applies the round's side effect (below).requestSkip() is the same press for a game that lets the player tap before the server has answered: it queues the press, emits skip:queued, and fires it from insidesetResult(), with no side effect.slamStop() is the hammer for your own features: it ignores protection and the default mode, slams only{ reels } or all but { except }, and with no argument is a full slam that ends the round.

There is a fourth path your game never calls. abortSlam() is what the abort signal, the timeout and the error recovery use when something has gone wrong and the board must be left tidy. It ignores protection and the default mode, has no side effect, and lands whatever the reels happen to be showing (halt and snap, no result frame needed). It goes through the slam routine with every reel, so it bumps the generation counter and ends every chain.

The options

The option and payload types, listed once.

TypeShapeNotes
SkipMode'slam' | 'quicken'the default is defaultSkipMode on the controller, set by the builder's skipMode(mode), else 'slam'
SkipOptions{ mode?, speed?, payload? }speed names a registered profile a quicken finishes on (its spinSpeed drives the spin-out, its bounce the landing); unknown names throw, a slam ignores it. payload passes through untouched to onSkip, the skip events and SpinResult.skipContext
SkipContext{ mode, speed?, payload? }what every phase's onSkip receives; engine slams use { mode: 'slam' }
SkipInfoSkipContext & { reels: number[], partial: boolean }the payload of skip:requested and skip:completed
SlamOptions{ reels? } | { except? }one or the other, not both. Out-of-range indices are ignored; held and already-landed reels are never slammed

There is no separate "hurry up" method. "Finish faster but keep the landing" is requestSkip({ mode: 'quicken' }).

Which reels a press frees

Every press that honours protection, whether it came fromskip(), from a queued requestSkip() firing insidesetResult(), or carried over to the next expand()step, goes through the same decision. Figure 2 is that decision. Start at the top and follow the arrows. Groups win over protection; protection only matters while there is a tease worth protecting; and once only tease reels are left, the protect mode decides whether a press releases one of them, or nothing at all.

pressskip() or queued requestSkip()reel groups set?setReelGroups()next unlanded groupnon-teasing reels first,then its tease reelsyesprotected tease reels?_protectedTeaseReelsfull slam / quickenevery reel still up,stage 2, side effect nownononon-tease reels still up?all but protectedstage 1, side effectwaits for the next pressyesyesonly tease reels leftwhich protect mode?no'stepwise'one tease reelper press'once' / 'always'empty group:the press does nothing
_pressSkip asks _nextSlamGroup which reels a press frees. Groups win over protection; protection only matters while there is an effective hold; and once only tease reels are left, 'stepwise' releases them one by one while 'once' and 'always' free nothing.

"Protected tease reels" is empty, so the press falls through to a full slam, whenever protect is false, 'once' is already spent, the effective hold is 0 or less (read from the profile captured for this spin), or every tease reel has landed. Theskip stage, readable as skipStage, is the controller's memory of the round: 0 at the boundary, 1 when a press left something spinning (the side effect is still owed), 2 when a press ended the round and the side effect has been applied.

Two details the picture leaves out. A quicken press counts the reels it already quickened as down, so the next press moves on to the next group. And with groups set a press releases only the next unlanded group: with[[0, 1], [2, 3], [4]] the player needs three presses.

Slam versus quicken, on one stop phase

The clearest way to feel the difference between the two modes is to watch both hit the same phase at the same moment. Figure 3 is a slam arriving while a stop phase is in its spin-out step. The running step is cancelled and the rest are dropped; the phase's skip handler sets the final pose itself, and the reel is landed before the frame ends. The player sees the column snap.

slamforceComplete(ctx)delayspinOutlandbounceStopPhase.onSkiphaltDrive, placeStrip(targetFrame),container back to _baseY, snapToGridlanded, same tick
A slam on a stop phase that is in its spinOut step. The running step is cancelled (phase:step cancelled), the rest are dropped, and onSkip sets the final pose in the same tick.

Figure 4 is a quicken arriving at the same phase. Only the delay step is a cut step, so it is the only thing skipped or cut short. The spin-out, the landing and the bounce all still play, optionally on a different speed profile named in the press. The player sees the column hurry, then land properly.

quickenphase.skip({ mode: 'quicken', speed? })delayspinOutlandbouncectx.speed (optional)its spinSpeed drives the spin-out,its bounce settings drive the landinglands after the spin-out
A quicken on the same stop phase. Only the cut step, delay, is skipped or cut short; spinOut, land and bounce still play, optionally on another speed profile named in the press.

Here is what the slam routine does with the set of freed reels. It emits skip:requested with the mode, the reels and whether the slam is partial. For a partial slam it force-completes each target's active phase and adds the reel to the slammed set; for a full slam it force-completes every phase and bumps the generation counter. With a result in hand it applies any pending MultiWays reshape, then for each reel places the symbols straight onto the strip and raises the reel's landing events, which is where spin:reelLanding comes from, and marks it landed. Without a result (the abort case) it halts, snaps and marks. It emits skip:completed. After a partial slam it re-runs the all-started check and the stop gate, because a reel that was slammed before it ever reached its spin phase would otherwise leave the gate closed for good.

The quicken routine is lighter because the reels keep running. It marks the targets as quickened, sets each reel's reference speed from the named profile if there was one, records the batch, emitsskip:requested, and calls skip() on each target's active phase. A phase that is not quickenable keeps running and the chain applies the quicken at its next decision point: the spin phase drops its minimum to 0, a tease phase created after the press starts already quickened, and the stop phase gets no delay and nopreserveSpeed. skip:completed fires later, when the batch's last reel lands. In cascade mode a quicken becomes a slam with a one-time quicken-cascade warning, because the cascade phases' slam pose is already their natural end.

The generation counter and partial slams

Every reel chain remembers the generation, a counter the controller bumps when a round ends or restarts, and checks it after every await: if the number has moved on, the chain stops quietly. A full slam bumps it, which is how one call ends five chains. A partial slam cannot, because the other reels must keep spinning, so it marks only its targets in the slammed set, and the staleness check treats "in that set" like "old generation". The watchdog, the abort callbacks and the per-chain safety net check the generation too, so late errors from an older spin are dropped. After a partial slam the skip stage is left alone, unless the slammed set covered every reel still spinning, in which case the round is over and the stage moves to 2.

Reel groups

Reel groups turn five independent columns into a few sets that land together. setReelGroups(groups) must list every reel exactly once or it throws, and it throws if any reel has already landed in the current round; null clears them. Groups persist across spins. When stopping, a reel waits until every earlier group has landed, and its stop delay becomes its position within the group times the profile'sstopDelay. When skipping, a press releases the next group that has not landed, non-teasing reels first. If reels are added later they are appended as one trailing group; removed reels are filtered out, and the groups are cleared if nothing is left.

Protect modes

Protection is set on the tease, through setAnticipation, and says what a player press may end. The table reads left to right: what the first press does, then what later presses do.

protectFirst pressLater presses
false (default)full slam, stage 2nothing left to press
'once' (or true)lands the non-tease reels, stage 1protection is spent: the next press slams the tease reels and applies the side effect
'stepwise'lands the non-tease reels, stage 1each press releases the next tease reel in tease order; stage 2 on the last
'always'lands the non-tease reels, stage 1a press never ends a tease; stage stays at 1 until the round ends on its own

Pass protect: true and it is normalised to 'once'inside setAnticipation; storing the raw boolean used to behave like 'always'. Protection applies to skip() andrequestSkip() only, never to slamStop(). It is inert when the effective hold is 0 or less, and the hold is read from the profile captured for this spin, not the live one: on TURBO without aduration override the 250 ms hold keeps it active, on SUPER_TURBO it does nothing. The tease itself is described on theanticipation page.

Across rounds and expand steps

The first press that ends a round has a side effect, the one thing that outlives the spin. In standard mode the engine boosts to the registered profile with the highest spinSpeed and emitsskip:boosted { previous, current }, so the next spin is faster for a player who keeps tapping. In cascade mode it sets an auto-slam flag instead, so every later refill() in the round slams at once (each refill's setResult presses a side-effect-free slam). The boost calls the speed manager directly, which is why it emits skip:boosted but not speed:changed; the next spin() silently restores the previous profile unless you called setSpeed() in between.

A press can also be carried: between twoexpand() steps the controller stores it, emitsskip:queued, and the next step's spin() (withcontinueRound) turns it into a pending press without resetting the skip stage. For completeness: a phase chain that throws is slammed by the safety net and resolves with wasSkipped: true; an abort or timeout goes through abortSlam() and rejects. nudgelives on the set, throws while a spin runs, and is untouched by any skip;skipNudge() is its own thing.

Events a press emits

What your game hears when a press goes through, in the order it happens.

EventPayloadWhen
skip:queuedSkipContextrequestSkip() before the result; carrySkip between expand steps
skip:requestedSkipInfo { mode, speed?, payload?, reels, partial }start of _slamTargets or _quicken
skip:completedSkipInfoend of _slamTargets; for a quicken, from _markLanded when the batch's last reel lands
skip:boosted{ previous, current }the round-ending skip() in standard mode
spin:reelLanding / spin:reelLandedreelIndex, symbolsper slammed reel, in the same tick

Defaults

The handful of values a fresh controller starts with.

SettingDefault
defaultSkipMode'slam', on the controller and the builder
protectfalse; true means 'once'
skipStage0 at every round boundary
_autoSlamRefillsfalse at every round boundary
refill with every reel landedstill emits the skip events on the full-slam path
partial slam with nothing to landemits nothing
Where this lives
  • packages/pixi-reels/src/spin/SpinController.ts: skip, requestSkip, slamStop, abortSlam, _pressSkip, _nextSlamGroup, _protectedTeaseReels, _slamTargets, _slamWithStage, _quicken, _applyRoundSideEffects, carrySkip, setReelGroups
  • packages/pixi-reels/src/spin/phases/ReelPhase.ts: skip, forceComplete, primeQuicken, the cut-step runner
  • packages/pixi-reels/src/config/types.ts: SkipMode, SkipOptions, SkipContext, SkipInfo, SlamOptions, AnticipationProtect
  • Recipes: skip. Related: anticipation, speed profiles