We hear the term all the time in video games, most often in phrases like "I got terrible RNG during this run" or "My speedrun was ruined by bad RNG." In everyday gaming slang, players use it to describe the overall outcome of a game's random systems and how "lucky" they got - whether they managed to loot a powerful weapon, land a critical hit at a crucial moment, or draft cards that synergize perfectly.
While that is how the term is used in casual conversations, it is actually a bit of a simplification.
To understand how randomness really shapes our gaming experiences, let's break down what RNG actually means, how it works under the hood, and the clever mind tricks developers play to keep us from losing our sanity.
What Is RNG and How Does It Work?
RNG is an acronym for Random Number Generator. Technically speaking, it is a piece of code - often built directly into a game engine or available through ready-to-use functions in standard programming languages. Its job is to generate random numbers, which the game then uses to make decisions.
Thanks to RNG, a game engine can determine:
- Which cards appear in a shop
- How much damage an attack deals within a specific range
- How much gold drops after defeating an enemy
This term is most commonly associated with roguelikes, where randomness forms the core of the gameplay loop. It is especially visible in procedural generation, where level layouts rely heavily on random number generation to build fresh maps. The concept also heavily dominates discussions within the speedrunning community, where a fraction of a second can decide a world record. Since a runner's success frequently depends on favorable random outcomes, a single moment of bad luck can instantly ruin hours of otherwise flawless play.
From Code to Gameplay Mechanics
To understand how simple this is at its core, consider a basic Python script using a built-in module called random:
import random
# Rolling a random number between 1 and 100
rolled_number = random.randint(1, 100)
By requesting a random number between 1 and 100, every button click or action triggers a new result. While the core source code of the underlying generator is much more complex and hidden within the programming language itself, the script gives a raw output.
However, a raw number on its own doesn't do much. To turn it into a functional game mechanic, that number needs to be mapped to an outcome:
import random
roll = random.randint(1, 100)
if roll <= 60:
reward = "Rusty Claymore" # 60% chance (Common)
elif roll <= 90:
reward = "Frostbite Quiver" # 30% chance (Rare)
else:
reward = "Infernal Scepter" # 10% chance (Legendary)
Just like that, a raw number becomes a functional loot drop mechanic.
If you take it one step further - hiding the raw numbers from the user interface and running that same logic to generate a starting deck - the player completely loses sight of the underlying RNG system. To them, it looks like a polished deck-building screen, but behind the scenes, it is the exact same engine driving the experience. Modern games take this concept and perform dozens or even hundreds of these operations every single second.
The Myth of "True" Randomness
Here is an interesting reality: an RNG does not actually generate truly random numbers. Computers, as deterministic machines, are fundamentally incapable of doing so.
If you start with the exact same starting point (called a seed) and use the same algorithm, you will always get the exact same sequence of "random" numbers. That is why they are technically called pseudo-random numbers. However, the algorithms behind them are so advanced that for the average player, the difference is practically unnoticeable.
Sometimes, RNG implementations can be rather unique. A fascinating example is the original Doom. In classic Doom, the game engine does not calculate random numbers on the fly at all. Instead, it simply pulls values one by one from a pre-defined list of 256 numbers. Once it reaches the end of the list, it loops back to the beginning and repeats the sequence indefinitely.
Game Design Shenanigans: How Developers Manipulate Probability
True RNG implemented directly as a game mechanic can feel brutal. This is well illustrated in Balatro. The game features a Tarot card called The Wheel of Fortune, which offers a 25% (or 1 in 4) chance to add a powerful upgrade to a random Joker. Community analysis of Balatro's code confirms that the stated probabilities are completely accurate - the developer isn't hiding anything. Yet, while playing, it often feels like this upgrade almost never lands. It turns out 25% is simply not as high as our brains expect it to be.
This highlights a core problem in game design: the human brain is notoriously bad at processing raw probability. If we have a 25% chance to upgrade a card and we fail fifteen times in a row, we immediately assume the game is broken or rigged.
To keep games feeling fair and enjoyable, developers often hide or tweak raw RNG behind clever systems.
1. Pity Timers
A Pity Timer is a hidden system where the game artificially boosts your odds after consecutive failures.
A prime example of this is Slay the Spire. To prevent players from getting stuck with a weak deck, the game monitors how often rare cards appear on reward screens using a hidden counter. Your base chance of seeing a rare card after a standard fight actually starts at a negative percentage. However, every common card generated in your rewards quietly increases that chance by 1%. The longer you go without seeing a rare card, the more the game bends probability in your favor, ensuring you eventually draft the tools needed to survive.
Similarly, in Hades, going too long without picking up a crucial Daedalus Hammer or hitting rare boons forces the game engine to practically guarantee their appearance in subsequent chambers.
2. Pseudo-random Distribution (PRD)
Instead of rolling a virtual die with a static percentage on every single attempt, games often use Pseudo-random Distribution to dynamically adjust probability on the fly.
Consider Warcraft 3 and the Blademaster hero, who has a 15% chance to land a Critical Strike. Under true RNG, entering a fight relying on a static 15% chance would be a massive gamble - you could easily go an entire skirmish without a single critical hit. With PRD, every attack that fails to crit quietly increases the probability of the next strike being a critical hit. Once a crit lands, the probability resets to a low base value.
This creates a consistent rhythm where player excitement stays high, while frustrating streaks of bad luck are kept to a minimum. Similar systems are used across almost every modern action game featuring critical hits or percentage-based status effects.
3. Faking the Math Entirely
Sometimes, developers outright lie about the numbers to protect player sanity.
In tactics games like XCOM 2, player perception struggles with raw statistics - we subconsciously treat an 85% chance to hit as an almost guaranteed success. To prevent players from losing their minds after missing high-probability shots, the developers secretly cheat in the player's favor on almost all difficulty settings.
When the user interface displays an 85% chance, the underlying engine actually rolls the dice with a hidden 93.5% chance (thanks to a 1.1x multiplier). On top of that, every time you miss, the game quietly adds a hidden accuracy bonus to your next shot until you land a hit - doing everything possible behind the scenes to save you from absolute frustration.
Conclusion
RNG is far more than just casual gaming slang. While it sits at the heart of how games generate variety and challenge, pure randomness is rarely what players actually want. Behind every sudden drop, critical hit, or card pull is a mix of complex algorithms and deliberate design tweaks - all carefully engineered to make chance feel balanced, rewarding, and fair.