Q: Why DID platform games evolve life bars?
A: Life bars mitigate harsh bad luck, minimizing capricious deaths.
Let's take a look at the start of Guts Man from Megaman 1:

The moving platform sequence pictured above requires about 12 individual jumps, failure on any of which means instant player death. The question is, how good do you have to be to have a reasonable chance of passing the section? The following table shows the chance to pass the section and the average number of tries it will take, for a given chance of success on a single jump:
| One Jump | All 12 Jumps | Mean Number of Tries |
| 50% | 0.02% | ~4,000 |
| 80% | 6.87% | ~15 |
| 90% | 28.2% | ~3.5 |
| 95% | 54.0% | ~1.9 |
| 98% | 78.5% | ~1.3 |
| 99% | 88.6% | ~1.13 |
| 100% | 100% | 1 |
This is brutal. Players need to attain near mastery of the timing of the platforms to have a reasonable chance of succeeding (I managed it only about 1 in 3 times, so you can put me in the 90% bin). Even if you've only a 1% chance of failure on each jump, about 1 in every 8 attempts will end in death.
What happened when publishers wanted to move past the "Hardcore gamer that wants to master each game" demographic? Lots of things to make things more forgiving, but none as significant as the life bar. In the above example the curve of success is very sharp - a player goes from finishing the section very rarely to succeeding often with a small difference in skill. Also notice that the player must attain extreme skill levels to pass the section trivially.
Let's imagine another level where the player has 24 foes to face, but now has 4 health.1 So, passing the section could involve not getting hit by any bad guy, or getting hit by one to three of them. This is how the chance to succeed now breaks down:
| One Foe | All 24 Foes | Mean Number of Tries |
| 50% | 0.01% | ~30,000+ |
| 70% | 4.24% | ~230 |
| 80% | 26.4% | ~3.8 |
| 90% | 78.6% | ~1.27 |
| 95% | 97.0% | ~1.03 |
| 98% | 99.9% | ~1.001 |
| 100% | 100% | 1 |
What are the differences?
And now you know the rest of the story.
We've modeled the game as a series of independent events that the player has a known chance of success or failure on.2 Analyzing a series of n instant death jumps is very easy. Since each jump is independent, the probability of passing is simply the probability of success on each jump (lets call it X) to the nth power:

The second case in the article is a bit more complicated. What we want is the chance of a or fewer failures in a series of n foes, each encounter of which has X chance of success. We can break that down, instead of looking for the chance of "a or fewer failures" we look for "exactly a failures" plus "exactly a-1 failures" plus "exactly a-2 failures" all the way down to the chance of "exactly zero failures." Each of these probabilities is a term in the expanion of the following polynomial:

Where Y is the chance of failure (which is the complement of X, that is to say X + Y = 1). Why is this relationship true? The answer is a little complicated, but you can check out Wikipedia's slightly crappy explaination. Regardless, we want the first a terms of the expansion of the above equation:

The constant coefficients c of which are given to us by the binomial theorem, and we denote the kth coefficient like this:

Which is read "n choose k." We've finally arrived at the end, a short way of writing an expression for the terms we want:

Huzzah. Note that if we tolerate no failure, we only want the first term because it represents zero failures and n successes. This collapses to exactly what we has as our first equation because n choose 0 is 1 for all n. Bonus question for people new to this: Why? Double bonus: What about n choose n?
1 This is how the easier levels of Megaman work, like Cut Man: A series of mostly health-damaging foes with very few instant death pits.
2 Is this a good model? In real levels, some challenges are harder than others. If we modeled our section as having varing probabilities of failure it would actually exacerbate the difference between "instant death" and "life bar" even larger. The life bar helps you pass the bits you are having trouble with, whereas the instant death game just murders you.
Comments? E-mail me at: "me" at this domain (adammarquis.com). Home
Site content, except where noted, copyright Adam Marquis, 2006-2009.
Interested in the back-end or design? Check out the colophon.
bloop.