Sunday, June 23, 2019

Sometimes, Not Too Random

Randomness of any sort in electronic games is determined by what's called a Random Number Generator, because machines cannot make a decision randomly, they can only approximate randomness.  In a few cases the machine will use an external source to generate an actual random number, such as atmospheric noise or even a lava lamp.  Most of the time they use algorithms to approximate randomness, and that is called a Pseudo-Random Number Generator.

For the most part, they're good.  Sometimes implementations of PRNG can leave vulnerabilities, allowing the user to manipulate the system in ways that are not intended.  PRNG in slot machines for criminal gain, PRNG in cryptography to bypass encryption on computer data, but also PRNG in video games.  In many speedruns, players will take specific number of steps, press buttons in only specific patterns, and listen for sound cues in order to make critical strikes appear on demand, avoid every attack, or have a specific rare item drop, guaranteed.

Most players won't find them, or even particularly care about them, so from a developer standpoint those sort of PRNG vulnerabilities are pointless at best to worry about, to a negative experience if it were fixed.  The vast majority of the time those vulnerabilities exist only in closed systems in a one-player environment, at which point however they enjoy playing the game is entirely up to them.

A more interesting potential of PRNG when it comes to video games, is having the randomness be not too random.

Valve implemented a system on top of their PRNG in Dota 2, in order to make their competitive game less vulnerable to overly large lucky or unlucky streaks.

On melee heroes, Skull Basher icon.png Skull Basher's Bash has a 25% chance to stun the target. On the first attack, however, it only has an ~8.5% probability to bash. Each subsequent attack without a bash increases the probability by ~8.5%. So on the second attack, the chance is ~17%, on the third it is ~25.5%, etc. After a bash occurs, the probability resets to ~8.5% for the next attack. These probabilities average out so that, over a moderate period of time, Bash effect procs nearly 25% of the time.
What this meant was that no longer could there be games where you'd get a bash four times in a row, get a crucial kill, and win the game.  On the other hand, neither would you have a game where your basher never activated, leaving you to wonder if the stupid thing is actually bugged.

Likewise, Grinding Gear Games and Path of Exile has the same sort of system with Evasion, but in that they implement an entropy system.  Everytime you evade an attack, your evasion is lowered until you're hit.  If your evasion comes out to be 90%, that means on average you will have evaded 90% of the attacks.  Evasion as a stat felt far more useful and, importantly, reliable.

There are some key things to take away from these anecdotes of pseudo-pseudo-RNG.  When you're playing a video game and something that happens on a very low percentage chance, fails to occur for a very long time, it is a real possibility that there is a bug in the game.  In real life, you don't have to worry about programming glitches keeping you from rolling well in a board game, but in video games you do.

Another thing to keep in mind is that randomness averages out to certain numbers over the span of many iterations.  Depending on what you're implementing and how often it's likely going to actually occur during the game, those iterations may not occur anywhere needed enough for the randomness to actually average out.  A 25% chance for something to drop, and the player hasn't gotten it in 20 tries?  That's needlessly frustrating if it takes about half an hour for each attempt, but it's something that absolutely can happen with randomness.  There's no particular reason why that player would be overjoyed when the item finally drops since the expectation was for the drop to have happened a long time ago.  A key point here is managing the expectations of your players.

In addition, having core mechanics in a game feel reliable is also very attractive to a player.  If it's something core, you want to rely on it.  Button presses need to always do what you expect them to do, movement in an action game should not be an unsure experience.  The same extends to anything that is core to your game.  So if there's something core in your gameplay that has an element of randomness, consider stacking the deck a bit and not truly leaving it up to chance.

All in all, you don't need to implement these systems for every aspect of your game, and there certainly are times and places where being ridiculously lucky or unlucky has a certain appeal and makes for a great story.  That said, there are places in your game where you don't want to gamble big.  So gamble small, constrict your variances in RNG, or just flat out shape the data the way you want, so that you get the effect you want.

Fiddling with numbers can change a lot, after all.

Sunday, June 16, 2019

