I realize saving comes to Pico, but I've always wondered how one would create password save system like old games had. Any tips?
I can think of two possible solutions:
1st - permanent codes stored in program, no use data is saved, that's how most logical/puzzle games do it, every level have it's own password.
2nd - you can save limited amount of data by forcing player to memorize it/write it down, you will give him those variabled + CRC for verifycation.
Example of 2nd solution:
- save only really needed variables, more you save longer the password.
- so we have an imaginary game, player is in a level, have health, shield, weapons (8 in total) and and saves at magic shrines.
- so we have 4 variables to save: level, health, weapons and number of shrine in a level, we can save all those as a single byte, getting 4 bytes total
- note that weapons are saved in one byte, least significant bit is dagger, second bit is small sword etc.
- now just calculate crc (you can do it by mix of bitwise operations or simply adding all numbers together and trimming them to one byte only)
- present code to used as hexadecimal and you are done
[Please log in to post a comment]