Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Make a 2D Side-Scroller Game With PyGame (Summary)

In this course, you learned how game programming with pygame differs from standard procedural programming. You also learned how to:

  • Implement event loops
  • Draw items on the screen
  • Play sound effects and music
  • Handle user input

To do this, you used a subset of the pygame modules, including the display, mixer and music, time, image, event, and key modules. You also used several pygame classes, including Rect, Surface, Sound, and Sprite. But these only scratch the surface of what pygame can do! Check out the official pygame documentation for a full list of available modules and classes.

Download

Sample Code (.zip)

422.6 KB

Download

Course Slides (.pdf)

7.6 MB

Comments & Discussion

sumakolurmath on March 27, 2020

Thanks Chris, for the awesome course!

David Wright on April 26, 2020

Thank you Chris for a great course. I think I have found what I want to do with my Python knowledge.

mikesult on May 4, 2020

Thanks Chris, Excellent course. You covered so many of the elements in a nice incremental way and always kept a working program at all stages.

One strange behavior for me was when loading the sprite images of the jet and missile, if I used the .convert() method then the .set_colorkey() method on the next line didn’t create the desired transparency. If I removed the .convert() method then the .set_colorkey() method did work. The cloud sprite worked fine when using the .convert() method. Very strange.

I learned a lot, thanks!

Become a Member to join the conversation.