The Rush to Endgame Pt. 2 - Filling In The Levels

Game developers are not stupid.  They know that leveling up, increasing numbers, and filling in the bars to completion is inherently satisfying in a staggering amount of players.  When they make endgame content, which in this situation meaning content that comes only when you're at max level, they include all sorts of methods for increasing your own numbers, whether it's grinding reputation, climbing pvp ranks, or acquiring shinier and better gear in places you can only access once you've finished the leveling process.

The smart ones will have these systems running concurrently with the leveling process, so that when leveling abruptly ends, these other systems that incentivize play will remain familiar to the player.  To do otherwise is to have an experience where you play two completely different games, the leveling "tutorial", and the "real game" at the end in which you do completely different things during leveling.  This sort of tonal dissonance between the two sections is very aggravating, and akin to having a nailbiting horror movie end in a ten minute light-hearted slapstick section that intentionally tries to make the previous horror bit pointless.  One of those things for the avant-garde and those bored with the genre, but for people just wanting to enjoy and immerse themselves in what's going on, it's jarring.

In which case you may ask yourself... why halt leveling at all?  Part of it comes down to design choices.  If the game is very strictly gated by levels, allowing uncapped leveling can quickly make any challenge set forth pointless.  To explicate, imagine a single-player game with an RPG-ish structure.  In this game, you are only allowed to set foot in the dragon's lair once you are level 60, and anytime before than that you cannot even enter the zone.  The game will not let you, and even if it did you would very quickly become slaughtered as inherent level differences between targets carry strict penalties.  The game designer for this example included this feature so that players would be compelled to stick only to zones appropriate to their level and not try to level too quickly by fighting enemies a much higher level than them.

At level 60, this fictional dragon in this fictional game is a very tough challenge, and the dev team put a lot of heart, soul and effort into this encounter.  A player trivializing it would basically waste the time they put into making it, in their mind.  Regardless, the player fights the dragon, and finds himself not up to the challenge.  If the player can still level, he can simply grind experience until he holds the advantage and take out the dragon, trivializing the difficulty of the encounter away from execution of game mechanics, into simply spending more time killing what's likely to be far less challenging monsters.  So is the solution simply to water down levels to be far less important?  Not necessarily. 

It all comes back to knowing what kind of game you're making.  In my personal experience as a player, games where levels can make a huge swinging difference are absolutely fine and even great when you're playing games where you're expected to start from the beginning often, such as in roguelikes.  That kind of game, however, is completely different than a game where you're expected to invest a lot of time into a very small set of characters.

Again, there's no particularly good or bad game mechanic, just a good or bad situation to implement them.  They are multiple different tools in your toolbox, and I hope that as you grow as a skilled craftsman, you are able to determine when to use the hammer, and when to use the mallet.

Sunday, June 9, 2019

The Rush to Endgame

My first introduction to MMORPGs was actually Ragnarok Online, a fairly thriving game that came from Korea in the early 2000s.  There, it took an excruciatingly long time to level, and thus every loss of experience on death felt even worse.  A lot of people never made it to max level, but still played the game and had fun.  There were hardly any quests, and no pointers on what zone is the next area to level -- many times you would wander a bit too far and a very aggressive enemy would sprint at you and lay you out in the dirt, putting you back to where you saved.

When I moved over to World of Warcraft, quests were far more abundant, death was far more of a nuisance than a fear, and you had a pretty good idea where you needed to go next.  Still, there was a sense of a journey being taken when you leveled up, and there were a lot of toons who never quite made it to the level cap.  This was a fine and good thing, because the majority of the content was in the leveling.

Let's approach this from a different angle.  I'm not a designer or developer for World of Warcraft, and declaring the makers' motivations as if I were one of them would be absolutely foolish.  Thus, this is a theory from the player's side of things.

To me as a player, the vast majority of a player's experience was expected to be from 1-60, not at 60.  A lot of care was put into that world experience, which when a player hit max level never particularly saw that much of, unless farming for specific materials.  And those materials very often didn't necessitate being max level either!

