PICO-8 Wiki
export filename
Exports the cartridge in various forms.
The filename to export, ending in .html, .png, .bin, 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 or music.

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[]

> 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 a desktop app[]

> export mygame.bin

To export the cartridge so it can be downloaded and played on Windows, Linux (64-bit), and macOS computers, use the .bin filename extension.

This creates a folder named mygame.bin containing a windows/ subdirectory with the Windows files, a linux/ subdirectory with the Linux files, and the mygame.app macOS bundle.

These are standalone versions of the game and do not require PICO-8 to play.

Exporting the sprite sheet[]

> 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[]

> 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.

Exporting music[]

> export mygame_music.wav

> export mygame_music_%d.wav

To export the music tracks as WAV audio files, make sure the music tab is open in the PICO-8 editor, press ESC, and then type the export command using a filename that ends in .wav.


> export mygame.html

> export mygame_sprites.png

> export mygame_sfx.wav

See also[]