Log In  

how about "-export filename" ? handy for makefiles...

P#42991 2017-08-01 08:22 ( Edited 2017-08-05 02:34)

Are you requesting a batch mode action that takes a cart as input and write .html and .js as output?

I've considered adding web export and extract functionality to picotool as just another cart format, which would basically do that. No promises, but just wondering if that's the request. :)

P#43041 2017-08-04 01:42 ( Edited 2017-08-04 05:43)

that's exactly what I need!
of course an actual command line parameter should also work for the spritesheet and the upcoming binary exports. same thing for "save" could be handy too.

in the meantime I found a workaround,
in the cart's code:

export('game.html')

in a batch file:

pico8 -run game.p8

and voilà! (the export command is ignored within the html version)
pico8 stays open but well, can't have everything.

I could even do a multi-version html export:

if(peek(0)==0) then
poke(0,1)cstore(0,0,1)export('gamev1.html')
poke(0,2)cstore(0,0,1)export('gamev2.html')
poke(0,0)cstore(0,0,1)
end
version=peek(0)

-- actual game code
if (version==2) do_something_specific_to_v2()
-- etc.

funny stuff :)

that clearly doesn't help my minifying woes but that's in another thread ;)

P#43047 2017-08-04 09:09 ( Edited 2017-08-04 13:13)

In the batch file, you could use this if you know it's the only copy running:

pskill pico8.exe

But if you have others it'll kill them too. If so you'll need to know the PID of the one you run and use that instead of the name.

P#43070 2017-08-04 22:34 ( Edited 2017-08-05 02:34)

[Please log in to post a comment]