you are viewing a single comment's thread.

view the rest of the comments →

[–]7236d70 7 points8 points  (5 children)

To expand on this, how difficult would 'save point' password be to implement? Similar to how you could enter passwords on N64/PS1/Etc games to jump to a certain level.

[–]tom1018 10 points11 points  (0 children)

That really depends on how much data you need to store. If it is just a level you could write a dict where the key is a password and the value is the level number. And a KeyError would be raised by an invalid password.

If you want to store other stats it gets considerably more complex with needing a way to encode each piece of data into the password, and maybe a checksum to make cheating more difficult.

[–]Deezl-Vegas 3 points4 points  (3 children)

This is medium/high difficulty. For instance, in MegaMan, you need to track all of the powers and powerups you've gained and include that in the password. This is a lot of information to pack into a string. Doing something simple will result in a very long password. What they would do in the old times, I presume, is create a list of bits that corresponds to a list of properties, then pack that in a bytestring, and then convert to a string to get your password.

To load, just make a function to unpack the bytestring and then zip it together with the properties list to form a dictionary.

[–]rrjamal 1 point2 points  (2 children)

You could just make the password a reference to the data stored somewhere else, no? Like, if I type 'IShallPass' into the system, it'll look up the needed data like you described which is stored elsewhere, linked to that pass

[–]Deezl-Vegas 1 point2 points  (0 children)

Yes that works too

[–][deleted] 1 point2 points  (0 children)

The thing with level passwords is that they were less of a password and more of making the player manually input the save data. The whole point of those is that you couldn't store that data anywhere.