Skip to content

Latest commit

Β 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 Arcane Dice

Image

Roll for initiative. The dungeon master is watching.


3D Physics AI DM React 19 Three.js TypeScript


A Baldur's Gate 3-inspired physics dice roller with real 3D collisions, cinematic themes, and an AI dungeon master that narrates your fate.


Nat 20? The Weave itself applauds. Nat 1? Even goblins expected better.




βš”οΈ What is this?

Arcane Dice is not just another dice roller. It's a full sensory experience for tabletop RPG players.

Watch real polyhedral dice tumble across a physics-simulated table with Ammo.js. Hear them clatter. See them settle. Then read what the AI dungeon master has to say about your roll β€” because every d20 tells a story.

Built for D&D players, Pathfinder groups, solo adventurers, and anyone who misses the sound of dice hitting a wooden table at 2am.


✨ Core Features

Feature Description
🎲 Real Physics Ammo.js-powered 3D dice that tumble, collide, and settle realistically
πŸ§™ AI Narrations Gemini-powered dungeon master reacts to every roll with wit and drama
🎨 Custom Themes Prismatic, Wooden, Gemstone, Rust, Blue-Green Metal, and more
πŸ–ΌοΈ Dynamic Backgrounds Cyberpunk taverns, fantasy dungeons, cozy libraries, underdark caves
🎡 Sound Effects Satisfying dice-on-table clack sounds for every roll
πŸ“Š Roll History Track your session stats β€” are you blessed or cursed tonight?
🎯 All Dice Types d4, d6, d8, d10, d12, d20, d100 β€” the full polyhedral set
⚑ Advantage/Disadvantage Roll with advantage or disadvantage, D&D 5e style
πŸ† Critical Detection Special celebrations for nat 20s, special shame for nat 1s

πŸ§™ The AI Dungeon Master

Every roll triggers a unique narration from the AI. It's not random flavor text β€” it's contextual, dramatic, and occasionally hilarious:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚  🎲 You rolled: 20                                          β”‚
β”‚                                                             β”‚
β”‚  "Reality hesitates for a heartbeat.                        β”‚
β”‚   Even the Dungeon Master raises an eyebrow.                β”‚
β”‚   The Weave itself applauds."                               β”‚
β”‚                                                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚  🎲 You rolled: 1                                           β”‚
β”‚                                                             β”‚
β”‚  "The fates have abandoned you.                             β”‚
β”‚   Your ancestors collectively sighed.                       β”‚
β”‚   Even your dice seem embarrassed."                         β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎨 Available Themes & Materials

DICE MATERIALS          BACKGROUNDS              TINTS
─────────────────       ──────────────────       ─────────────
β€’ Prismatic             β€’ Cyberpunk Tavern       β€’ Arcane Purple
β€’ Wooden Oak            β€’ Fantasy Castle         β€’ Blood Red
β€’ Gemstone Marble       β€’ Underdark Caves        β€’ Forest Green
β€’ Dice of Rolling       β€’ Cozy Library           β€’ Ocean Blue
β€’ Rust & Iron           β€’ Starlit Sky            β€’ Golden Dawn
β€’ Blue-Green Metal      β€’ Dragon's Lair          β€’ Shadow Black

πŸš€ Quick Start

git clone https://github.com/MahanKenway/Arcane-Dice.git
cd Arcane-Dice
npm install

Create a .env file (see .env.example):

GEMINI_API_KEY=your_key_here

Run the dev server:

npm run dev

πŸ› οΈ Tech Stack

Layer Technology
Framework React 19 + TypeScript
3D Engine @3d-dice/dice-box (Three.js + Ammo.js)
AI Google Gemini API
Styling Tailwind CSS 4
Animations Framer Motion
Backend Express.js (API proxy)
Build Vite
Database Firebase Firestore
Deploy GitHub Pages

πŸ₯š Easter Eggs

This repo contains dice roller implementations in 21 esoteric programming languages β€” from COBOL to Zig, APL to Forth. Check the /easter-eggs directory if you dare.

ARCANE_DICE.cob    β†’ COBOL (because enterprise dungeons exist)
arcane_dice.apl    β†’ APL (roll dice in one incomprehensible symbol)
arcane_dice.zig    β†’ Zig (for when you need zero-cost abstractions in your dungeon)
arcane_dice.fth    β†’ Forth (stack-based dice, naturally)
arcane_dice.HC     β†’ HolyC (TempleOS approved)

πŸ“œ License

MIT β€” May the RNG gods be ever in your favor.


Forged with βš”οΈ by Mahan Tavakoli

Roll well, adventurer. The dungeon waits for no one.


Star this repo

About

🎲 Baldur's Gate 3-inspired 3D physics dice roller with AI dungeon master narrations. Real Ammo.js physics, cinematic themes, Gemini AI. Roll for initiative.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages