![]() ![]() The sequence of numbers is determined based on an initial starting value, called a seed. The sequences have no discernible pattern, so they seem random. Pseudo-random number generators are not truly random (hence “pseudo”) and instead use an algorithm that spits out sequences of deterministic numbers. (If you understand the basics of pseudo-number generation you can skip this) Here are the best practices we established for RNG when making Sparklite. In these cases it’s important to approach random number generation deliberately. But many procedural games require random number generators (RNG) to be predictable, for example to generate the same world from a single seed value. The built-in Random class allows us to quickly generate all types of pseudo-random numbers (for simplicity I’ll just call them random for this post), and it is more than enough for simple projects. It’s easy to generate random numbers in Unity. Generating Predictable Random Numbers in Unity
0 Comments
Leave a Reply. |