Log In  

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.

P#45218 2017-10-15 04:12 ( Edited 2017-10-17 21:03)

though you can have your modified cartname.html include "cartname_a.js" and then update with "export cartname_a.html" instead.

P#45230 2017-10-15 09:49 ( Edited 2017-10-15 13:49)

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.

P#45250 2017-10-15 14:48 ( Edited 2017-10-15 18:48)

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

P#45256 2017-10-15 17:16 ( Edited 2017-10-15 21:16)

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.

P#45262 2017-10-16 04:51 ( Edited 2017-10-16 08:51)

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.

P#45264 2017-10-16 08:08 ( Edited 2017-10-16 12:08)

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)

P#45297 2017-10-17 17:03 ( Edited 2017-10-17 21:04)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-22 19:27:34 | 0.016s | Q:16