Open relsqui opened 6 years ago
Possibly relevant: building the cart with picotool appears to change the cart version, or claims it does.
relsqui@albatross:~/pico8$ ./picotool/p8tool stats dragondell.p8
dRAGONDELL (dragondell.p8)
BY rELSQUI
- version: 16
- lines: 1652
- chars: 52134
- tokens: 8497
- compressed chars: 15566
relsqui@albatross:~/pico8$ ./picotool/p8tool build dragondell.p8.png --lua dragondell.p8 --lua-minify
relsqui@albatross:~/pico8$ ./picotool/p8tool stats dragondell.p8.png
dragondell.p8.png
- version: 8
- lines: 1378
- chars: 23743
- tokens: 8497
- compressed chars: 8720
(Version 16 is accurate to how the cart was created.) I also just noticed that the token count reported by picotool is much higher than that reported by pico8 -- 8497 vs. 7696.
Same issue with code becoming garbage. Sprites are fine, but map, sound and music (basically all the rest) are also garbage. Maybe this is due to an update in PICO-8 as @relsqui suggested, which changed how bytes are handled for png generation. This currently makes build .p8.png unusable, so I can't automate it with my CI. Instead, when I really want a cartridge release I will have to open PICO-8 locally, add the game title / author comment lines myself at the top of the source (my label lines are preserved when building on top of an existing p8), then enter "save mygame.p8.png" and upload the resulting file manually to GitHub.
Note that a .p8 build works fine, only .p8.png fails.
In other words, to_p8_file
works fine, but not to_p8png_file
.
Hiya,
I have an otherwise-perfectly-fine .p8 file which is over the compressed size limit, so I'm trying to minify it. I tried this:
./picotool/p8tool build dragondell.p8.png --lua dragondell.p8 --gfx dragondell.p8 --lua-minify
and it produced no error, but when I run stats on the resulting .p8.png, I get:
I can load it into Pico-8, and the graphics look fine, but the code section is garbage.
Things I tried:
--lua-minify
has the same result (no error, graphics correct, code garbage).--gfx
correctly minifies the code, but of course doesn't include the spritesheet.build
again to add the graphics back in creates an unloadable cart like above.listlua
to output just the code and hand-copying that over the code in a copy of the working cart creates a cart which loads and runs, but has new bugs in it. :/I see in the readme that picotool sometimes "rejects a cart with a syntax error but Pico-8 accepts it," which I suppose could be the case, but I'm not sure how I'd determine that, nor what the numbers in parentheses afterwards refer to (since they don't seem to be either issue numbers or cart numbers).
Any ideas what might be up, or anything else I can try? Apparently Github won't let me attach a .p8 file, but I'd be happy to send it to you another way if that's helpful. (It's a slightly newer and apparently slightly larger version of this one: https://www.lexaloffle.com/bbs/?tid=30999)
Thanks!