Skip to main content
Engineering LibreTexts

3: Pygame Basics

  • Page ID
    13575
  • Just like how Python comes with several modules like random, math, or time that provide additional functions for your programs, the Pygame framework includes several modules with functions for drawing graphics, playing sounds, handling mouse input, and other things.

    This chapter will cover the basic modules and functions that Pygame provides and assumes you already know basic Python programming. If you have trouble with some of the programming concepts, you can read through the "Invent Your Own Computer Games with Python" book online at http://invpy.com/book. This book is aimed at complete beginners to programming.

    The "Invent with Python" book also has a few chapters covering Pygame. You can read them online at http://invpy.com/chap17.

    Once you learn more about Pygame, you can view the other modules that Pygame provides from the online documentation at http://pygame.org/docs.