# How Luck Based Games Simulate Randomness

Video games can be split into two main categories: those that focus on luck and those that require skill. Having said that, most games these days combine elements of both. Of the two, many prefer luck-based gaming because they find it more exciting, compelling and unpredictable. In real life, luck seems to be random. If you flip a coin, for example, there doesn’t appear to be any major factor that can influence the result; luck, apparently, determines whether it’s heads or tails. If you’re wondering how this is done in video games, carry on reading.

### Randomness in Video Games

All sorts of variables in video games seem to be determined by chance. If you’re in a dungeon, for example, and there’s an enemy at the end, you might think that the enemy’s actions are random. After all, if you replay the level, the actions are different. The truth is that there’s an advanced piece of software that determines what the enemy does. This software affects just about everything that has a random outcome or can proceed in multiple different ways.

### RNGs

The software is known as a random number generator, or RNG. Though it’s highly sophisticated, it works in a rather straightforward way. When you turn on a video game, the RNG selects a seed number. Each seed number has its own sequence of ‘random’ numbers. When the game starts, the RNG starts running through the chosen sequence of numbers. If the game needs to choose something, such as the enemy’s actions, it looks at the current number produced by the RNG.

Let’s say the enemy has five possible actions: call for help, kick, punch, defend and run away. When you get close enough to the enemy, it performs one of these five. At the precise moment you get close enough, the game checks what number the RNG has produced. This number determines the enemy’s action. The RNG could have numbers ending in 0 or 1 for a call for help, 2 or 3 for a kick and so on.

### Casino Games

But what about casino games where there’s actually meant to be a real element of luck? RNGs are used in these too. Numbers are generated and each one corresponds to a possible outcome. When you get dealt a hand of cards in blackjack, an RNG determines which cards you’ll receive. Likewise, numbers decide what symbols come up when you spin the reels of slots. If you’re lucky enough to win, you’ve simply been lucky enough to have the numbers pick a good outcome for you.

### RNG Manipulation

Some people have come up with ways of manipulating RNGs for their benefit. By extracting data, they’ve been able to find out what numbers produce what actions and when these numbers come up. Since each seed number has a set sequence of numbers, if you know the seed number, you’ll be able to tell what numbers are going to come up and when. But because the numbers are produced extremely quickly, you have to trigger the action at the exact moment to get the desired result.