39,327
edits
m (Mass update links) |
m (Mass update links) |
||
Line 4:
For example, [[Role Playing Game|Role Playing Games]] will commonly use a random number generator to determine if a blow landed in combat. If so, the random number generator might then be called again to determine if it is a [[Critical Hit]] or not; then yet again to determine what percentage of the character's maximum attack power will be applied to the enemy.
Note that almost all computer systems are incapable of producing truly "random" numbers on their own. Some have [
This works rather well with traditional computer systems, where the time will be different every time you start a program (making it very difficult for the user to predict the seed used, especially if a program re-picks one every time it calls the random number generator), but older video game consoles didn't ''know'' the time of day. So they had to use certain tricks.
Line 10:
One method commonly employed was to start a timer when the console powered up, then grab the current value from that as required. Another method was to modify the current random value by a number based on the controller input each frame. This would appear random to the user. However, through [[Emulation]], one can actually determine the algorithm in question by reverse-engineering and then provide controller input to get whatever random number you want. In tool-assisted speed running, this is known as "luck manipulation".
Some games look to other sources for a seed value. For example, the [[Game Boy Advance|GBA]] game ''[[
Whether a video game using a timer-based random number generator is more "random" than a real set of dice is debatable. In practise, so long as the program is using a fresh seed every time it starts, and the player doesn't know what that seed is ahead of time, there should be no way to consistently predicting the outcome of a decent-coded random number generator. If the seed ''is'' predictable, then the results of the random number generator are, too.
|