Learn PICO8-LUA with Real Code Examples
Updated Nov 21, 2025
Installation Setup
Download PICO-8 from Lexaloffle website
Unpack and launch executable for your OS
Explore built-in editor and sample cartridges
Familiarize with keyboard/gamepad shortcuts
Verify environment by running `HELLO WORLD` example
Environment Setup
Install PICO-8 on your platform
Familiarize with editors (code, sprite, map, SFX, music)
Practice running sample cartridges
Set up input devices (keyboard or gamepad)
Verify by running a simple demo
Config Files
cartridge.p8 - main game file
spritesheet - stored in cartridge
map - stored in cartridge
sfx - stored in cartridge
music - stored in cartridge
Cli Commands
LOAD <cart> - load cartridge
RUN - execute current cartridge
SAVE <cart> - save cartridge
EXPORT HTML5 - generate web playable version
EXPORT PNG - save cartridge as image
Internationalization
Supports UTF-8 text
No native i18n system
Custom localization via string tables
Primarily English tutorials and examples
Community may provide translations
Accessibility
Beginner-friendly Lua syntax
Visual feedback via graphics and sound
Keyboard and gamepad input
Community tutorials and jams
Sandboxed for safe experimentation
Ui Styling
128×128 retro resolution
16-color palette
Text and simple shapes via API
Sprites and maps for visuals
Sound and music for audio feedback
State Management
Variables in `_init()` define game state
Tables store structured data
Persistent memory via `cartdata()`
Input polling updates state each frame
Collision and physics logic handled in `_update()`
Data Management
Primitive types: numbers, strings, booleans
Tables for arrays and objects
Sprites and map as graphical data
Music and SFX stored in cartridge
Memory and token-efficient code required