RNG Manipulation

Many of the events in the game are driven by the Random Number Generator (RNG). The next punch an opponent will throw, the delay before he throws it, the count he gets back up on, and the size of his HP refill when he gets back up with are just a few examples of game elements that can be influenced by RNG. Understanding how RNG affects the game can lead to better speedrunning routes, and in some cases can even be used to manipulate the outcomes of "random" events.

The only source of entropy (randomness) in the game is user inputs from the controller. The input history from controller 1 is combined with the frame count to generate a new 8-bit "random" value each frame. This value is stored in RAM location `$18` and is read by the various subroutines that require randomness.

See Also

Behavior Tables