Snake Game banner

Snake Game

2 devlogs
3h 38m 48s

Making the classical snake game to learn how to use pygame and package to itch.io! Use arrow keys to move the snake and eat apples 🍎

Demo Repository

Loading README...

gw

Shipped this project!

Hours: 3.61
Cookies: 🍪 10
Multiplier: 2.64 cookies/hr

I learnt how to make the classical snake game using the pygame library by going through a tutorial as this was the first game I had ever made. Even though the tutorial’s code didn’t fully work, I learnt the basics of using pygame to build upon the guide and also debug errors such as the snake’s head disappearing into the wall (or itself) upon collision.

After adding my own bits and pieces to the game (starting page, restart button), I also figured out how to package my game and upload it onto itch.io, making it the first game I’ve ever published :D

gw

I made slight updates to the structure of my .py file so that it could get packaged and uploaded to itch.io. Also made small changes to the font sizes for better visibility.

Attachment
0
gw

I created the basics of the game first by following a tutorial to pick up some basic knowledge. After finishing the tutorial, I debugged some of the code (not sure why the tutorial didn’t entirely work?) and changed the way the game exits (rather than exiting after X seconds, it only exits when the user closes the window).

Next, a start screen was created and game states were added. I also fixed the issue of the collided block in the snake disappearing when game over. The game over screen was updated to include a RESTART button so that users can return to the start screen to replay.

Attachment
0