RolePlay onLine RPoL Logo

, welcome to Technical Discussions

18:52, 28th March 2024 (GMT+0)

Is Dice Roller affected at all by browser cookies/cache?

Posted by Bruiser419
Bruiser419
member, 16 posts
Thu 2 Jul 2020
at 13:12
  • msg #1

Is Dice Roller affected at all by browser cookies/cache?

I'm pretty sure the answer is no, but I was just wondering if there was any chance that the Dice Roller is affected by the cookies/cache in your web browser?

I seem to be rolling rather awful lately, and I know that with as many die rolls the site does, it's most likely just random bad luck, but just curious.
slogworx
member, 6 posts
https://slogworx.com
Fri 3 Jul 2020
at 01:08
  • msg #2

Is Dice Roller affected at all by browser cookies/cache?

In reply to Bruiser419 (msg # 1):

I'd love to see the code for the dice roller. I, personally, don't use it, because most programmatic rollers aren't random or even well done. Also, I just like to roll physical dice.
Evil Empryss
supporter, 1573 posts
Insert witty and
appropriate quote here
Fri 3 Jul 2020
at 01:54
  • msg #3

Is Dice Roller affected at all by browser cookies/cache?

I read once, years ago, that the dice roller is affected by the color you choose to present the results in. I think it was BigBadRon who said it, but I wouldn't swear it under oath.

You might want to do a google search of the site for "dice roller" and see what else people have said about it.
SunRuanEr
subscriber, 288 posts
Fri 3 Jul 2020
at 01:55
  • msg #4

Is Dice Roller affected at all by browser cookies/cache?

...that would make so much sense, if it was, because I sometimes tend to make the dieroller go in whatever my character's speech color is, and it definitely /hates/ my D&D fighter with a burning passion. (And he's the only character that uses his particular color.)
This message was last edited by the user at 01:55, Fri 03 July 2020.
nauthiz
subscriber, 661 posts
Fri 3 Jul 2020
at 01:56
  • msg #5

Is Dice Roller affected at all by browser cookies/cache?

Here's more information regarding the roller and its programming.

link to a message in this forum
slogworx
member, 7 posts
https://slogworx.com
Fri 3 Jul 2020
at 02:04
  • msg #6

Is Dice Roller affected at all by browser cookies/cache?

In reply to nauthiz (msg # 5):

Thank you! I'm familiar with perl and Debian, so I can find the code.
slogworx
member, 8 posts
https://slogworx.com
Fri 3 Jul 2020
at 02:06
  • msg #7

Is Dice Roller affected at all by browser cookies/cache?

Though if the above link is accurate for this site, the answer is likely no. Your cookies and no HTML (including color of text) is going to affect the random result.
slogworx
member, 9 posts
https://slogworx.com
Fri 3 Jul 2020
at 03:16
  • msg #8

Is Dice Roller affected at all by browser cookies/cache?

Looking at the post above referenced by nauthiz (2005), the random number generator looks legit enough. And as somebody that's coded stuff for frontend and backend stuff for many years, there is no reason to include the cookies or any POST data (html colors, cookies, etc) in the seed. Any coder worth his salt (pun intended for coders that get it) wouldn't do that. And it's actually harder and requires more code to include POST data in the code. But obviously there is no way to know for sure without actually seeing the code that the website uses. But if they're using the standard Perl libraries and random device, you can trust that the random number generator is random enough. But that being said...

Programmatic random number generators and seeding devices aren't designed for roleplaying games. They're designed for encryption. You're potentially getting rolls that are "more random" than they should be. Since there is no money in researching hand-rolled dice vs. programmatic generators in roleplay games, we can't really collect the data we need to test if the difference is statistically significant. Personally, I believe it is statistically different. There is a data set out there where it may be tested, though. We just have to devise the best way to test it (https://www.critrolestats.com/ has 5ish years of weekly rolls available via the google docs api.)
rastashana
member, 2 posts
Fri 3 Jul 2020
at 04:12
  • msg #9

Is Dice Roller affected at all by browser cookies/cache?

In reply to slogworx (msg # 8):

By nature random is just that but doesnt mean its all over the place. Best example is a pack of cards. Toss them up in the air and watch how they fall. That is pure random chance. Some cards are going to be further away but there will always be overlap. Some cards will have stayed together or fallen nearer, others further but again random does not mean equal distance apart.

Best seed to use is system time, this is from coding experience. Otherwise if you use the same seed you will get the same results every time. Kinda like insanity >.>
This message was last edited by the user at 04:13, Fri 03 July 2020.
Imladir
member, 34 posts
Fri 3 Jul 2020
at 08:27
  • msg #10

Is Dice Roller affected at all by browser cookies/cache?

Except that a computer can't do random. It's NEVER purely random. All a computer can do is pseudo-random. No matter which algorithm you take, if you initialize it with the same seed, you will always have the exact same sequence of numbers, no matter how many of them you want to take.

And of course, not all psuedo-random number generators are equal. There are lots of trade offs being made regarding complexity, time, memory use, sequence length, etc.

One thing for sure, is that for anything a little bit serious, you should never ever use the rand() function from a unix system it's just straight awful (bias towards low numbers). urandom doesn't have that specific problem, but it's not true random either. Of course as long as it does the job, it doesn't matter all that much.

That being said, as someone who's been on the wrong end of a roller who's been angry for quite some time (20d20, 2 rolls above 11...) I can't help but have my doubts. That being said... We're the type of people who would just change a die on the table as if it magically solved everything despite knowing perfectly well that it doesn't, so...
Sign In