Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Code a Snake Game with Python and Pygame - Tutorial

via freeCodeCamp

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
Hands-on programming tutorial that walks through building a complete Snake game in Python with the Pygame library, from creating the display surface and restructuring the code into object-oriented classes to moving a block with a timer, drawing the snake and apple, detecting when the snake eats the apple and tracking score, adding game over logic, including background music and images, and finally converting the Python program into an executable. Suited to beginners who know basic Python and want a first game project.

Syllabus

Intro and create surface.
Converting into OOP.
Moving block with timer.
Draw snake and apple.
Snake eats apple, find score.
Game over logic.
Add background music,image.
Convert python to exe.

Taught by

freeCodeCamp.org

Reviews

Start your review of Code a Snake Game with Python and Pygame - Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.