It’s worth reminding yourself that if you are developing a game that makes use of a computer, and you want to generate random numbers, that computers are not very good at random.

They are great at almost-random, looks-random-to-me and might-as-well-be-random, but if it really needs to be totally random, as in a coin flip random, then it’s hard. My Countdown Game implementation doesn’t really need truly random numbers, online poker sites are not so lucky.

If you really need something to be random, and unduplicatable, then it’s possible, Jeff Atwood talks about it in a post on Card Shuffling on his blog.

You won’t often need poker site levels of randomness, just something that is good enough. I want people to just stop and think about what is good enough before you start throwing around Rand functions and taking bets from credit cards.


2 Responses to “Random”

  1. dnelsonart Says:

    Have you checked out http://www.random.org? They generate ‘true’ random numbers (which I use in my paintings) and interesting discussion regarding randomness.

  2. toadflaxgames Says:

    I’ve not looked at it before, but they’ve got a good explanation of Pseudo-Random Number Generators (http://www.random.org/randomness/), these are essentially what your computer uses to create random looking numbers.

    As the site states, they’ll probably be good enough unless you are really dependent on there being true randomness in you results, in which case you need to find a better source (such as the numbers from the random.org generator).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: