Video games are full of randomness.
There are roguelikes with procedurally-generatedlevel layouts.
Role-playing games with random encounters.
Strategy games with unlucky misses.
And games that play with cards, dice, roulettewheels, and random number generators, or RNG.
It’s all the same stuff, really: situationsand systems where the outcome is not fully determined by the developer or the player, but driven by the unpredictable whims of lady luck.
But while randomness is responsible for sometruly wonderful moments in gaming, it can also be a cruel mistress that leads to unfairoutcomes and frustrating failures.
RNGesus – who is the personification of luckin the gaming community – is cursed just as often as he’s worshiped.
So, what gives? Why does this single game design tool leadto such radically different reactions? Do we just like luck when it lands in ourfavour, and hate it when we lose? No, I don’t think so.
The truth is, some game designers actuallysplit randomness into two distinctly different concepts – and recognising these differencescan be the secret to wrangling RNG, and making luck more fun than frustrating.
I’m Mark Brown, you’re watching Game Maker’sToolkit, and this is the two types of random.
Before we get to that, though, I think weneed to talk about why randomness is used in game design, at all.
For starters, randomness is used to providevariety.
Well-made algorithms can pump out practicallyinfinite set-ups, levels, characters, and problems.
Sure, a procedurally generated level is almostnever as good as a completely hand-crafted one – but the clear advantage is diversityand quantity.
You couldn’t make a game like Shadow ofMordor, with its unique cast of Orc captains; or Minecraft, with its infinitely-large worlds, without a big dollop of randomness.
Some games generate content once, and thendistribute that to all players – that’s how every No Man’s Sky player gets to explorethe same set of, uh, 18 quintillion planets.
Other games generate new content every timeyou play, which is how games in the roguelike genre work.
That can be beneficial because by removingthe ability to endlessly replay the same level and memorise every aspect of the stage, playersare forced to master the underlying mechanics of the game itself – so they’re ready forabsolutely anything the algorithm might throw at them.
Randomness is also a way to balance a multiplayergame.
Basically, lucky rolls and unlucky draws canlimit the importance of pure skill, and give newer players a chance to get ahead.
That’s especially true when the randomnessis weighted in favour of new players, such as in Mario Kart where the random item boxesare way more generous to the players at the back of the pack, than those in first place.
This is usually only desirable when it’sexpected that players of vastly different skill levels will be playing together – otherwise, the randomness can obscure who is actually the most skilled combatant.
So that’s why it appears more often in partygames and board games for families, and not esport-level stuff.
Randomness can also be used to make rewardsin games more exciting.
Grabbing an awesome new weapon from a deadbody in a looter shooter like Borderlands is way more exciting when you know there wasonly a small chance for that gun to drop.
This can, of course, be taken to the extreme, creating a Skinner box trick that’s designed to sap your time or, more perniciously, yourwallet.
And finally, randomness can play a role inthe player’s formation of plans – which are strategies that take a number of stepsto achieve.
Making plans requires information – whichis essentially the current state of the game’s variables like the enemy’s location, health, and perhaps even their intention for what they’ll do on the next turn.
The more information we have, the better ourplans can be.
But too much information can actually be quitetroublesome.
For one, complete transparency can lead toplayers being able to calculate many possible moves into the future to figure out the optimumchoice – a paralysis of analysis which can be super tedious, but you already know howplayers can optimise the fun out of a game.
This can already happen on a single turn ofInto the Breach, which is a tactics game that shows you the entire board and every enemy’splan for their upcoming turn.
You can spend 10, 20 minutes just staringat a static screen, figuring out the ramifications of every choice you might make.
Plus, we can create airtight plans which rarelyfail – like in Plants vs Zombies where we get to see the exact cast of upcoming monstersand can quite easily create the perfect defence.
This can create flat and uneventful gameplay, as it’s often much better when plans get disrupted with surprising new information- forcing us to react, regroup, and replan.
There’s never been a good movie where theheroes come up with a scheme and it just perfectly works as intended.
Drama is driven by the unexpected.
So we generally want to cap the amount ofinformation the player has access to.
The game designer Keith Burgun calls thisthe information horizon, defined as “the distance between the current turn, and thepoint at which information becomes known to a player”.
And there are four main ways to do this – exponentialcomplexity, like the ever-expanding matrix of game states in chess.
Execution uncertainty, which comes from theplayer’s unpredictable ability to carry out skill-based challenges.
Hidden information, like the fog-of-war thathides the enemy’s plans in Starcraft.
And, the one we’re talking about today – randomness- like not knowing what the enemies will do on the next turn in Into the Breach.
You can’t make perfect plans if certainfactors are, by design, completely unpredictable.
So, randomness certainly has a role in gamedesign.
But to really get to grips with it, we needto break it down into two types – which game designers frequently refer to as input randomness, and output randomness.
Input randomness is when a random event occursbefore the player gets to make a decision.
The most obvious take on this is the procedurallygenerated levels in a roguelike, because they’re cobbled together and then you get to playin them.
Other examples are drawing a hand of cardsbefore taking your turn in a deckbuilder, or rolling dice and then choosing where tospend them in Dicey Dungeons.
Output randomness, though, is when you makea decision and then luck takes over and the game tells you what happened.
The most infamous example of this is hit chancesin XCOM, where you tell your soldier to shoot an alien – but it’s down to chance whetheryour bullets will actually hit their target.
Other examples are not knowing what the enemywill do until after you press “End Turn” or, I guess, paying for a lootbox and onlyafterwards being told what was in it.
I’ve heard the same concepts be called pre-luckand post-luck, by Civilzation 4 designer Soren Johnson.
But let’s stick to input and output forthis video.
These two terms were first introduced, asfar as I can tell, on the podcast Ludology GEOFF ENGELSTEIN: “In general, I find this distinctionbetween input and output randomness to be very valuable.
I think this is the fundamental differencebetween randomness that supports strategy, and randomness that undercuts strategy”.
The host, Geoff Engelstein, makes a good pointthere.
Output randomness is certainly more responsiblefor anger and resentment than input randomness.
Output can take away control, and break yourplans not out of strategic incompetence but sheer bad luck.
And most of the random stuff we like the leastin games can be labeled as output randomness – such as random encounters and loot boxes.
So certain developers are becoming privy tothis – after FTL, which was stuffed to bursting with swingy output randomness, Subset madeInto the Breach which almost exclusively features input randomness – leading to a much fairerand more strategic game.
And while early builds of Slay the Spire hidwhat the enemies were planning to do until after you finished your turn, the devs foundthe game was way more fun when they switched things so the random choice happened at thestart of your turn – allowing you to strategise around your foes.
Output became input.
But I don’t think it’s just a case ofinput randomness equals good, output randomness equals bad.
They’re both tools that must be used wisely, and poorly designed input randomness can wreck a game, just like carefully tuned output randomnesscan, sometimes, improve it.
With input randomness, these unpredictablestarting conditions can sometimes massively dictate the likelihood of success.
So in Spelunky, these crates have random itemsin them.
You’re much more likely to get somethingmediocre like bombs or ropes than something amazing like a shotgun or jetpack – but ifyou are so lucky as to get one of these items at the start of the game, you’re going tohave a much easier time of things.
This can make it hard to tell if your successwas down to skill, or just good luck.
And it can also make runs where you don’tget the goodies feel slightly pointless.
Some speedrunners will just restart the gameover and over again until luck is in their favour, and they get good items in an earlycrate or shop.
To be fair, this does lend Spelunky an interestinglyspiky texture.
But designers have found some clever new waysto present random starting conditions.
In Slay the Spire, the devs didn’t wantyou to just hit restart until you got some really powerful cards or a relic at the beginningof your run.
So they introduced a system where you startthe game with additional bonuses – but only if you made it to the first boss on your previousgo.
This encourages players to at least try toplay with the stuff they’re given, and who knows – maybe they’ll still find a strategythat can see them be victorious.
Another way is to control the randomness insome fashion, to reduce the chaos that it can bring.
When setting up the tabletop game Pandemic, you start by removing all of the epidemic cards from the play deck.
These cards are terrifying game-changing eventsthat can completely demolish your team.
You then split the remaining cards into fourpiles, and shuffle one epidemic card into each.
Finally, you stack the four piles togetherto create a finished deck.
It’s a bit of a faff, but it’s a cleverway of ensuring that you always have a pretty fair game, where epidemic events happen evenlythroughout the adventure.
It’s impossible to have, say, three epidemicsat the very start, or no epidemics until long after you’ve cured all the diseases.
But there’s still a chance of getting twoepidemics in a row, or having an epidemic on the very first turn – though, neither ofthese would break the game, and the odds are slim enough for those to be exciting, surprising, one-off events.
I’ve never said the word epidemic so manytimes.
And, actually, lots of games put limits ontheir randomness.
Diablo 3 has a smart loot system, where you’remore likely to find items that match the character class you’re playing – to reduce the likelihoodof finding pointless hats and swords.
And in modern versions of Tetris, the gamedoesn’t just pick a block at random for every drop.
Instead, the game generates a random sequenceof all seven blocks and then delivers them in that order – before making a new sequence.
This ensures that you’ll always get a diverseselection of blocks, and there’s an absolute maximum of twelve garbage blocks between twogorgeous I-blocks.
Sometimes called line pieces, or Colin Blocksworth.
And, for what it’s worth, while Spelunkytypically has a low chance of randomly giving you one of these icky dark levels – the gamewon’t spawn one if you finished the previous stage in under 20 seconds, just to be mercifulto speedunners.
Another thing to consider is how often arenew input randomness events occurring? If these occur at the start of every singleturn, it can have the effect of drawing the information horizon in claustrophobicallyclose – and stopping you from making plans that last any time at all.
Designers should, ideally, consider theirgame’s information flow – a term invented by Ethan Hoeppner in the article Plan Disruption.
He points to XCOM, where we can make strategicplans about how we want to approach each mission and for a good few turns our plan will bepretty viable – not perfect, thanks to all the output randomness.
But close enough.
But every now and again, you’ll stumbleonto a new pod of enemies, or a fresh bunch of foes will descend onto the battlefield.
This unexpected spike in new information disruptsyour plans and forces you to stop, regroup and rethink.
He says “a good pattern to follow is thespiky information flow, in which high-impact information is collected into discrete spikesthat happen at regular intervals, with a slow, regular flow of information between the spikes”.
As for output randomness – you might wonderwhy developers would want to use it at all.
Well, for starters, this sort of randomnesscan be a good way of simulating mistakes and inaccuracies in a game with an abstract combatsystem – which is games where you tell characters to perform an action rather than doing theaction yourself.
If your units never missed, then that wouldn’tbe particularly realistic.
Also, output randomness forces players tothink about risk management, and to create contingency plans if things go wrong – whichI think are totally valid skills to test.
There’s this idea that output randomnessessentially becomes input randomness for the next turn, because you’ll be dealing withthe consequences of whatever just happened.
Essentially: the best XCOM players are thosewho have a backup plan if their shots miss.
And there are also methods to make outputrandomness feel more fun.
One way is to get away from binary hit ormiss mechanics.
In Phoenix Point – which comes from originalXCOM designer Julian Gollop – each bullet fired is simulated through a ballistics systemso you might find that some of your bullets hit, and some of them miss – which is wayless annoying than XCOM’s punitive complete miss.
It can also be important to show the playerthe odds, because this allows them to make way more informed decisions about which risksthey’re willing to take, or how their actions – like moving closer to the enemy – can impacttheir chances of success.
Unfortunately, though, humans are just reallybad at understanding odds.
That’s thanks to countless cognitive biasesin our pattern-seeking brains that make it really hard to deal with random numbers.
In fact, game developers frequently lie aboutthe actual chances of things happening, so the probability in games better matches thebroken probability in our heads.
The numbers in most Fire Emblem games aresubtly massaged in the player’s favour so – for example – a 90% chance to hit is actuallymore like a 99% chance.
If you lose two 33% chance battles in Civilization, the third will always succeed because that’s how we think numbers work.
And there’s allegedly a pity timer in Hearthstone, to ensure you’ll always get a legendary card after a certain number of empty packs.
If number manipulation isn’t your thing, one of the best ways to get around this is to ditch those cold, unknowable computer calculationsin favour of recognisable, real-world mechanisms – like a six-sided die.
Zach Gage, creator of the dice-filled spacesurvival game Tharsis, says “we understand things that we can hold in our hand.
When things get abstract, especially withmath, it becomes very difficult.
Human beings just have this innate understandingof stuff that we can touch and hold and turn, and look at.
The dice in Tharsis are an analogue for somethingeveryone is familiar with”.
Tharsis, and the similarly tabletop-inspiredArmello, even include physics systems to drive their digital dice – in an effort to makethem seem even more realistic.
Other games use cards – another familiar, real-world favourite.
Cards are interesting because where dice featureindependent probability – i.
e.
each throw of the die has zero impact on the next one- cards can have dependent probability – i.
e.
by drawing a card and removing it from thedeck, you’ve now changed the makeup of the deck and impacted the probability of the nextdraw.
It’s the latter that makes it possible torack up ridiculously fun synergies in Slay the Spire.
It can also be good to have output randomnessin places that will only ever be in the player’s favour.
The only real example of output randomnessin Into the Breach is the game’s building defence system where there’s a very smallchance that the enemy’s attack will actually miss and save you from surefire defeat.
It’s so small that you never actually counton it to save it you, but boy does it feel good when it lands.
Here’s the game’s co-designer, JustinMa.
JUSTIN MA: “We found that if there’s randomness whereyou’re expecting something bad and then you get something good, no one ever ever complains.
So that’s the only kind of randomness, outputrandomness, that we left in the game”.
So randomness can be an incredibly importantpart of games.
It’s used for variety, balance, rewards, the information horizon, and probably more things I’ve forgotten about.
But because it can impact everything fromfairness to player psychology, it’s something that designers must use with great care andattention.
Understanding the difference between inputand output randomness is perhaps the most important thing to learn – but it’s alsocrucial to realise that neither of these is a silver bullet or a dastardly trap.
Both can endanger or improve a game’s design- depending on how they are used.
But when used correctly, randomness can doamazing things.
It can create surprises and unique situations.
It can force the constant reevaluation ofstrategies.
And it can turn players into risk-calculatingtacticians.
Thanks so much for watching.
I’ve put some links in the description tosome resources if you want to learn more about the technical side of random number generation.
And also to head off the comments about howcomputers can’t do “true randomness”.
I also want to give a huge thank you to mypatrons – especially those who helped contribute towards this video in my new GMTK Workshop.
It’s a thing for $5 backers, where theyget to see early versions of certain new videos, and provide feedback or suggestions.
Their help was invaluable on this episode.
.