Accidentally corrupted palette of cronotest?

Issue #70 new
Eliot Lash
created an issue

Hey JP! I am just getting started trying to learn how to use Playscii/game mode.

I was poking around in the demo games and I was trying to see what would happen if I edited one of the sprites in cronotest. I think it was crono_walk_right.psci. I added a character in the upper corner of the sprite and saved it because I wanted to see if it would overwrite the embedded file in Playscii.app/Contents/Resources/games/cronotest/art (it did.) I made a backup of crono_walk_right.psci before saving. Then I overwrote crono_walk_right.psci with my backup to try to restore the original version.

After I overwrote the file it didn't appear to update in-game. I hit F2 and the modified asset was still displayed. Then I tried re-loading Playscii.

In the console, I saw a bunch of errors saying Couldn't find palette image crono_sprite even though Playscii.app/Contents/Resources/games/cronotest/palettes/crono_sprite.png exists and does not appear to be modified. It looked like the other sprites have now defaulted back to the c64_original palette. I can open up these individual files and set the palette back to crono_sprite manually and it works temporarily. But when I quit and re-load playscii it defaults back to c64_original on all the sprites. I am scratching my head as to exactly how I got into this state in the first place and why changing one of these sprite files on disk caused a change to other ones.

Also, oddly, some of the sprite previews render correctly even though it uses the wrong palette when loaded, and they all say they are using the crono_sprite pallete. I think it's the ones I tried to open and fix the palette on.

I tried reinstalling Playscii from the itch app to see if I can restore this demo. After that I was still getting messages about the missing palette.

Finally, I tried deleting the contents of the ~/Library/Application Support/Playscii folder and when I re-launched Playscii, the issue finally went away.

I tried doing the exact same thing again (open playscii, edit a crono sprite, save, re-launch) to see if i could repro and i could, the palette seems to be corrupted again after re-load. Closing playscii, deleting ~/Library/Application Support/Playscii, and re-opening it again fixes the issue and my edits to the crono sprite persist as I would expect.

I have attached the modified cronotest folder, some screencaps, and zip of my old ~/Library/Application Support/Playscii folder. Hopefully these files will be enough to repro the issue.

Comments (6)

  1. JP LeBreton repo owner

    I believe this is all a result of some undefined behavior surrounding editing of the "internal" (included with Playscii) example games, though I'm not sure exactly what's causing it or how to handle it as a general case. I can't find anything wrong in the config and art files you've provided.

    Can you reproduce these results by saving changes to a non-internal game? Maybe try copying the cronotest game into your Documents/Playscii/games/ dir with a different name, making the same change to the same sprite for that, and see if it happens.

    Rather than fix this specific issue, I should probably change how modifying the internal games works in general, as that kind of casual tinkering does seem like a good gateway into using game mode. Maybe the internal games' data aren't accessed directly but are copied into the Documents/Playscii dir alongside any other user-created games? I'll have to think about it more, thanks for this report.

  2. Eliot Lash reporter

    I think copying the demo games out into the documents folder sounds like a good solution. It's pretty unusual to allow modification of bundled files like this and makes it harder to recover if they somehow get corrupted. If I find some time I will try to repro in this fashion as you suggested.

  3. Log in to comment