What Is RNG? A Lesson for Gamers



What is Random Number Generation (RNG) and how does it effect video games? Here’s everything you need to know about random number generators (RNGs) and how they’re utilised in games.

Have you ever felt daunted by the sheer quantity of acronyms in the gaming world? There’s a lot to remember, from genres to technical jargon. What is RNG, for example?

We will define RNG in the context of video games in this post. We’ll look at what RNG means, look at various examples, and see how it relates to speedrunning.

What Is Random Number Generation (RNG)?

The term “random number generator” refers to a computer programme that generates random numbers. A random number generator is a device or algorithm that generates numbers by chance. RNG, in game terms, refers to events that do not repeat themselves every time you play.

While it may appear to be straightforward, computers have difficulty generating random numbers. This is due to the fact that computers are programmed to obey instructions, which is the polar opposite of randomness. Giving instructions on how to chose something randomly is an oxymoron, therefore you can’t just order a machine to “come up with a random number.”

Pseudo-RNG and True RNG

As a result, if you want to generate a really random number with a computer, you’ll need to use a hardware random number generator. To generate random numbers, this method employs minute physical phenomena such as electronic noise.

Because no one can forecast or know what is going on with these undetectable events, they are as random as possible. This type of RNG is essential in security-centric systems, and it’s why it’s used in so many encryption schemes. It would be a major problem if someone could figure out how the system generated “random” integers for an encryption protocol.



With game RNG, though, this isn’t an issue. Many programs, especially games, employ pseudorandom number generation for increased speed and reproducibility.

int rand = (a * milliseconds + b) % c

Pseudo-RNG generates a random number using an algorithm (think of it as a formula) that performs mathematical operations on a seed (beginning) value. It’s critical to select a seed that’s as random as possible to get different results each time.

A simple example would be to use the current milliseconds as a seed and then conduct the following actions on it:

Because the same seed produces the same outcome every time, this isn’t truly random. But it’ll enough for video games.

In gaming, RNG is used in a variety of ways.

Now that you’re familiar with RNG’s mechanics, let’s examine at some examples of RNG in games to understand how it functions.

RNG Loot

In loot-focused games like Destiny, Borderlands, and Diablo, RNG plays a significant part. The reward you receive when you unlock a treasure chest or beat an adversary is not always the same. Because the system chooses it at random each time, you can get lucky and acquire a super-rare item right away, or you might get a low-level piece of armour over and over.

Of course, loot drops aren’t fully random in order to keep the game balanced. They’ve set up procedures to keep you from receiving the best weapon in the game from the first treasure chest you open. Each game handles this differently, for example, by limiting the items you get dependent on your player level.

One of the reasons video games are so addictive is the need to constantly acquiring greater stuff.

Using RNG to Calculate Chance Percentages

RNG is used in many games to determine the probability of a specific event occurring. This is very prevalent in role-playing games (RPGs).



When you attack in JRPGs like Persona 5 or Chrono Trigger, for example, you could get a critical hit, which deals extra damage. This occurs at random in many games, though you can boost your chances by using specific items. RNG controls how often wild Pokémon battles occur and which creatures you encounter in a Pokémon game.

Similar examples can be found in games such as Super Smash Bros. Mr. Game & Watch features a move called Judge that when used displays a number from one to nine. Each time you use RNG, the value is determined, with the exception that you cannot get the same number twice in a row.

RNG-based procedural generation

The Random Number Generator (RNG) is at the heart of procedural generation, a popular gaming trend. The term “procedural generation” refers to the method of developing game content using an algorithm rather than by hand.

Minecraft and Spelunky are two well-known games that use procedural generation. These games use a seed value to create distinct worlds, ensuring that each player has a different experience each time they play.

Game developers, like other types of RNG, impose constraints so that worlds aren’t generated wholly at random. In Minecraft, for example, you won’t discover random floating ground blocks above an ocean.

Randomness in Speedrunning

There’s a chance you’ve heard of RNG in video games when it comes to speedrunning. Because speedrunners want to finish a game as quickly as possible, they put in a lot of practise time to learn the game inside and out. RNG provides an element of uncertainty to speedruns, which is understandable.

RNG isn’t necessarily negative in speedruns, even though it frequently causes problems. Because it’s easier to increase your time with a little luck, having some variation between runs can make the game more enticing.

RNG for minor to moderate speedruns

RNG can be largely irrelevant to a run at times. The precise location of foes in a room, or if you receive a critical hit in a typical encounter, will have little impact on your overall duration.

RNG can also cause severe slowdowns in other situations. In Super Mario Sunshine, for example, the boss battle against King Boo is spinning a slot machine with five different results. You must first match three pineapple images to produce a variety of fruits before you can injure him.

After that, toss a pepper at him to burn his tongue on fire, then hit him with any other fruit you can think of. With favourable RNG, the peppers will emerge at a convenient spot, allowing you to finish the fight swiftly. However, if you have bad luck, you may have to spin the roulette wheel several times and waste time.

Random Number Generator (RNG) that Breaks the Rules

In other games, getting unlucky with the RNG can completely derail a run. Banjo-Kazooie is a good example of this.

You enter a quiz show called Grunty’s Furnace Fun near the end of the game, where you are tested with questions concerning your trip. The game’s villain, Gruntilda, is the subject of one type of square on the board. Brentilda, her sister, will provide you with the answers to these questions if you speak with her during the game.

On each replay, however, the right answers to these questions are different. Because speedrunners don’t want to waste time conversing with Brentilda, they must make educated guesses at this stage. This is entirely dependent on chance; if they choose the incorrect answer too many times, they may die and lose a significant amount of time.

For a speedrun, having this RNG-dependent portion at the end of the game is irritating because the runner has no choice but to hope for the best. Despite this, as shown in the video below, speedrunners frequently devise ways to circumvent these hurdles.

Manipulation of the Random Number Generator

As previously stated, the pseudo-RNG in video games isn’t genuinely random because the same seed may be used to repeat the same outcomes. The seed in many games has an internal timer, which might be tough to hack. Other games, on the other hand, are considerably easier to tinker with.

Golden Sun, a Game Boy Advance RPG, is an excellent illustration of this. The rewards you receive for completing a combat are determined by the activities you did throughout the battle. This means that if you fight the same foes with the same techniques every time, you’ll get the same drops every time.

Emulation tools can be used by speedrunners to evaluate a game and see if they can alter the RNG. They can then take advantage of it by ensuring a desired outcome or reducing RNG-related time waste. This type of RNG, on the other hand, is as good as random to the average player who doesn’t comprehend the seed.

You now have a better understanding of the role of RNG in gaming.

In video games, too much randomness can lead to emotions of despair or futility, resulting in “gaming weariness” or “gaming burnout.” If you’re experiencing this, you might want to check at ways to deal with gaming tiredness and burnout.

We’ve discussed what RNG is, how it influences games, and how it relates to speedruns. As a result, you should have a greater knowledge of the importance of RNG in gaming. Now is the time to look at some of our favorite video game speedruns.



Mark Funk
Mark Funk is an experienced information security specialist who works with enterprises to mature and improve their enterprise security programs. Previously, he worked as a security news reporter.