Log In  

To ease the workflow of developing with p8 file, then saving as PNG for sharing, it would be really useful to have a command-line switch to save as PNG (combined with the positional parameter that loads a cart), for example: pico8 game.p8 -save game.png

This would behave like 'SAVE game.png' in the console, adding the .p8 string in the middle, but not prompting for overwrite confirmation (goal is headless/automatic conversion, like -export — of course errors are possible if the cart doesn’t respect limits).

Rationale: I find myself working with both P8 and PNG carts for the same game/project, using the P8 file as authoritative version (limits don’t prevent saving + compatible with all text tools) and also saving as PNG to see what the label looks like and share it when desired. It is cumbersome to work with the P8, save, save as png, confirm overwrite, then have to remember to load the P8 to avoid that the next save saves PNG then have to overwrite the P8. I would prefer to consider the PNG form a compiled form that I don’t edit, and avoid human mistakes by saving it using a command line or makefile.

Another use case from Sam Hocevar on discord: he wanted to convert P8 to PNG to study the compression algo, and had to resort to export to JS, extract cart data, serialise it, save in blank cart, which is quite convoluted.

P#77606 2020-06-03 17:55

+1

P#77614 2020-06-03 21:05
:: merwok

Spotted in changelog for 0.2.1 \o/

edit: not sure it works, there isn’t a clear example of invocation. @zep could you enlighten us here or in the manual or did I read that all wrong?

P#78443 2020-06-23 21:26 ( Edited 2020-07-09 21:18)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-10-25 00:08:44 | 0.008s | Q:11