No, Vanilla World of Warcraft was far more like that Korean MMO I started with than it is like the current expansion, where zones and leveling are just glossy extended tutorials for the real game at max level.  Leveling up was an achievement, and the experience pre-60 was a lot of the content.  And that's one of the reasons why it's so beloved.  Gathering experience and leveling up, getting measurably stronger in the process, is a very simple but effective pleasure no matter the game.

In other words, the core draw of the game changed drastically throughout expansions.  Leveling versus end-game theme park being just one of them.  This sort of effect splits your userbase every expansion and alienates your earlier players.  Expansions change things, yes, but if you change the core concept of a game, it becomes a completely different game.  It has failed to accomplish its primary objective when its objectives were changed, much like SJW convergence in companies starts rotting it away from the inside.

Sunday, June 2, 2019

Horizontal Balancing

Icefrog's approach to balance in Dota, and later Dota 2, has been a rather interesting one -- one that I would call ingenious as well.  So for this post we're going to talk a little bit about what I call horizontal balancing.

Dota 2 is a competitive PvP game at its core, with currently 117 different characters to choose from.  Each of those 117 different characters bring something unique to the table, and thanks to how they're balanced there's a time and place for each of them.  Some characters, called heroes in game, have a slightly higher winrate than others, but it's always in the scope of having an overall 60% winrate instead of something absurd like 80%.

Keep in mind that this level of balancing is actually a very difficult concept to execute, as it's easier said than done.  One of the difficulties being the instinctual human tendency to hammer down the parts that stick out.  By that, I mean if you have something in your game that's been deemed as overpowered, or too strong to be fair, the instinctual response is to nerf, or reduce in strength, the overpowered aspect until it's fair.  For example, you have a character or a class running around killing every enemy player with one shot, so the first response is to nerf that character's damage until they're roughly doing the same damage as everyone else.  The game is now safely "balanced".

The unfortunate side effect of this is that it makes each player option just a bit more homogeneous.  The player's choices start meaning less.

In comparison, horizontal balancing would take that same oneshotting class, let them keep their oneshot capabilities, but make the windup to doing that damage take a ponderous amount of time.  The oneshot class keeps their separate identity, and they're still good at what they do particularly if no one notices them winding up their big strike, but they're no longer good in every single case, and that is what you're aiming for. 

Eventually with everyone having their own identity and point in which they're useful, very small changes to the environment itself or natural player tendencies to counter the current popular classes/characters will force those same overplayed or overpowered characters out of the meta, with no drastic number changes needed whatsoever.

There are sometimes you do need to scale back direct numbers of overpowered things, but not to a very large extent.  Which is fortunate, because players can get very upset over what they perceive as huge nerfs to what they currently play.

For a topical example, since there's been a hubbub about Classic WoW for a while, let's talk about World of Warcraft as it was when it first came out, oft dubbed Vanilla.  Some of the many reasons why WoW did well was because the team put an absurd amount of passion into the project, the game released at a good time, and there was a lot of hardcore fans eagerly anticipating and building up hype to explore the world they loved from the Warcraft RTS series. 

Another reason why WoW did well was because each class felt very unique from each other.  There were a vast amount of things that only one or two classes did that each was a completely different experience, and had their own identity.  Blizzard's method of balancing over the years and expansions lost a lot of that identity.  Shamans use less totems, warlocks less dots, druids stay in one form all the time, there's a litany of stuff.

Absolutely, there was a lot of stuff that was removed from WoW because it honestly wasn't fun, and I think that Blizzard was right when they said, "You think you do, but you don't," when people asked for the Vanilla experience again.  However, that's because Vanilla WoW wasn't balanced all that well. It's unfortunate Blizzard balanced the way they did, because what people actually wanted was a time where their class actually felt like it meant something, their item choices felt like it meant something, their every choice in game felt like it meant something.

And for Classic WoW, that's something horizontal balancing could fix.  Unfortunately they won't do that since they're aiming for a strict recreation of how WoW was back then.