Skip to content
Published February 10, 2019

Pico-8 is a fantastic little program for designing tiny 2d sprite-based games. It uses the Lua programming language, which is a dynamically-typed scripting programming language. Lua is a popular language in building mods for video games since it’s very simple and lightweight. Lua is an easy, user-friendly language to learn, and combining that with Pico-8, developing 2d games has never been easier.

For this tutorial, I’m going to assume that you have no knowledge of Pico-8, Lua, or software development in general. This tutorial will be geared for a Windows environment, but Pico-8 can run on Mac and Linux as well.

Getting Started

The first thing you’ll want to do is purchase and download Pico-8. You can pick up Pico-8 at this website. Once that is taken care of, go ahead and run the setup executable. After setting up Pico-8, run the .exe in the generated folder. You’ll arrive at a black window with some similarities to Windows Command Prompt.

Command lines are intimidating to everyone at first, but the one for Pico-8 is quite easy to use. There is a helpful readme file included in Pico-8, but the easiest thing to do is type HELP into the editor and press enter when you’re done. One thing to note is that Pico-8 only uses lowercase, although the text will appear as uppercase. As such, you don’t need to worry about using shift or capslock.

Pico-8 will give you a list of commands that you can run, such as LOAD, SAVE, SPLORE, etc. Some are self-explanatory, while others like CD are less so. For the time being, don’t worry about any commands besides RUN, LOAD, and SAVE.

The command line for Pico-8. It may look intimidating at first, but there aren’t really all that many commands to learn. SAVE, LOAD and RUN are the first few you should learn.

Some Useful Commands

  • LOAD <filename> will load a game for you. The file name inside the angle brackets is the name of the file you want to load. This is called passing an argument to a command. For example, if you game was Super Mario Bros, you would type LOAD SUPER MARIO BROS.
  • SAVE <filename> will save a gamer for you that you have currently loaded (or if you started fresh). Example of this would be SAVE SONIC 2 if you were making the game Sonic 2.
  • RUN will start up a game for you that you have currently loaded.

Go ahead and save a new game. In this tutorial, the game file will be called tutorial_game.p8, so you would type SAVE TUTORIAL_GAME.

After you have saved your new tutorial game, hit the ESC key. This brings up a new window, the code editor.

The Code Editor

The code editor is where you’ll be doing all of your coding work. My one complaint that I have with Pico-8 is that the code editor is quite small, so a lot of text ends up being off screen. If you don’t care to use Pico-8’s code editor, you can open up your .p8 game file with any text editor. I personally use Sublime Text 3, but any text editor will work, such as Notepad, Notepad++, etc.

The code editor for Pico-8. The editor functions similarly to Notepad or other text editors. The token count limits you on the number of letters, numbers, etc. that your program has. You can switch token count to see the other program limitations that Pico-8 imposes to keep your game small.

The Sprite Editor

Select the next tab in the upper right side of the window once you finish looking at the code screen. This second screen is the sprite screen, where you can draw in-game sprites and reference them later. There are 16 available colors to use. You can change the size of the pencil and the size of the canvas that you’re working on. Tabs 0-3 gives you additional space to create more sprites. The smallest default sprite size is 8×8, but you can increase this if necessary. There are also some blue buttons you can turn on and off. These controls the flags for each sprite. For example, you might set the first flag to indicate that the sprite is one you should have a collision with. Don’t worry about these for the moment. We’ll come back to them later.

The sprite editor for Pico-8. The large black square is where you draw your sprites. The smaller multicolored squares on the right is for selecting colors. The black rectangle at the bottom lets you pick different sprites. There’s also different image editing tools and a number letting you know how to reference your sprite later on.

The Map Editor

The third tab is the map editor. If you’re making a game that requires a map, such as a platformer or 3/4 perspective rpg, it can be of use. However, the map size is rather limited, so you may want to learn other methods for building the game later on. It’s helpful early on when you want to build the entire map ahead of time and you want the game to be small. You can place any sprites that you built with the sprite editor onto the map and load the map when the game starts.

The map editor. This is where you place the sprites that you’ve drawn for your game. This editor is optional; you can build a map yourself purely in code.

The Sound Editor

The fourth tab is the sound editor. This is where you construct sound effects (or music) for your game. You can select different waveforms and volume for each note. Some waveforms include a square wave, a triangle wave, and a saw wave. By switching tabs in the upper-left corner, you can look at the individual notes and effects for your sound effect (it works as a tracker). You can also adjust the pitches and speed to construct your sound effect (or musical sequence). Lastly, you can add some looping to your music.

The sound editor for Pico-8. You can select different waveforms such as triangle, saw, square and others to get different sounds. You can also edit the large black rectangle to adjust the pitch for the sound/music and set the volume on the bottom. Lastly, you can edit the overall speed and have the sound/music loop at certain frames.

The Music Editor

Lastly, Pico-8 has the music editor. The music editor lets you play tunes that you created in the sound editor and layer them together. You can have up to four musical pieces playing at once using the four channels. You can also create up to 64 unique musical tracks.

Lastly, we have the music editor for Pico-8. You can set musical pieces that you create to one of four channels, and you can create multiple different songs for your game.

That’s it for part 1. In part 2, we will begin to build a sample game in this tutorial.