Monday, April 23, 2007

Alternate Pseudo-Random Number Generator

By:
"When developing games you often need a PRNG that, once initialized with a seed value, produces always the same sequence of random numbers after it. The Math.rand() function in Flash is a PRNG, but it doesn't let you define a seed value (I think it's picked randomly when the swf starts, but there isn't much information about it) so another solution has to be found."

An interesting alternate way to generate pseudo-random numbers using ActionScript.

0 comments: