Loading AI tools
Python module for writing video games From Wikipedia, the free encyclopedia
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language.
![]() | |
Original author(s) | Lenard Lindstrom, René Dudfield, Pete Shinners, Nicholas Dudfield, Thomas Kluyver, and others[1] |
---|---|
Developer(s) | Pygame Community |
Initial release | 28 October 2000[2][3] |
Stable release | 2.5.2
/ 18 September 2023[4] |
Repository | |
Written in | Python, C, Cython, and Assembly[5][6] |
Operating system | Cross-platform |
Type | API |
License | GNU Lesser General Public License |
Website | www![]() |
Pygame was originally written by Pete Shinners to replace PySDL after its development stalled.[2][7] It has been a community project since 2000[8] and is released under the free software GNU Lesser General Public License[5] (which "provides for Pygame to be distributed with open source and commercial software"[9]).
Pygame version 2 was planned as "Pygame Reloaded" in 2009, but development and maintenance of Pygame completely stopped until the end of 2016 with version 1.9.1. After the release of version 1.9.5 in March 2019, development of a new version 2 was active on the roadmap.[10]
Pygame 2.0 released on 28 October, 2020, Pygame's 20th birthday.[11]
Pygame uses the Simple DirectMedia Layer (SDL) library,[lower-alpha 1] with the intention of allowing real-time computer game development without the low-level mechanics of the C programming language and its derivatives. This is based on the assumption that the most expensive functions inside games can be abstracted from the game logic, making it possible to use a high-level programming language, such as Python, to structure the game.[5]
Other features that SDL does have include vector math, collision detection, 2D sprite scene graph management, MIDI support, camera, pixel-array manipulation, transformations, filtering, advanced freetype font support, and drawing.[12]
Applications using Pygame can run on Android phones and tablets with the use of Pygame Subset for Android (pgs4a).[13] Sound, vibration, keyboard, and accelerometer are supported on Android.[14]
There is a regular competition, called PyWeek, to write games using Python (and usually but not necessarily, Pygame).[15][16][17] The community has created many tutorials for Pygame.[18][19][20][21][22]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.