Build Asteroids using Python and Pygame

Make a real arcade game while practicing OOP, vectors, collision detection, and game loops.

What you'll learn in this Python course

Build a clone of the classic Asteroids game using Pygame and object-oriented programming concepts. This guided project will help you understand how to use Pygame to create a game loop, handle user input, and manage game state. You'll also learn how to use object-oriented programming to create game objects and manage their interactions.

Chapter List

1
Pygame
Setup and install Pygame.
2
Gameloop
Write a gameloop that renders the game at 60 frames per second.
3
Player
Create a Player class and implement movement.
4
Asteroids
Add asteroids for the player to avoid.

Join 33,503 students in the Build Asteroids using Python and Pygame course

Read reviews of their learning experiences

This is a great project make learning a lot of fun.

(5/5)
Jenny Tait profile image

Jenny Tait

Shipley, UK

I struggled in this course but in a good way. Still have lots to learn and improve and this is a great start. With some handholding but sets you out alone in places where it matters

(5/5)
Jomar Jordas profile image

Jomar Jordas

Philippines

Fun project to learn about obj oriented programming.

(4/5)
Sam  profile image

Sam

Canada

Great little project, though i would have loved explanations of the pre-written bits of codes

(5/5)
Osfolt  profile image

Osfolt

France

This was the most challenging, but most rewarding course.

(5/5)
Jovonda Robinson profile image

Jovonda Robinson

United States

The beginning of the course feels almost too easy, but chapters 3 and 4 really force you to remember and use the "easy" things you learnt in chapters 1 and 2 to complete the lessons. I enjoyed the need to consult documentation (and Google when the documentation was confusing!) to write the code. Fun and valuable!

(5/5)
Sharat Buddhavarapu profile image

Sharat Buddhavarapu

United States

This really helped me to understand how the code can work together line by line to do something awesome!

(5/5)
Thomas Shannon profile image

Thomas Shannon

United States

Fun way to get your hands dirty and produce something that you can interact with. Now on to add more features to this base game!

(5/5)
James O profile image

James O

United States

great course and game is fun to play

(5/5)
Spikylake  profile image

Spikylake

Slovakia

Showing 1-9 of 1302

or view more reviews

Mediocrity doesn't cut it anymore

The only way to become a great developer is to write a lot of code

Avoid tutorial hell

by writing a ton of code

Stay motivated with

a game-like curriculum

Build portfolio projects

to prove your skills

Delve deeper

into foundational concepts

Learn flexibly online

without interrupting your life

For 1% the price of college

to minimize your financial risk

Frequently asked Questions

Got questions? We've got answers

Yes! It's free to create an account and start learning. You'll get all the immersive and interactive features for free for a few chapters. After that, if you still haven't paid for a membership, you'll be in read-only (content only) mode.