Skip to main content

Python Game Development

Project description

pygame

AppVeyorBuild LaunchpadBuild PyPiVersion PyPiLicense Python2 Python3 GithubCommits LGTMAlerts LGTMGradePython LGTMGradeC Coverity

pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task.

We need your help to make pygame the best it can be! New contributors are welcome.

Installation

pip install pygame

Help

If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the docs page.

The online documentation stays up to date with the development version of pygame on github. This may be a bit newer than the version of pygame you are using. To upgrade to the latest full release, run pip install pygame --upgrade in your terminal.

Best of all, the examples directory has many playable small programs which can get you started playing with the code right away.

Building From Source

If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it.

Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the setup.py script which will attempt to auto-configure, build, and install pygame.

Much more information about installing and compiling is available on the Compilation wiki page.

Credits

Thanks to everyone who has helped contribute to this library. Special thanks are also in order.

  • Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer

  • Lenard Lindstrom: the 1.8+ windows maintainer, many changes, and fixes

  • Brian Fisher for svn auto builder, bug tracker and many contributions

  • Rene Dudfield: many changes, and fixes, 1.7+ release manager/maintainer

  • Phil Hassey for his work on the pygame.org website

  • DR0ID for his work on the sprite module

  • Richard Goedeken for his smoothscale function

  • Ulf Ekström for his pixel perfect collision detection code

  • Pete Shinners: original author

  • David Clark for filling the right-hand-man position

  • Ed Boraas and Francis Irving: Debian packages

  • Maxim Sobolev: FreeBSD packaging

  • Bob Ippolito: MacOS and OS X porting (much work!)

  • Jan Ekhol, Ray Kelm, and Peter Nicolai: putting up with early design ideas

  • Nat Pryce for starting our unit tests

  • Dan Richter for documentation work

  • TheCorruptor for his incredible logos and graphics

  • Nicholas Dudfield: many test improvements

  • Alex Folkner for pygame-ctypes

Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton.

And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau

There’s many more folks out there who’ve submitted helpful ideas, kept this project going, and basically made our life easier. Thanks!

Many thank you’s for people making documentation comments, and adding to the pygame.org wiki.

Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy.

Lots of thanks to James Paige for hosting the pygame bugzilla.

Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting.

Dependencies

Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions:

  • CPython >= 2.7 or PyPy >= 6.0.0 (and pypy3)

  • SDL >= 1.2.15

  • SDL_mixer >= 1.2.13

  • SDL_image >= 1.2.12

  • SDL_ttf >= 2.0.11

  • SDL_gfx (optional, vendored in)

  • NumPy >= 1.6.2 (optional)

License

This library is distributed under GNU LGPL version 2.1, which can be found in the file docs/LGPL.txt. We reserve the right to place future versions of this library under a different license.

This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine.

The programs in the examples subdirectory are in the public domain.

See docs/licenses for licenses of dependencies.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame-2.0.3.dev4.tar.gz (5.8 MB view hashes)

Uploaded Source

Built Distributions

pygame-2.0.3.dev4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pygame-2.0.3.dev4-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (13.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

pygame-2.0.3.dev4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (4.9 MB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pygame-2.0.3.dev4-pp36-pypy36_pp73-win32.whl (4.4 MB view hashes)

Uploaded PyPy Windows x86

pygame-2.0.3.dev4-pp36-pypy36_pp73-macosx_10_9_x86_64.whl (4.8 MB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pygame-2.0.3.dev4-pp27-pypy_73-win32.whl (4.4 MB view hashes)

Uploaded PyPy Windows x86

pygame-2.0.3.dev4-pp27-pypy_73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pygame-2.0.3.dev4-pp27-pypy_73-manylinux_2_12_i686.manylinux2010_i686.whl (13.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

pygame-2.0.3.dev4-pp27-pypy_73-macosx_10_9_x86_64.whl (4.8 MB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp310-cp310-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

pygame-2.0.3.dev4-cp310-cp310-win32.whl (4.5 MB view hashes)

Uploaded CPython 3.10 Windows x86

pygame-2.0.3.dev4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

pygame-2.0.3.dev4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pygame-2.0.3.dev4-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (13.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

pygame-2.0.3.dev4-cp310-cp310-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp39-cp39-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pygame-2.0.3.dev4-cp39-cp39-win32.whl (4.5 MB view hashes)

Uploaded CPython 3.9 Windows x86

pygame-2.0.3.dev4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

pygame-2.0.3.dev4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp39-cp39-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp38-cp38-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

pygame-2.0.3.dev4-cp38-cp38-win32.whl (4.5 MB view hashes)

Uploaded CPython 3.8 Windows x86

pygame-2.0.3.dev4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.8 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

pygame-2.0.3.dev4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp38-cp38-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp37-cp37m-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

pygame-2.0.3.dev4-cp37-cp37m-win32.whl (4.5 MB view hashes)

Uploaded CPython 3.7m Windows x86

pygame-2.0.3.dev4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.8 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

pygame-2.0.3.dev4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp37-cp37m-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp36-cp36m-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

pygame-2.0.3.dev4-cp36-cp36m-win32.whl (4.5 MB view hashes)

Uploaded CPython 3.6m Windows x86

pygame-2.0.3.dev4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.8 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ ARM64

pygame-2.0.3.dev4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp36-cp36m-macosx_10_9_x86_64.whl (5.1 MB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp35-cp35m-win_amd64.whl (4.8 MB view hashes)

Uploaded CPython 3.5m Windows x86-64

pygame-2.0.3.dev4-cp35-cp35m-win32.whl (4.4 MB view hashes)

Uploaded CPython 3.5m Windows x86

pygame-2.0.3.dev4-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 3.5m manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 3.5m manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp35-cp35m-macosx_10_9_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 3.5m macOS 10.9+ x86-64

pygame-2.0.3.dev4-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl (13.3 MB view hashes)

Uploaded CPython 2.7mu manylinux: glibc 2.5+ x86-64

pygame-2.0.3.dev4-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl (12.4 MB view hashes)

Uploaded CPython 2.7mu manylinux: glibc 2.5+ i686

pygame-2.0.3.dev4-cp27-cp27m-win_amd64.whl (4.7 MB view hashes)

Uploaded CPython 2.7m Windows x86-64

pygame-2.0.3.dev4-cp27-cp27m-win32.whl (4.4 MB view hashes)

Uploaded CPython 2.7m Windows x86

pygame-2.0.3.dev4-cp27-cp27m-macosx_10_9_x86_64.whl (4.9 MB view hashes)

Uploaded CPython 2.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page