Most of the fun in a game comes from exploring the ways the rules and context interact.
In a platform game such as Megaman or Prince of Persia, the player explores how rules and context interact using simple rules and complex contexts. Ammo and health are unlikely to matter in ten minutes - you'll probably get boosted back to max between encounters.
Once the player starts getting used to the ways the rules interact with the contexts, these kinds of games will usually give the player an upgrade. Double-jump is a common example, as are immunity to spikes or a new special weapon. This changes the rules and lets the designer present all the contexts again, from a new perspective.
This is a tried and true method of making fun games.
Many games (such as Castlevania: Symphony of the Night and most Final Fantasies) add a "stepped rule change" as well. These games continually change the rules of the game in small doses by allowing you to change your statistics - upgrade your attack, your defense. This slightly changes the rules of how you interact with the context. Because of this, these games do the "big shifts" less often.
In a classic platformer, you're likely to get an upgrade that somewhat changes the nature of the game every 2-3 levels, usually after each boss fight. In games with a more statistical approach, you'll generally get these kinds of upgrades only two or three times over the course of the whole game. In Final Fantasy, you generally get a chocobo, then an airship, for example. Often you start with no magic, then get magic. These are changes that alter the nature of the game, but they happen very rarely compared to Megaman getting a new gun. This is because the small rule changes tide the player over.
But those stepped rule changes - usually just statistical changes - aren't enough to run the whole game, as many really boring RPGs attest. Similarly, if you hand out too many rule changes of the same basic type, they essentially become stepped rule changes. It's great to go from a wrench to a pistol, and fun to go from a pistol to a shotgun, but going from a machine gun to a fletchette machine gun to a plasma machine gun to an autocannon is not nearly so entrancing. It's basically just a statistical upgrade with a new mesh slapped in. As many boring FPS games can attest.
A good rule of thumb is this: if it changes the way the game is played, it's a real rule change. If it simply changes how easily the player deals with a specific kind of content, it's a statistical change.
But statistical changes shouldn't get the short shaft, because they are often linked to a second game! For example, getting better statistics in an RPG usually involves killing monsters for XP and gold. This puts the focus of the game on killing monsters, unlike a game with no such curve - in Megaman it is common to simply get past the monsters without bothering to engage them.
Similarly, having a long-term ammo supply means that there is a second game of preserving and hunting for ammo. Done correctly, this will even make a player choose a sub-optimal weapon simply to preserve ammo for his more optimal weapons. Guns such as the BFG can exist because they have very little ammo - if ammo for these weapons is easy to come across, the game breaks.
These secondary games follow the same basic idea: they are fun because their context and rules interact in interesting ways. The context of the primary game is basically the level, but the context of the secondary game is, to a large extent, the primary game!
In some ways this means it is difficult to "plan" the contexts. However, you can simply look at the salient elements of the level and the gross rules: if the level is big on sniping, obviously the secondary game is going to be cast in the context of a sniping level. If the level is about jumping, the secondary game's context is jumping.
This gets more complex if the context is largely player-generated. For example, in most Final Fantasy games you get to develop your characters in any way you want. This means that the secondary game (gaining new powers and statistics) is largely affected by the context of how the secondary game has been played so far! It stopped being a linear system and turned into a multi-dimensional glowing purple frog.
Anyway, that's definitely enough writing on this subject. :P
Comments? Questions? Monkeys?