talking D20 statistics

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
FBeels
 
Posts: 8
Joined: Thu Feb 18, 2021 7:50 pm

talking D20 statistics

Post by FBeels »

So the talking D20 project https://learn.adafruit.com/talking-d20- ... gaming-die has been out for some time now and I'm sure more than a couple people have built it by now.

How are the stats on the rolls? does it favor certain numbers over others? or is it roughly balanced? if it's not balanced how have you corrected it?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: talking D20 statistics

Post by mikeysklar »

I've not seen a writeup on the stats, but the code is using the Arduino random() function with a randomSeed(analogRead(0)). This means a free floating analog pin is the seed source. There are lot of other forums that get into the quality of these random numbers, but this is generally considered "pretty good" form.

code:
https://github.com/adafruit/Talking_D20 ... 20/d20.ino

discussion examples:
https://forum.arduino.cc/t/fixing-the-r ... ad/65726/7
https://forum.arduino.cc/t/randomseed-a ... 0/109478/2

User avatar
adafruit2
 
Posts: 22144
Joined: Fri Mar 11, 2005 7:36 pm

Re: talking D20 statistics

Post by adafruit2 »

its totally not random because the die is not weight balanced. its meant to be a fun project, not a RNG!

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”