Skip to content

feat(rail-drop): Plinko-on-a-rail casino game#30

Open
naosbtc wants to merge 1 commit intoStakeEngine:mainfrom
naosbtc:feat/rail-drop
Open

feat(rail-drop): Plinko-on-a-rail casino game#30
naosbtc wants to merge 1 commit intoStakeEngine:mainfrom
naosbtc:feat/rail-drop

Conversation

@naosbtc
Copy link
Copy Markdown

@naosbtc naosbtc commented Apr 25, 2026

Summary

A new Stake Engine game where a ball rolls along a horizontal rail and drops into one of three Plinko boards positioned along its path. Each zone has progressively more rows (8 / 12 / 16) and more extreme multipliers, modeled on Stake Plinko's published distributions.

Multiplier tables (~99% RTP per zone)

Zone Rows Low Medium High
1 (near) 8 5.6× — 0.5× 13× — 0.4× 29× — 0.2×
2 (mid) 12 10× — 0.5× 33× — 0.3× 170× — 0.2×
3 (far) 16 16× — 0.5× 110× — 0.3× 1000× — 0.2×

Each zone uses a binomial slot distribution; multipliers match the values from Stake's published Plinko paytables.

What's included

  • Full Stake SDK app scaffold under `apps/rail-drop/` (workspace deps: `config-vite`, `config-svelte`, `config-ts`, `config-lingui`).
  • Book events: `drop` (zone, riskLevel, path, slotIndex, multiplier) and `finalWin`.
  • Animated SVG scene (1600×900): rail with arrow, drop indicators per zone, plinko boards with pins + colored slots, ball physics (rolling → dropping → row-by-row bouncing → landing), win overlay with multiplier-based color coding.
  • 3 risk-level selector (low/medium/high), in-canvas SVG buttons.
  • Six sample books under `stories/data/sampleBooks.ts` covering each zone × risk combo (loss → max win).
  • Dev panel inside `Game.svelte` to play sample books without an RGS session.

Test plan

  • `pnpm install` resolves `apps/rail-drop`'s workspace deps
  • `pnpm --filter=rail-drop build` succeeds (verified locally — `✓ built in 2.83s`, prerender `200 /`)
  • `pnpm --filter=rail-drop dev` boots on port 3002
  • Each sample book in the dev panel plays the full animation (rolling → bounce → land → win overlay)
  • Risk level buttons change displayed slot multipliers when phase is idle
  • Math-sdk Python implementation (separate PR) emits matching `drop` events

Notes

  • This PR contains the frontend only. A matching math-sdk Python game (`games/0_0_rail_drop/`) needs to be authored to generate `BookEventDrop` events server-side.
  • Per-zone selection probability is server-controlled — the frontend just renders whatever zone the server picks.

🤖 Generated with Claude Code

A new Stake Engine game where a ball rolls along a horizontal rail
and drops into one of three Plinko boards positioned along its path.
Each zone has progressively more rows (8 / 12 / 16) and more extreme
multipliers, modeled on Stake Plinko's published distributions:

- Zone 1 (8 rows):  0.2× — 29×    (low / med / high risk)
- Zone 2 (12 rows): 0.2× — 170×
- Zone 3 (16 rows): 0.2× — 1000×

Per-zone RTP ~99% under a binomial slot distribution. Three risk
tiers (low/medium/high) selectable from the game canvas.

Includes the full Stake SDK app scaffold (config-vite/svelte/ts/lingui
workspace deps), book-event handlers (drop, finalWin), animated SVG
scene with rolling ball, drop, row-by-row bouncing and slot landing,
six sample books for storybook/dev playback, and a dev panel inside
Game.svelte to trigger them without an RGS session.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant