save gamename

The save command is used to save your game as a text file with the filetype .p8. The game data is saved within the file and can be read by PICO-8 (including Education Edition). Once saved in this format, you may use the ctrl+s shortcut. Any subsequent saves will overwrite this same .p8 file.

A .p8 file can be loaded into PICO-8 by load command, or by dragging and dropping the .p8 file into PICO-8.

Carts Folder

To easily find your .p8 files (in the "carts" folder), use the Folder Command.

The default directories for the "carts" folder are:

Windows: C:/Users/Yourname/AppData/Roaming/pico-8/carts
Mac OSX: /Users/Yourname/Library/Application Support/pico-8/carts
Linux: ~/.lexaloffle/pico-8/carts

To change the location of your saved carts, navigate to the .../pico-8/ root folder (the parent folder of .../carts), and find the config.txt file. Open this in any text editor and scroll down until you see:

// Location of pico-8's root folder
root_path C:/Users/Yourname/AppData/Roaming/pico-8/carts/

// Location of cartridge save data
cdata_path C:/Users/Yourname/AppData/Roaming/pico-8/cdata/

Edit the path to your desired paths and save. You'll have to restart PICO-8 for this to take effect.

Tip: You can save your PICO-8 root and carts folder to the cloud (using Google Drive, Dropbox, etc.) to have your games available and saved across multiple devices.

Education Edition

You can save using this command in the Free Education Edition of PICO-8 and it will create the .p8 file and automatically download it to your default downloads folder.

.p8 file can then be loaded back into PICO-8 Education Edition by load command, or by dragging and dropping the .p8 file onto the PICO-8 screen in the browser.

External Text Editor

You can open .p8 files in any text editor or your favorite coding program (IDE), such as Visual Studio Code, Notepad++, Sublime Text, etc. This is good for people who want to avoid the PICO-8 font, have more visual space to read and write code, and use specific code editor features such as syntax highlighting in their preferred theme, debugging, and code completion.

Important: Be careful when editing your .p8 files using both PICO-8 editors and external editors because you can overwrite one with the other and lose unsaved changes. Be sure to always save before switching between PICO-8 editing and external editing.

All .p8 game files must begin with:

pico-8 cartridge //
version ##

Note: The version ## is an integer, for example version 0.2.5g is actually version 41 when viewing the .p8 file in a text editor.

There are some designated strings that are used to properly separate code, tabs, graphics, map, sfx, music, and label data. These are:

__lua__ Designates the start of the game code.
-->8 Designates the start of a new tab.
__gfx__ Designates the start of the sprite graphics data.
__map__ Designates the start of the map graphics data.
__sfx__ Designates the start of sound effects data.
__music__ Designates the start of music data.
__label__ Designates the start of the 128x128 cartridge label data.


8 May 2023