Pygame

Python module for writing video games

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; 24 years ago (2000-10-28)[2][3]
Stable release|

2.5.2 / 18 September 2023; 13 months ago (2023-09-18)[4]

Repository|

* github.com/pygame/pygame/

Written in| Python, C, Cython, and Assembly[5][6]
Operating system| Cross-platform
Type| API
License| GNU Lesser General Public License
Website| www.pygame.org

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.

## History

[edit]

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]).

## Development of version 2

[edit]

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 anniversary.[11]

## Features

[edit]

Pygame uses the Simple DirectMedia Layer (SDL) library,[a] 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]

## Community

[edit]

Following disagreements between former core developers and the repository owner, a fork known as pygame-ce (Community Edition) was created.[15]

There is a regular competition, called PyWeek, to write games using Python (and usually but not necessarily, Pygame).[16][17][18] The community has created many tutorials for Pygame.[19][20][21][22][23]

## Notable games using Pygame

[edit]

* Frets on Fire[24]
* Dangerous High School Girls in Trouble![25]

## See also

[edit]

* Free and open-source software portal
* Video games portal

* Cocos2d
* Panda3D
* Pyglet

## Notes

[edit]

1. ^ Pygame 2 and later versions are based on SDL2, while earlier releases were based on SDL1.[26]

## References

[edit]

1. ^ "Contributors to Pygame". GitHub.
2. ^ a b Shinners, Pete. "Python Pygame Introduction - History". Pygame.org. Archived from the original on 17 September 2019. Retrieved 28 April 2017.
3. ^ "Downloads - Pygame - Python game development". Pypi.python.org.
4. ^ "Yet another bug fix release". www.pygame.org. Retrieved 2 December 2023.
5. ^ a b c "About Pygame". GitHub. Archived from the original on 18 September 2019. Retrieved 31 August 2019.
6. ^ "GettingStarted". Pygame.org.
7. ^ "pySDL sourceforge page". Sourceforge.net.
8. ^ "commit by other authors". GitHub.
9. ^ "Pygame Front Page — pygame v2.0.1.dev1 documentation". www.pygame.org. Retrieved 26 February 2021.
10. ^ "pygame 1.9.5 released into the wilds". www.pygame.org.
11. ^ "pygame 2.0 - the happy dance birthday release". GitHub.
12. ^ "Pygame docs". Pygame.org.
13. ^ "Example of using RAPT to package pygame(_sdl2) games.: renpytom/rapt-pygame-example". GitHub. 1 April 2019. Retrieved 1 April 2019.
14. ^ "API — Pygame Subset for Android". Archived from the original on 19 October 2014. Retrieved 14 October 2014.
15. ^ "pygame - Community Edition". pypi.com.
16. ^ "PyWeek - Python Game Programming Challenge". Pyweek.org.
17. ^ Gee, Sue (29 March 2013). "Why PyWeek: An Interview with Richard Jones". i-programmer.info. Retrieved 31 March 2020.
18. ^ "PyWeek - Python Wiki". Wiki.python.org. Retrieved 1 April 2019.
19. ^ "pygame documentation: Tutorials". Pygame.org.
20. ^ Siddiqi (27 June 2020). "Python Game projects with source code". CodersLegacy. Retrieved 25 December 2020.
21. ^ Shinners, Pete. "Line by line tutorial - Tutorial for beginners". Archived from the original on 5 February 2005.
22. ^ "Creating Games with Python - A tutorial explaining how to use pygame for game development and improved execution". Linuxjournal.com.
23. ^ "Arinoid tutorials video tutorials at ShowMeDo". Archived from the original on 29 April 2007.
24. ^ "fretsonfire/src at master · skyostil/fretsonfire". GitHub. Retrieved 2 June 2023.
25. ^ "Dangerous High School Girls in Trouble!". Pygame.org. Retrieved 8 July 2011.
26. ^ "pygame 1.9.5 released into the wilds". Pygame.org.

## External links

[edit]

* Official website
* Pygame newsgroup (web access) \- the "official"
* Pygame Subset for Android (PGS4A)
* pyOpenGL \- Python OpenGL Bindings
* Pygame-SDL2 \- a reimplementation of Pygame APIs on top of SDL2
* PySDL2 \- a wrapper around the SDL2 library similar to the discontinued PySDL project

* v
* t
* e

Game engines (list)

* Source port
* First-person shooter engine
* list
* Game engine recreation
* list
* Game creation system
* Game IDE
* List of visual novel engines
* id Tech

Proprietary|

| 1980s|

* Cobra
* Filmation
* Freescape
* Gold Box
* SCUMM

|

1990s|

* 3D GameStudio
* Clickteam
* Dark Engine
* GameMaker
* Genie Engine
* GoldSrc
* Jedi
* LithTech
* Mugen
* Pie in the Sky
* Reality Lab
* RenderWare
* RPG Maker
* Sim RPG Maker
* Unreal Engine 1
* Virtual Theatre
* Voxel Space
* Zero
* Zillions of Games

2000s|

* Anvil
* C4 Engine
* Chrome Engine
* CryEngine
* Crystal Tools
* Diesel
* Ego
* Essence Engine
* Euphoria
* Flare3D
* Frostbite
* Gamebryo
* GameSalad
* HeroEngine
* IW
* Leadwerks
* Marmalade
* MT Framework
* PhyreEngine
* Q
* RAGE
* Retro Engine
* SAGE
* Shark 3D
* Silent Storm engine
* Source
* Titan
* Unigine
* Unity
* Unreal Engine 2
* Unreal Engine 3
* Vicious Engine
* Vision
* Visual3D Game Engine

2010s|

* 4A Engine
* Amazon Lumberyard
* Bitsquid
* Buildbox
* Construct
* Creation Engine
* Decima
* Defold
* Felgo
* Fox Engine
* id Tech 5
* id Tech 6
* Ignite
* Kynapse
* Luminous Engine
* Nvidia GameWorks
* Panta Rhei
* Pixel Game Maker MV
* RE Engine
* Snowdrop
* Stencyl
* Source 2
* UbiArt Framework
* Unreal Engine 4

2020s|

* id Tech 7
* Unreal Engine 5

Free and
open-source|

| 1970s|

* Z-machine

|

1990s|

* Adventure Game Studio
* Build
* Crystal Space
* Doom engine
* Game-Maker
* OHRRPGCE
* Quake engine
* Quake II engine
* Stratagus

2000s|

* Away3D
* Blender Game Engine
* Bork3D Game Engine
* Cocos2d
* Dim3
* Game Editor
* GDevelop
* id Tech 3
* id Tech 4
* Irrlicht Engine
* jMonkeyEngine
* Lightweight Java Game Library
* Löve
* OGRE
* Open Wonderland
* Panda3D
* Papervision3D
* Plasma
* Platinum Arts Sandbox
* Pygame
* Ren'Py
* Scratch
* Solar2D
* Spring Engine
* Thousand Parsec
* Torque
* Vassal Engine
* Wintermute Engine

2010s|

* Delta3D
* Godot
* GPUOpen
* Horde3D
* libGDX
* Moai
* OpenFL
* ORX
* PlayCanvas
* Raylib
* Snap!
* Stencyl
* Stride

2020s|

* Open 3D Engine

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template