- Articles
236 results
-
Pico-8 Wikia
The wiki for PICO-8, the fantasy programmable game console by Lexaloffe Games. Welcome to the PICO-8 Wiki[] PICO-8 by Lexaloffle Games is a fantasy programmable game console for making, sharing, and playing -
Lua
Lua is a programming language designed primarily for embedded systems. It is popular in the video game industry as a language that can be embedded in a larger game engine. The following are the major -
Memory
PICO-8 has 64 KiB of addressable memory, used for graphics, map, sound, music, and direct access to hardware features such as persistent cartridge data and GPIO pins. Programs can read from and write to -
APIReference
This is a list of functions provided by PICO-8's Lua-based API. Typically you run these functions by writing them in the code editor and using the Run command to run your program -
Btn
btn ( [i,] [p] ) PICO-8 supports six buttons (0-5) of input for each of up to eight players (0-7). When on the device with a keyboard, inputs for players 0 and 1 can -
Spr
spr ( n, x, y, [w,] [h,] [flip_x,] [flip_y] ) This operation is affected by the draw state. -- draw sprite 1 (1x1) at (60, 60) spr(1, 60, 60) -- draw sprite 1 (1x1) at (72 -
P8SCII Control Codes
The P8SCII character set includes 16 control codes that produce effects when printed to the screen. These are typically invoked using escape sequences in string literals, as shown below. They can also be printed by -
Stat
stat ( n ) The stat() function returns information about the current runtime environment. Each kind of information has an ID (a number), described below. -
P8SCII
P8SCII is PICO-8's character set. It has 256 codes, consisting of 16 control codes and 240 printable characters (letters, numbers, symbols). For detailed information about control codes, see P8SCII Control Codes. -
Forum
The PICO-8 forum, or BBS (bulletin board system), is the official community center for PICO-8. This is where PICO-8 developers share games, discuss techniques, and get technical support. You can also use -
Print
print ( text, [x,] [y,] [color] ) The print function writes a line of text to the screen using the PICO-8 font, and then moves the cursor to the start of the next line. To write -
Fillp
fillp ( [pat] ) The fill pattern is part of the draw state. It affects circ(), circfill(), rect(), rectfill(), pset(), and line(). -
Palette
Every pixel on PICO-8 is stored as a 4-bit value in memory. Because a 4-bit value can only hold the values 0-15, this means pixels can only choose from a list -
Keyboard Shortcuts
Not all PICO-8 hardware has a keyboard, but when it does, there are many keyboard shortcuts that one can use. Known shortcuts are listed here. See btn() for details on default controller/keyboard mappings -
Pal
pal ( c0, c1, [p] ) All functions that draw to the screen, including spr() and map(), use the draw palette to decide which colors to write to the graphics buffer. The pal() function can modify this -
Line
line ( [x0,] [y0,] [x1,] [y1,] [color] ) The line() function is very versatile, with different operations depending on how many arguments are supplied. Line segments, strips, and loops are all easily created with this function. -
P8PNGFileFormat
PICO-8 can save cartridges in two file formats: the.p8 format, and the.p8.png format. The save command will use the format that corresponds to the filename extension. The.p8.png format is -
Sspr
sspr ( sx, sy, sw, sh, dx, dy, [dw,] [dh,] [flip_x,] [flip_y] ) This operation is affected by the draw state. -
Clip
clip ( x, y, w, h, [clip_previous] ) When the draw state has a clipping rectangle set, all drawing operations will not affect any pixels in the graphics buffer outside of this rectangle. This is useful -
Save
save [filename] If filename ends in ".p8", the file will be saved in the text-based.p8 file format. This format is the most flexible and is typically used during development, but cannot be uploaded -
Setmetatable
setmetatable ( tbl, metatbl ) In Lua, tables are general purpose objects that contain values and can be manipulated with operators. The default behaviors of operators on a table value are stored in its metatable, using keys -
Cursor
cursor ( [x,] [y,] [col] ) The draw state maintains a cursor location (and a pen color) for printing text with the print() function. PICO-8 uses this to maintain a scrolling display, especially for the command -
Atan2
atan2 ( dx, dy ) The atan2() function calculates the arctangent (the inverse tangent) of the ratio of two numbers, dy/dx. Where dx is a change in horizontal position and dy is a change in vertical -
Printh
printh ( str, [filename,] [overwrite,] [save_to_desktop] ) You can use printh() to emit debugging information without printing it on the PICO-8 display. It can emit this output to a command console window, to a -
RunningPico8
To run the PICO-8 app, you either double-click on the PICO-8 app icon, or you run it from a command console (aka terminal window). There are minor differences depending on which operating
Related Community

Marvel Database
comics
200K
Pages200K
Images1K
Videos
With more than 200,000 articles, the Marvel Database is the largest Marvel Comics encyclopedia ever written, as well as being the 5th largest FANDOM wiki. The database covers comics, characters, teams, games, TV shows and movies. Browse one of over…