   Unlocking levels with passwords
  In some games (e.g. Out of This World), instead of a concept of save games, you are given a password (usually 4 letters or somesuch) when you die, which you can use to continue from that level later.However, what if you have a game where levels don't necessarily have to be unlocked in such a linear fashion? What if the ordering of the levels is defined as a DAG (Directed Acyclic Graph)? In that case, your progress can no longer be measured in terms of what single level you're at. Your current progress is defined in terms of the set of nodes that define the fringe of locked/unlocked levels (hopefully that made sense).Let's assume these nodes have some kind of ID. It can be numeric or textual, doesn't matter, so long as it's unique across all the nodes. Has anyone here thought of a really clever way to encode those into a short, text-based password whose workings aren't easy to figure out from the outside?I guess instead of the text password, one can create the notion of a user account, and then the player just selects that account and plays, but just for the sake of brain exercise, let's limit it to a short, text password. The key thing is, we wouldn't want to be manually assigning these, since the number of possible sets of fringes can get pretty huge.   
  What you want is a method of encoding the data in a form not easily readable, with some sort of checksum or sanity check so that randomly guessing passwords is unlikely to hit one that actually works.For an example, see the password system used for the original Metriod.Edit: A guide to the Metroid password system;  I was gravitating in a similar direction, but that was a pretty good read, thanks!   ;  The Metroid system should fit your needs, you only need decide a mapping of the characters you want in the password to binary values. For example:'a' -> 000001'b' -> 000010'c' -> 000011...If you have, say, 5 levels where every level is allowed to connect to every other you can easily let the first four bits represent locked/unlocked (0/1) connections from the first level to the four others... and so forth. This would take a total of n(n-1) bits for a total of n levels. Then you would of course want to add some bits for checksum, perhaps to even it out to an even ammount of characters.   ;  One way to obfuscate it a little would be to not map 'A' to '0' and so on, because all of a sudden, the password would look like AAAAAXAAAAAAAA (whole bunch of zeroes, with a single bit, rotated randomly somewhere). But with a different mapping, the rotation might look more reasonable even for early stages where most bits would be zero.   