PyGame is a free framework for Python that provides modules designed to write video games. It is built on top of the Simple DirectMedia Layer Library (SDL) that provides easy access to sound and visual elements.
In this section we will see how to set up PyGame and look at some of the elements that will be used in our future programs. The Python language does not include PyGame, and as such the framework must be imported before it can be used.