Getting Started with Pico 8

Creating your first Pico 8 game, what is Pico 8?

It is a virtual machine created by Lexaloffle Games, it is designed to simulate a fantasy gaming console, writing application is achieved using Lua. It is easy to use and offers a lot of features

I introduced gifs in my article because words would not describe it the best and seeing it in action might get you more interested in it. What you look at is a 128×128 pixel display, which renders sixteen colors.

What we will learn?

We will now head straight to writing some code, we can always learn more later, it’s time for the action and why we are here.

First step

First, let’s start with how to display a list of commands.
help displays all the commands available.

The output of help is

LOAD
RUN
SHUTDOWN 
INSTALL_DEMOS
CD
CD ..
KEYCONFIG
SAVE
SPLORE

What individual commands do explained.

LOAD – Is a command used to load cartridges.

Example:

Starts the cartridge.

load jelpi

run
shutdown – power off the console and closes the application.

cd – current directoryCode language: JavaScript (javascript)

Example:

cd demos

cd .. – exit current directory and go one step back

keyconfig – opens key bind settings.

save – saves fileCode language: PHP (php)

Example

save test_build
`splore` – The Pico 8 community repository to share and access games created by the community members
Code language: JavaScript (javascript)
`ls` – lists all file and directory in current locationCode language: JavaScript (javascript)

Writing our first program.

We will create the _draw function.

function _draw()
cls()
print("Hello World !")
endCode language: JavaScript (javascript)

What do those function means?

cls() clears screen.

print() – prints given parameter or string

Hit ESC

run

This should render as shown in the screenshot.

There will be more content out about Pico 8, which will offer more insight into this fantastic fantasy virtual console.