CommandPrompt
The PICO-8 command prompt lets you interact with PICO-8 and the currently loaded cartridge using typed commands. By default, the command prompt is the first thing you see when starting PICO-8.
You use the command prompt to load and save cartridges, manage PICO-8 files, organize them into folders ("directories"), and perform other actions such as starting Splore.
> install_demos > load demos/jelpi > run
For a list of available commands, see CommandReference.
You can type Lua statements (such as print()
) at the prompt to execute them. This is a good way to experiment with the PICO-8 built-in functions and try Lua.
Note: The PICO-8 prompt only accepts commands and statements. To see the value of an expression, you must use the print()
statement.
Getting back to the command prompt
When playing a cartridge, you can interrupt it and return to the command prompt by pressing the Esc key. You can enter Lua statements at the prompt to examine or change the program's global variables. In many cases, you can use the resume
command to continue the program (but see its documentation
for caveats).
If you started the cartridge from Splore, pressing Escape opens the Splore pause menu. To get to the command prompt from here, select Splore from this menu, then press Escape again.
At the command prompt, pressing Esc opens the cartridge editor interface. To return to the command prompt from here, press Esc again.
The command prompt is exclusive to the PICO-8 app, and is not available from the PICO-8 web player.
Frame Advance
Typing a period, ".", and hitting enter will advance your program one frame by calling _update()
and then _draw()
. This can be useful to test behavior from frame to frame.