All courses / Data Structures and Algorithms for Game Devs / Bits and bytes
Chapter project: Save code
Boss lesson, about 27 min, +100 XP
Many games on old home consoles could not store a save at all. At the end of a session the game showed a password instead, the player wrote it down, and next time the player typed it back in. That password was the save. Everything the game had to remember was packed into a short string of characters.
This project builds one for Dungeon of Dawn. Nico's level, HP and gold go into a single 32-bit uint, and the uint becomes 8 hex digits the player can copy down. Then the program reads a typed code back into level, HP and gold. Every tool for it comes from this chapter.
Read the rest of this lesson and run the code in your browser.
Previous: Quiz: bits and bytes Next: Same result, different work