Yes it is a vibe-coded static site, but I'll share it anyway since people have liked it and actually seem to be using it as I would have intended. For me, it was just sad I couldn't find a good free dice rolling app... I couldn't find this version and the ones I did find were covered with ads. I won't put ads in this one and have no costs to cover since it's hosted on GitHub pages.
Comments
muti•1h ago
Have you analysed the fairness of the rolls? Just after a quick play around it doesn't look like there is enough energy in the throws that I would be confident it is.
10,000 throws with small perturbations in the starting conditions should be distributed evenly across all sides of the die.
Alternatively you could use RNG to generate a fair result, simulate the throw, and then set the sides of the die to produce the result from RNG. This is all academic though and I imagine anyone using the site won't be bothered.
swid•59m ago
There are tests, but I don't collect any real usage statistics to double check them... I could believe that if you pick up the dice and carefully throw it lightly, you can control the values more than intended, and this value would be somewhat correlated with the previous roll for quick enough rolls.
I did think about changing the rotation speed of the dice before you throw, kind of speed it up and slow down. I first added the shuffling effect if you hold them; kind of a shell game animation. If I improve it more, occasionally giving some dice a swift spin would make it harder to defeat I think.
Like you say, this is intended for people who are not going to cheat each other and just want to have fun, so I won't make it worse to account for it.
I guess it works better on mobile with a swipe. I could change space to hold it a brief moment and throw it harder. Now that I am looking at it, that is probably what you mean.
I think I want it to use physics in the end though, not map an RNG result at the end. You can see the faces and what you get is like a real die. If someone can beat it, maybe that is good for them.
muti•1h ago
10,000 throws with small perturbations in the starting conditions should be distributed evenly across all sides of the die.
Alternatively you could use RNG to generate a fair result, simulate the throw, and then set the sides of the die to produce the result from RNG. This is all academic though and I imagine anyone using the site won't be bothered.
swid•59m ago
I did think about changing the rotation speed of the dice before you throw, kind of speed it up and slow down. I first added the shuffling effect if you hold them; kind of a shell game animation. If I improve it more, occasionally giving some dice a swift spin would make it harder to defeat I think.
Like you say, this is intended for people who are not going to cheat each other and just want to have fun, so I won't make it worse to account for it.
I guess it works better on mobile with a swipe. I could change space to hold it a brief moment and throw it harder. Now that I am looking at it, that is probably what you mean.
I think I want it to use physics in the end though, not map an RNG result at the end. You can see the faces and what you get is like a real die. If someone can beat it, maybe that is good for them.