Another 3d Dice roller! https://manthrax.github.io/three-polydice/polydice.html

Small world. :smiley: I’ve also vibed a 3d dice roller but I’ve used some different approaches from another dice roller posted here yesterday… It’s interesting but unsurprising how much crossover there is in the terminology chosen by the LLMs on the 2 projects. I’ve made a few dice rollers over the years, and this one is the most complete I’ve made so far.

The dice are procedurally generated.. there is an editing UI, and a dice bag.. and the ability to use it as a library to generate screenshots, or json, vs 3d. You can export the dice as .glb also.

There is also a facility to connect users into rooms/parties and the room host, can switch who’s turn it is to roll.. players can roll dice from their own bag, and connected users see the resulting rolls.

Contrary to how it appears, the rolls are not done with the physics engine itself, since this doesn’t have any strong guarantees about randomness, and would play out differently in different clients, unless each client ran the roll in a deterministic lockstep sim with the same exact models, timing, and time stepping.

Instead, rolls are computed via RNG, and the resulting physics roll playback is modified to produce the result from RNG.

This way, different users could see the roll on different or optimized dice shapes, in different sized rolling trays/dice towers, but still get consistent results.

There are still some issues with occasional cocked dice, but the engine states an authoritative result that looks plausible from the roll.

2 Likes