Tuesday 27 September 2011

Chance and streaks

When using chance in a game, it is quite easy to be fooled that you can manage it the same way as deterministic mechanics by employing some simple maths.

You may think, when designing a mechanic, an effect working 50% of the time is basically the same as one that works all the time and is half as good. Where this falls down is the chance for streaks.

Tom Lehmann, one of my favourite designers talks about streakiness a great deal. Tom is one of my favourite designers. He can make games with chance feel like deterministic involved Eurogames. He manages chance well, so he still gets all the flavour you get from having lots of randomness. Managing streaks in draws, and accounting for them in his games, is a key part of how he succeeds in doing this.

Streakiness is a clumsy feeling word, so I may stick with other phrases from here.

Streaks of results one way or the other can break a game. If you have a game that breaks with a specific run of cards at the beginning, it may not seem like a big deal. If your game gets played enough, its going to happen in to some game groups, and ruin their experience of your game.

Streaks of results. also has a strong psychological effect. In Path of Exile this has come up with "to hit" chances. Mathematically we want evasion and armour to have similar damage mitigating effects over time. However a low chance to hit feels much worse than an equivalent loss of damage dealing.

Being an action RPG, you hit things a lot. An 80% to hit rate isn't freat, but looks OK on paper. When you have a game session where you might make 3000 to hit attempts. You are highly likely to get a streak of missing 5 times in a row. Missing those five times in a row, that will be the bit you remember. If you drop the to hit chance to 75%, you are quite likely to get a streak of 7 misses in a row. (My maths on this is rough post card stuff, and discussed below.)

Some games actually mess with the odds to get more even feeling chances. In one of the Civilization games, where early game losses are critical, you can't lose two 50% chance battles in a row. Drop rates in World of Warcraft were homogenised, specifically to avoid the negative feelings around streak runs of non-drops of quest items.

In Path of Exile, we have reassessed what sort of to hit rates we want. We still want strong evasion to be a feature of PVP, but have dropped evasion rates of fodder-monsters in PVE play. In PVE you do more hits overall, so a higher hit rate is needed to avoid unpleasant feeling streaks. In PVP, players building specifically for evasion may be hard to hit, but as it was a players choice, it feels less negative than against monsters.

--
The maths bit - The math around streaks is more problematic that you might first expect. My back of the post card guess of how to assess the likely hood of a run of a certain length was something like:

1- ( (1-C^s) ^ (S-s) )

Where C is the chance of the event you want to measure, s is the length of the streak and S is the length of the series.

So for a streak of five misses of 20% chance to occur in a run of five, that gives us (1-.2^5).

In a series of 3000, there are 2996 consecutive runs of five to hit chances, which gives us:

1- ( (1-.2^5) ^ 2996 ) = 0.616675515

A 62% chance of a streak of at least 5 to occur within this series.
However, this doesn’t accurately model the situation as the consecutive series of five aren't independent of each other.
For a better idea this article gives a good look at assessing streaks of coin tosses and shows how to deal with the inter-dependence. As you can see, the maths isn't that easy. It is much easier to work out with recursive programming, but the main lesson I got from it is that an approximation will do for my purposes.

Thursday 22 September 2011

Sheer Mechanical Damage

"Sheer Mechanical Damage" is a phrase I misremembered from the book The Red Hourglass. The phrase used in the book is Sheer Mechanical Injury. While that is correct, its not actually as useful to me as the phrase I remembered.

The book is about predators, and how they work. What strategies do they have for killing things and then eating them. Or occasionally eating them, and then killing them.

I have found it a surprisingly useful book for thinking about games with conflict. For thinking about games with asymmetric conflict, where specialities, tricks and stratagems matter. That is, any modern miniatures, combat oriented RPG or boardgame, computer strategy game, fighting game or action RPG.

In one of the sections of The Red Hourglass, the main predator of discussion is the Tarantula. As far as cunning methods for killing things go, the tarantula is pretty boring. It is also primitive. It hit a point of development where it didn't really evolve any more. The same thing is true of crocodile, and they basically kill things in the same way - sheer mechanical damage.

