FANDOM


export filename

Exports the cartridge in various forms.

filename
The filename to export, ending in .html, .png, or .wav.

The export command serves several functions. It can be used to produce a standalone version of the cartridge that can be added to a website and played in a browser. It can also be used to generate a PNG image of the sprite sheet, or a WAV audio file of the sound effects.

Exported files are created in the current working directory of the cartridge storage area. You can use the folder command to access this area with your operating system's file browser.

Exporting a web player Edit

> export mygame.html

To export the cartridge so it can be embedded in a website, use a filename that ends in .html. Pico-8 generates two files: an HTML file with this name, and a JavaScript file with a similar name and a .js extension.

The HTML file contains the code that adds the cart to the page along with control features. You can include this code in your website and modify it as needed.

The JS file contains the cartridge data and a standalone Pico-8 player that runs in a web browser. This file is referenced by the HTML file, and should not be changed.

Exporting the sprite sheet Edit

> export mygame_sprites.png

To export the sprite sheet as a PNG file, use a filename that ends in .png. The image is 128 pixels wide and 128 pixels high, and uses the Pico-8 palette.

This file is suitable for importing into another cartridge with the import command.

Note: If the cartridge uses the bottom half of the sprite sheet for map data, this data will be included in the exported image. See Graphics.

Exporting sound effects Edit

> export mygame_sfx.wav

> export mygame_sfx_%d.wav

To export the sound effects as WAV audio files, use a filename that ends in .wav.

The audio file contains each of the sound effects, one after another. To export each sound effect as a separate audio file, include %d somewhere in the filename, e.g. mygame_sfx_%d.wav. This will be replaced by the number of the sound effect (mygame_sfx_01.wav).

There is no way to import sound effects.

Examples Edit

> export mygame.html

> export mygame_sprites.png

> export mygame_sfx.wav

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.