Tutorial by Examples

Import and initialize Every module needs to be imported and pygame is no exception. Although we need to call the function pygame.init() for all imported modules in pygame to be initialized properly. If we forget this some modules won't work. The function also returns a tuple of all successfully a...
On windows Navigate to http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame – an unofficial site providing windows binaries of open-source python packages for the official CPython distribution by Christoph Gohlke. Download the appropriate pygame .whl file according to your installed python ve...
Getting Started You must do the following to get started with Pygame: import pygame This opens a window of size 640,480, and stores it in a variable called screen. Setting up a window name Setting up a name for the pygame window requires the following syntax: pygame.display.set_caption('Name...

Page 1 of 1