We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Build Asteroids using Python and Pygame

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

Browse Lessons (read-only)

What will you learn?

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 29,769 students in the Build Asteroids using Python and Pygame course

Read reviews of their learning experiences

Personally I would have preferred properly building this from scratch instead of copy-pasting the code, but this is a cool application of the OOP techniques we have learned

(4/5)
Ryan Wingfield profile image

Ryan Wingfield

United Kingdom

really like this chapter !

(5/5)
Mario Dellagiacoma profile image

Mario Dellagiacoma

Luxembourg

Fun course to show you another use-case for python

(5/5)
Wayne Cooper profile image

Wayne Cooper

Bahamas

gut

(5/5)
Petr Konopa profile image

Petr Konopa

Czechia

This course was REALLY good! It really stretched my understanding, it won't hold your hand - I was surprised at every step that what I wrote actually worked!

(5/5)
Sam  profile image

Sam

Stoke on Trent - the centre of the universe

kinda convoluted and not as straightforward as the other modules... though I guess it does say that documentation should be read and perhaps this is expected...

(3/5)
nicholas tobias profile image

nicholas tobias

Indonesia

I was skeptical at first with the code pre-made to be pasted, but it ended up as a good introduction to pygame and a nice little project

(5/5)
Loic LL profile image

Loic LL

France

This course just hit the spot with its difficulty level - just enough for you to scratch your head trying to remember stuff on your own, but easy enough to glide through it without any major hic ups and using hints/chat with Boots/Spellbook/Lessons, yet, as it seems to me, covering all of the material from OOP in python course. Really liked this one!

(5/5)
Robert Johnson profile image

Robert Johnson

Nowhere

it was had but really enjoyable much easier than book bot!

(5/5)
Sami Gilham profile image

Sami Gilham

United States

Showing 1-9 of 1093

Browse Lessons (read-only)

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.