

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Build an Asteroids Game
incomplete
2: Installation
incomplete
3: Pygame
incomplete
4: Reading the Docs
incomplete
This lesson's interactive features are locked, please to keep using them
This project will depend heavily on the Pygame API. We'll use it to open a window, draw shapes, handle keyboard input, and respond to game events.
That's the whole point of using a third-party library: Pygame handles the game-programming infrastructure, going far beyond what the Python standard library provides, so that we can focus on the game we're actually building.
You can't (and shouldn't try to) memorize every function, class, and method in every library you use. That's what documentation is for.
Docs are typically not meant to be read from top to bottom like a book. Use them to answer specific questions:
Pygame's docs might feel different from the Python docs you've seen before, and that's normal. Every library has its own API, vocabulary, and documentation style.
We'll give you plenty of guidance in this project, but we won't spoon-feed every Pygame detail. We want you to learn how to read documentation. It may be intimidating because it's unfamiliar, but it's not actually that hard.
In the real world, you'll be reading a lot of docs, and you won't always have a tutorial or a course to help you out.
Open the Pygame docs and find the entry for pygame.display.set_mode(). I recommend using the search bar and just entering set_mode.
Copy the function signature itself, not an example call, and paste it into the text box, then submit. It's the line that starts with set_mode( and includes the return type after ->.