News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
math.random(what?)
Author Message
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1
RE: math.random(what?)

Not sure I can explain it.

Basically computers can not create true randomness since everything they do is based on a calculation which can only done with given parameters.

By seeding it with a value that is not its default it has a new parameter to play with.

The random seed does not need to constantly change, it only needs to be called once, but by updating the seed its more likely to give you the appearance of greater randomness.

Although other programmers argued against my technique,
I just feel its more random if I use two random numbers:

If random number A is greater than some value, then roll random number B and use that, else just use random number A.

I guess they had a point that I was using an extra cycle or something.
But I doubt my gigaflops calculating computer is going to care.

07-27-2007 03:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
math.random(what?) - mikshaw - 07-27-2007, 09:08 AM
RE: math.random(what?) - iGame3D - 07-27-2007, 10:06 AM
RE: math.random(what?) - mikshaw - 07-27-2007, 01:37 PM
RE: math.random(what?) - iGame3D - 07-27-2007 03:16 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: