๐ŸŽฎ My First Pico-8 Game ยท Episode 2 of 6 ยท See All Episodes
๐Ÿ Episode 2 ยท Beginner ยท Builds on Episode 1

Snake on
a Grid!

Guide a growing snake to eat food without hitting the walls or yourself. Learn grid-based movement, Lua tables and collision detection.

๐Ÿ‘ถ Ages 8+ โฑ๏ธ ~1 Hour ๐ŸŽฎ Pico-8 โœ“ Free
๐Ÿ“ฆ Tables ๐Ÿ”„ Grid Movement ๐ŸŽฏ Collision โž• Growth โฑ๏ธ Timer
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 9 steps
๐Ÿ“ฆ
Reference cartridge: download the finished, playable Pico-8 cart for this workshop: โฌ‡ pico8-snake-reference.zip. Every code block also has a Copy button.
๐Ÿ’ป
How to run: Open PICO-8, paste the code in the CODE tab, and press Ctrl+R to run!
๐ŸŒ
How it works: write the code in each step, and the canvas on the right shows what your code does. It is a live preview that builds the game as you go. Type to see it update, or press Apply to Canvas to test it straight away.
๐ŸฆŠ
Lumo says: every step adds one feature to the same game. Type a little, click Apply to Canvas, and test it straight away. There is no wrong answer you can't undo.

Build Snake Step by Step

Each step adds one feature. Write the code, watch it come alive in the canvas, then make it your own.

Step 1 / 6
A green snake on a dark grid eating food
๐ŸŽ‰๐Ÿ๐ŸŽ๐ŸŽฎ๐Ÿ’€
You Built a Snake Game!

Amazing, you've made a real Snake game with grid movement, growth, collision and increasing speed. Now try Episode 3!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐Ÿฐ Episode 3: Dungeon Explorer โ†’

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi
๐Ÿงฉ
Code Order: PICO-8 Game Loop
+20 XP
Drag these PICO-8 Lua lines into the correct order for the _update() and _draw() functions.
if btn(1) then player_x += speed end
function _update()
function _draw()
if btn(0) then player_x -= speed end
end
cls(0)
spr(1, player_x, player_y)
end
๐ŸŽฎ Build Snake in the PICO-8 Studio Pick the game in the browser, tune it, play it live at 128x128, then download a real .p8 cart for PICO-8. No install. Open the Studio โ†’