We can learn a lot from the stealth badge system, because I think this is what games do exceptionally well, but educators have done relatively poorly. Leveling systems in games are almost always linked to unlocking features in a game. The newly unlocked features typically make you better at the game, which allow you to gain even more levels, which unlocks more stuff, which allows you to play the game better, which allows you to gain more levels, etc. It is a viciously addictive cycle that is highly motivating. If you haven't experienced it, pick up Pokemon or Harvest Moon and experience the psychological power of an intrinsic reward structure.