It would be really useful to be able to export cartname.js without cartname.html, so that I can update the embedded game without losing the customisations I've made to the HTML.
though you can have your modified cartname.html include "cartname_a.js" and then update with "export cartname_a.html" instead.
I took one of the HTML files that got exported and modified to be what I needed. Then I saved it aside as a template...it always pointing to "game.js"
Then when I export my next game, I copy the JS file to the place where the template is, rename it to "game.js" and then zip it up for delivery. Just delete the extra HTML it spits out.
That process has worked pretty well for me getting games up on Itch.io and other places. Saves a lot of re-tweaking work.
There's a simple templates system coming in 0.1.11 that I think should resolve this -- you can provide a customized html with your own controls/layout etc. and then export with:
export -t mytemplate mygame.html
I've just been copying the exported files to a separate directory (where I have a git repo). Don't really work directly out of the carts folder. It would be kind of nice sometimes though. Usually after the initial export you only really want the js anyway.
The easy system I came up with was to rename the generated html to something else and just edit that, but being able to export the cartname.js explicitly would mean one less way to accidentally overwrite your custom html.
The custom html templates are not overwriteable from within PICO-8 (they live in {app_data}/pico-8/templates), but single .js exporting would be nice too because it is more convenient in some cases. And something users can guess might work without reading documentation.
(added for 0.1.11)
[Please log in to post a comment]