๐ŸŽฎ My First GDevelop Game ยท Episode 2 of 6 ยท See All Episodes
๐Ÿ Episode 2 ยท Intermediate ยท No Coding Needed

Snake
Classic Direction Game

Guide a growing snake to eat food. Learn about direction variables, arrays to store segments, and spawning objects. A step up from Pong!

๐Ÿ‘ถ Ages 8+ โฑ๏ธ ~1.5 Hours ๐ŸŽฎ GDevelop โœ“ Free
๐Ÿ”„ Direction ๐Ÿ“ Arrays ๐Ÿ”„ Spawning ๐Ÿ”€ Conditionals โฑ๏ธ Timers ๐Ÿ’ฅ Collisions
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress0 / 8 steps
Build it in our GDevelop Studio too: lay out your game, add GDevelop events and export an object list plus event sheet in the browser. Open the GDevelop Mod Studio →
๐Ÿ“ฆ
Workshop reference pack: download an offline copy of every step in this workshop: โฌ‡ gdevelop-snake-workshop-reference.zip. Every code block also has a Copy button.
๐Ÿ’ป
How to run: Open GDevelop, load your project, and press the Preview button (play icon)!
๐ŸŒ
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, so you can play every step along the way. 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 play 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 snake moving around a grid
๐ŸŽ‰๐Ÿ๐ŸŽฎ๐ŸŽŠ๐Ÿ“
You Built a Snake Game!

Incredible! You've mastered arrays, grid movement, timers and scene transitions. These skills power many GDevelop games. Now try Episode 3!

0
Total XP
1
Level
0
Best Streak
0%
Accuracy
๐Ÿฐ Episode 3: Platformer โ†’ โญ View My Progress
๐Ÿงฉ
Code Order: GDevelop Event Setup
+20 XP
Drag these GDevelop steps into the correct order for adding a collectible coin to your game.
Add condition: Player is in collision with Coin
Add a Sprite object and name it "Coin"
Add action: Delete the Coin object
Place Coin instances on the scene
Add action: Change the variable Score, add 1