export gamename.html file1.p8 file2.p8
export gamename.bin file1.p8 file2.p8
This command is used to export your game as a standalone .html or .bin file, with the data of up to 16 other .p8 files. Those multicart files must be locally stored and referenced correctly in the export command.
For example, if you have organized your multicart folders like this:
Then you will need to export them with the folder names:
export main.html multicarts/cart1.p8 multicarts/cart2.p8
Or you can load the main cart, change directory to make your multicarts folder active, and then export without the need for the folder name.
export main.html cart1.p8 cart2.p8
(The names of folders and files used here are purely for example and you are free to name them however you'd like.)
To change between carts, you can load one of the other carts in your game code with, for example:
This also works for loading specific sprite sheets, maps, sfx, or music from other carts. See Reload.
Note: The exported multicart will not be able to load from the BBS using
var _cartname=[`main.p8`, `cart1.p8`, `cart2.p8`];
The main cart and multi-carts are all stored within the cartdat variable:
var _cartdat=[ ... ]
16 Jun 2023