It all started when my mum asked me to install a virtual dice app for her. There are tons of these apps in app stores but they either have crappy UX or tons of ads - the payed ones I didn't even consider. So after some time searching, I naturally vibe coded my own, which IMHO is now one nicest dice apps out there. Source:

Replies (17)

Dice don't always settle. Detect when that happens or remove friction from every dice touching another dice or the wall. image
One thing worth checking in your code: how crypto.getRandomValues maps to die faces. A naive byte modulo 6 skews the results, since 256 is not divisible by 6, so faces one through four come up slightly more often. The fix is rejection sampling: 252 is the largest multiple of 6 in 256, so accept bytes 0 to 251 and redraw on anything higher.
I remember around covid time I wanted to make a dnd thing and I don't remember if this was online or only a github repo but I remember using a sick ass dice rolling engine like this. I don't remember anything about where it is anymore.... Oh shit. I found it.. And this was before AI bro!
Sweet app. Always love to see local-first shenanigans on hand. One issue I have is that, when I tried to read the Story Cubes document to understand it... it's in German. I'll have to translate it to English (since I don't speak a lick of German), and go from there.
โ†‘