3: Pygame Basics

Making Games with Python and Pygame · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    3: Pygame Basics

    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.


    This page titled 3: Pygame Basics was last modified on Tue, 01 Dec 2020 03:48:55 GMT and is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Al Sweigart via source content that was edited to the style and standards of the LibreTexts platform.