This is a demo of the new cartridge storing in 0.1.6. (you'll need to update to 0.1.6 if you load this in PICO-8)
Press O (mapped to Z or C) to save the screen, and X to restore it. The cursor position is not saved.
To save, the screen is copied to the sprite sheet and then stored for clarity -- but it could have just been a straight cstore(0x0, 0x6000, 0x2000), and same again in reverse when restoring.
if (btn(4)) then memcpy(0x0,0x6000,0x2000) cstore() end if (btn(5)) then len = reload() memcpy(0x6000,0x0,0x2000) end |
This should also work in your browser, even if you close it and run the cartridge again. Please let me know if it doesn't!
Note that in 0.1.6 you can also cstore to separate cartridge files, meaning we can have quite large save games, and also saved data shared between carts on the bbs.
Oh, shoot. Did I accidentally save the doodle in place of the original cartridge?
UPD: checked in a different browser on a different device, and, apparently, yes. Sorry for that!
Also, here's a question: what if two users, playing one cart on the BBS at the same time, will save one after another? How will the changes be handled?
[Please log in to post a comment]