AnsonH / plinko-game

A Plinko game built with Svelte

Home Page:https://plinko-web-game.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

plinko-game

A web Plinko game inspired by Stake.com's Plinko game.

Play now πŸ‘‰ https://plinko-web-game.netlify.app/

About

Plinko is a classic game where the player drops a ball in a multi-row pin pyramid, where the ball bounces randomly until it reaches the payout bins at the bottom.

This project is a replication of Stake.com's Plinko game, created using Svelte, Tailwind CSS, and matter-js. This website is a fun personal project to learn Svelte, and it is not affiliated with Stake.com in any way. I don't encourage gambling, so that's why I created a free-to-play version of the game.

Features

  • πŸ€‘ 100% free to play, add money at any time (not another crypto scam)
  • πŸ€– Manual and auto-bet modes
  • πŸ“Š Real-time live stats
  • πŸ“± Responsive design

Development

Getting Started

Note

Requires Node.js 20 or later.

  1. Install pnpm

  2. Clone this repository

  3. Install dependencies

    pnpm install
  4. Start the development server

    pnpm dev

Building for Production

The entire site is statically generated using @sveltejs/adapter-static.

  1. Generate a static build

    pnpm build
  2. Preview the build site

    pnpm preview

Testing

For unit tests, run:

pnpm test:unit

For end-to-end tests powered by Playwright:

  1. Build for production

    pnpm build
  2. Run the tests

    # Run in UI mode (recommended when writing tests)
    pnpm test:e2e:ui
    
    # Alternatively, run in headless mode
    pnpm test:e2e

Benchmark

A hidden page is only available in local dev environment to benchmark the payout probabilities and expected values. I used this page to tune the parameters of the matter-js physics engine and control the expected payout.

To visit this page, visit the below URL after starting the development server with pnpm dev:

http://localhost:5173/benchmark

More Screenshots

Mobile:

Manual Mode Auto Mode
Mobile 1 Mobile 2

About

A Plinko game built with Svelte

https://plinko-web-game.netlify.app/


Languages

Language:Svelte 49.5%Language:TypeScript 47.3%Language:JavaScript 2.1%Language:HTML 1.0%Language:CSS 0.1%