Random number generator for board games using Svelte + SvelteKit
Summary • Features • Examples • Development • Credits • License
- Lots of games have decks of cards that you draw from only once at the start of the game
- These decks might only have a handful of cards, which makes them hard to shuffle
- Oftentimes, they just get a quick and dirty shuffle to avoid the hassle
- Most of the cards get returned to the box, so most of that shuffling goes to waste
Avoid the shuffling and pick some random cards instead
e.g. If you need 5 starting cards from a deck of 25 possible ones:
- Generate 5 random numbers from 1 to 25 (without duplicates)
- Let's say you get 3, 4, 11, 12, and 17
- Pick out the 3rd, 4th, 11th, 12th, and 17th cards from the deck and you're set
- Mobile-first design with number-picker wheels and simple toggles
- Progressive web app (PWA) support for adding to home screen
- Query params for bookmarking custom initial values
Note
Defaults to generating 2 numbers from 1 to 6 without duplicates
Note
Custom initial values can be set for quantity, from, to, and duplicates
Tip
Save a bookmark for one-click generation in the future
ckant.com/board-game-rng?quantity=5&from=5&to=20&duplicates
npm installnpm run dev -- --opennpm run buildnpm run preview -- --open- React Wheel Picker for the great picker wheels (ported to svelte)
- pure-rand for the (unbiased) uniform int distribution
- Svelte for the fun web framework
Copyright © 2025 Chris Kant.
This project is MIT licensed.
