A web-based implementation of the dice game Farkle, featured in Kingdom Come: Deliverance.
The game follows the rules outlined in the Wikipedia Farkle article and includes optional multiplayer support.
- Playable single-player against computer
- Real-time multiplayer using Firebase
- Client only for static page hosting
- React
- Next.js
- Firebase (multiplayer)
The implementation contains basic multiplayer functionality through Firebase. Please keep the following in mind:
- No anti-cheat protection: Players with technical knowledge can submit fake scores.
- Inactive lobbies expire: Lobbies are automatically removed after 10 minutes of inactivity.
- Add multiplayer animations to visualize opponent dice actions in real time
Install dependencies:
npm installRun development server:
npm run devBuild the application for static hosting:
npm run buildServe the out directory with any static file server.
By default, the app builds using the root base path /. To host on a subpath, create a .env file with:
NEXT_PUBLIC_BASE_PATH="/sub-path"
NEXT_PUBLIC_ASSET_PREFIX="/sub-path"
You can also have environment-specific files such as .env.development.local for local development.
Try the game here: https://joacimandersson.com/farkle/