- Home /
faulty randomness (uniform RNG)
dear unity users I am trying to generate uniform random numbers for my tiny game that yields a certain outcome if the generated number is in certain range.
The user bets a certain points and gets a 2x reward if the generated number is above 65, 5x reward if it is above 85 etc
As I sit down and do the math, it should yield 80 reward points for 100 points played. Yet it yields around 65 (I have done this over 100 000 times) I am using Random.value*100 as my random generator where the Random is UnityEngine random not system random.
I also have a big prize condition that requires the number to be higher than 99.99~ even tho I have automnatically played 100k times I didnt see it happening.
I would love to hear possible solutions thanks.
2x reward if the generated number is above 65 5x reward if it is above 85 etc.
Hmm... ideally I would need "etc." to be defined in order to exactly obtain the expected average reward points...
Then there's a problem with your code. But, as you haven't shown it to us, we can't really help...
Your answer
Follow this Question
Related Questions
Can't get Math Functions to Work in Compute Shader 0 Answers
Getting UI into the right position after releasing drag 1 Answer
How to get a vector3 (postion) 1 unit away from another in the direction of a 3rd vector3? 2 Answers
Finding a specific point on the edge of a triangle 1 Answer
Achieving consistent jump height regardless of vertical velocity 2 Answers