The only trick to being good at sheer mechanical damage is being big and strong. So evolutionary change is focused on being the biggest and meanest whatever kind of creature you are. And it turns out, once you hit that point you don't need to change any more. You can fill that niche for millions of years relying on just sheer mechanical injury. Anything else that wants a piece of the predator pie, it needs to find other more complex tricks to surviving.

In designing a combat system for a game, the "sheer mechanical damage" strategy is the best place to start. It needs to be right before you can worry about fancier ways to kill things.

Combat based games, in their essence come down to two things: Survivability and lethality. The sheer mechanical damage scenario tests that at its purist. For most RPG systems this is basically hit points versus damage. Bigger is better on both counts. Once that part of the system is right, then it is time to get fancy.


Monday 5 September 2011

Strategic Space

Strategic space is a mental tool I use for thinking about how the choices of a game fit together, rather than balance in the sense of ability to win.

A game could be perfectly balanced, yet have large strategic space issues. For a made up example to show it off in the extreme:

Imagine a Rock-Paper-Scissors variant where there were two additional elements, Nukes and Anti-nukes. Nukes beat Rock, Scissors and Paper, while anti-nukes lose to everything except Nukes, which they beat.

Technically this is balanced. You could calculate a valid mixed strategy. While balanced, it has terrible strategic space. The whole game becomes about Nukes and their foil. (The correct solution is to choose Nuke 1/3 of the time, anti-nuke 1/3, and the others 1/9 of the time each. I had originally put "nukes most of the time with antinukes occassionally, but I checked here, and found I was mistaken.)

It is not the same as a dominant strategy, but it has a similar feel.

An example of poor strategic space in a real game would be Battlelore. In Battlelore, Clerics have a small set of very powerful spells. The result of this is, you either take a maximum level cleric, or you have to specifically select leaders to counter a level three cleric (normally by diluting their availability to those spells).

In game forums, strategic space issues all play out with the same conversation. X isn't balanced says one, someone counters with some reasonable theorycraft about how it really is balanced, and a long argument continues about balance, where balance isn't the real issue.

Strategic space issues aren't always so glaring. Warhammer 40k has an interesting situation with Space Marines. They have a fantastic statline for a main troop type. In a tournament a viable army is either a Space Marine based one, or it has to encompass some specific counter to the marine. Without marines I think army lists in a tournament could be much more diverse. It isn't really that much of a problem for two reasons. The strategic space taken up by Space Marines fits the background. Most of the art and story focuses around these troops. The strategic space taken up by these troops also fits the sales figures. Space Marines outsell everything else Games Workshop does.


Warhammer Fantasy doesn't seem to have a similar issue with troop types. The closest would be High Elves, where their gimmick is that they have "best of breed" troops in every class. Whatever they field, it is the best of that type you can get in the game. However High Elves are very expensive so they field tiny armies, and in Fantasy, "quantity has a quality all of its own".

Warhammer Fantasy has more strategic space issues around the magic system. Every so many editions the magic gets too strong, and the game becomes more about spells and your magic users, rather than the rest of the troops you have on the table.

Starcraft 2 has some strategic space issues around Protoss. Both Terran and Zerg have some elements of flexibility, which is part of their faction identity. Zerg can decide on troops to build much later than the other sides, while Terran has a lot of flexibility in the buildings and technology.

Protoss has expensive units, and less ability to change tack. This means they tend to focus on a small collection of small builds. In season one and two the 4-gate build took up too much strategic space, especially in mirror match ups.

Strategic space is most important in games with "many paths to victory". As well as balancing the various game elements, the paths and strategies need to be balanced. Part of this balance is not having any strategy taking up too much strategic space, such that it is too important to the feel of the game. An example of a Euro with poor strategic space would be Princes of Florence. Jesters are too effective and flexible. Even when their cost is set by auction, the appropriate price for them is too much of the games currency, and they distort the game, even when bought at balanced amounts.

Strategic Space is quite hard to get right in a game. It is much easier and faster to identify pure balance issues. It generally takes many more playtests to get a feel for when an element of a game takes up too much of the decision making.  It is something worth doing I feel. You do get a good feeling for a game when it gets the strategic spacing right.