pygame

🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.

https://github.com/pygame/pygame

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    14 of 335 committers (4.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.5%) to scientific vocabulary

Keywords

game-dev game-development gamedev pygame python sdl sdl2

Keywords from Contributors

closember distributed templates apps profiler notebook tensor deep-neural-networks views unit-testing
Last synced: 6 months ago · JSON representation

Repository

🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.

Basic Info
Statistics
  • Stars: 8,023
  • Watchers: 172
  • Forks: 3,607
  • Open Issues: 510
  • Releases: 53
Topics
game-dev game-development gamedev pygame python sdl sdl2
Created almost 9 years ago · Last pushed about 1 year ago
Metadata Files
Readme

README.rst

.. image:: https://raw.githubusercontent.com/pygame/pygame/main/docs/reST/_static/pygame_logo.svg
  :alt: pygame
  :target: https://www.pygame.org/


|AppVeyorBuild| |PyPiVersion| |PyPiLicense|
|Python3| |GithubCommits| |BlackFormatBadge|

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
------------

Before installing pygame, you must check that Python is installed
on your machine. To find out, open a command prompt (if you have
Windows) or a terminal (if you have MacOS or Linux) and type this:
::

   python --version


If a message such as "Python 3.8.10" appears, it means that Python
is correctly installed. If an error message appears, it means that
it is not installed yet. You must then go to the `official website
`_ to download it.

Once Python is installed, you have to perform a final check: you have
to see if pip is installed. Generally, pip is pre-installed with
Python but we are never sure. Same as for Python, type the following
command:
::

   pip --version


If a message such as "pip 20.0.2 from /usr/lib/python3/dist-packages/pip
(python 3.8)" appears, you are ready to install pygame! To install
it, enter this command:
::

   pip install pygame

Once pygame is installed, quickly test your library by entering the following
command, which opens one of the many example games that comes pre-installed: 
::

	python3 -m pygame.examples.aliens


If this doesn’t work, the `Getting Started 
`_ section of the official 
website has more information for platform specific issues, such as adding
python to your machine’s PATH settings


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`_. You
can also browse the documentation locally by running
``python -m pygame.docs`` in your terminal. If the docs aren't found
locally, it'll launch the online website instead.

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.


Features
----------

Pygame is a powerful library for game development, offering a wide
range of features to simplify your coding journey. Let's delve into
what pygame has to offer:

Graphics - With pygame, creating dynamic and engaging graphics has
never been easier. The library provides simple yet effective tools for
2D graphics and animation, including support for images, rectangles,
and polygon shapes. Whether you're a seasoned game developer or just
starting out, pygame has you covered.

Sound - Pygame also includes support for playing and manipulating sound
and music, making it easy to add sound effects and background music to
your games. With support for WAV, MP3, and OGG file formats, you have
plenty of options to choose from.

Input - Pygame provides intuitive functions for handling keyboard, mouse,
and joystick input, allowing you to quickly and easily implement player
controls in your games. No more struggling with complex input code, pygame
makes it simple.

Game Development - Lastly, pygame provides a comprehensive suite of tools
and features specifically designed for game development. From collision
detection to sprite management, pygame has everything you need to create
exciting and engaging games. Whether you're building a platformer, puzzle
game, or anything in between, pygame has you covered.


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`_.

Contribute
----------

* `Documentation Contributions `_ - Guidelines for contributing to the main documentations
* `Writing your first unit test `_ - Step by step guide on how to write your first unit test in Python for Pygame.
* `How to Hack Pygame `_ - Information on hacking, developing, and modifying Pygame
* `Issue Tracker for beginners `_ - A way for beginners to contribute to the project
* `Bugs & Patches `_ - Report bugs
* `Communication tools `_ - More information and ways to get in touch with the Pygame team


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  | >= 3.6 (Or use PyPy3)  |
+----------+------------------------+
| SDL      | >= 2.0.8               |
+----------+------------------------+
| SDL_mixer| >= 2.0.0               |
+----------+------------------------+
| SDL_image| >= 2.0.2               |
+----------+------------------------+
| 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.


.. |AppVeyorBuild| image:: https://ci.appveyor.com/api/projects/status/x4074ybuobsh4myx?svg=true
   :target: https://ci.appveyor.com/project/pygame/pygame

.. |PyPiVersion| image:: https://img.shields.io/pypi/v/pygame.svg?v=1
   :target: https://pypi.python.org/pypi/pygame

.. |PyPiLicense| image:: https://img.shields.io/pypi/l/pygame.svg?v=1
   :target: https://pypi.python.org/pypi/pygame

.. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1

.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame/pygame/2.1.2.svg
   :target: https://github.com/pygame/pygame/compare/2.1.2...main

.. |BlackFormatBadge| image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black

.. _pygame: https://www.pygame.org
.. _Simple DirectMedia Layer library: https://www.libsdl.org
.. _We need your help: https://www.pygame.org/contribute.html
.. _Compilation wiki page: https://www.pygame.org/wiki/Compilation
.. _docs page: https://www.pygame.org/docs/
.. _GNU LGPL version 2.1: https://www.gnu.org/copyleft/lesser.html

Owner

  • Name: pygame
  • Login: pygame
  • Kind: organization
  • Location: Internet

Pygame is a library for digital arts, games, music, making, and a community around such things.

GitHub Events

Total
  • Issues event: 147
  • Watch event: 840
  • Delete event: 2
  • Issue comment event: 230
  • Pull request review comment event: 4
  • Pull request review event: 6
  • Pull request event: 51
  • Fork event: 489
  • Create event: 5
Last Year
  • Issues event: 147
  • Watch event: 840
  • Delete event: 2
  • Issue comment event: 230
  • Pull request review comment event: 4
  • Pull request review event: 6
  • Pull request event: 51
  • Fork event: 489
  • Create event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 7,295
  • Total Committers: 335
  • Avg Commits per committer: 21.776
  • Development Distribution Score (DDS): 0.759
Past Year
  • Commits: 29
  • Committers: 7
  • Avg Commits per committer: 4.143
  • Development Distribution Score (DDS): 0.31
Top Committers
Name Email Commits
René Dudfield r****d@g****m 1,760
Lenard Lindstrom l****l@t****t 867
Peter Shinners P****s 555
David Lönnhager d****d@g****m 346
MyreMylar d****n@m****m 298
charles 4****j 294
Ankith 4****6 270
Starbuck5 4****5 251
akalias s****r 171
e1000 e****a@t****m 137
Thomas Kluyver t****s@k****k 134
Robert Pfeiffer b****b@b****e 121
Marcus von Appen m****a 118
MightyJosip j****c@f****r 111
dr0id d****d@b****h 95
pmp-p m****y@f****r 69
Niels Thykier n****s@t****t 50
Andrew Hong 3****e 43
bydariogamer b****r@i****g 42
Grimmys f****y@g****m 42
zoldalma s****0@g****m 40
Bob Ippolito b****b@r****m 40
Sigurdur Sveinn Halldorsson s****v@g****m 38
Robert O'Shea r****1@g****m 36
Nirav Patel n****p@e****c 32
jmm0 j****0 31
Christian Clauss c****s@m****m 31
James Czekaj b****7@g****m 31
MarcellPerger1 1****1 30
brian b****n@l****t 29
and 305 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 421
  • Total pull requests: 441
  • Average time to close issues: 3 months
  • Average time to close pull requests: 27 days
  • Total issue authors: 370
  • Total pull request authors: 148
  • Average comments per issue: 2.6
  • Average comments per pull request: 0.49
  • Merged pull requests: 233
  • Bot issues: 0
  • Bot pull requests: 35
Past Year
  • Issues: 140
  • Pull requests: 97
  • Average time to close issues: 15 days
  • Average time to close pull requests: 19 days
  • Issue authors: 129
  • Pull request authors: 37
  • Average comments per issue: 0.43
  • Average comments per pull request: 0.19
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 14
Top Authors
Issue Authors
  • illume (12)
  • project-owner (4)
  • Adishko (3)
  • fladd (3)
  • neuron-whisperer (3)
  • IanMorav (3)
  • mgorny (3)
  • Fantastair (3)
  • masahito4621 (2)
  • Duong3400 (2)
  • kunaljhatta (2)
  • t-t-t-t-t160 (2)
  • kenzieryann7 (2)
  • theRealProHacker (2)
  • kmpape (2)
Pull Request Authors
  • illume (131)
  • dependabot[bot] (35)
  • cclauss (11)
  • abdo-909 (10)
  • stefpivser (9)
  • chpauline (9)
  • jonotassia (8)
  • blackmambaza (6)
  • henserobbie (6)
  • JovialKnoll (4)
  • romgird2 (4)
  • yanchengbo (4)
  • journpy (4)
  • Basel657 (4)
  • lettuceDestroyer (4)
Top Labels
Issue Labels
bug (140) enhancement (59) docs (7) easy (6) draw (5) good first issue (5) hard (5) display (5) Platform: Windows (4) needs-op-input (4) needs-investigation (3) critical (3) C code (3) mixer (2) Platform: MacOS (2) SDL2 (2) feature request (2) Difficulty: Waiting (2) reproducible (2) Platform: Raspberry Pi (2) image (2) stuntcat (2) moderate (2) major (2) question (2) minor (2) buildconfig (2) font (2) camera (2) key (2)
Pull Request Labels
dependencies (35) draw (2) mixer (1) sysfont (1) enhancement (1) math (1) New API (1) examples (1) key (1) Platform: Android (1) buildconfig (1) camera (1) tests (1) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,093,513 last-month
  • Total docker downloads: 28,408,332
  • Total dependent packages: 758
  • Total dependent repositories: 17,300
  • Total versions: 67
  • Total maintainers: 2
pypi.org: pygame

Python Game Development

  • Versions: 67
  • Dependent Packages: 758
  • Dependent Repositories: 17,300
  • Downloads: 2,093,513 Last month
  • Docker Downloads: 28,408,332
Rankings
Dependent packages count: 0.0%
Dependent repos count: 0.1%
Forks count: 0.2%
Average: 0.3%
Downloads: 0.3%
Stargazers count: 0.4%
Docker downloads count: 0.6%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/build-debian-multiarch.yml actions
  • actions/checkout v3.0.2 composite
  • uraimo/run-on-arch-action v2.3.0 composite
.github/workflows/build-macos.yml actions
  • actions/cache v3.0.2 composite
  • actions/checkout v3.0.2 composite
  • actions/upload-artifact v3 composite
  • pypa/cibuildwheel v2.13.1 composite
.github/workflows/build-manylinux.yml actions
  • actions/checkout v3.0.2 composite
  • actions/upload-artifact v3 composite
  • pypa/cibuildwheel v2.13.1 composite
.github/workflows/build-ubuntu-sdist.yml actions
  • actions/checkout v3.0.2 composite
  • actions/setup-python v3 composite
  • actions/upload-artifact v3 composite
.github/workflows/cppcheck.yml actions
  • actions/checkout v3.0.2 composite
.github/workflows/format-lint.yml actions
  • actions/checkout v3.0.2 composite
setup.py pypi
.github/workflows/build-msys2.yml actions
  • actions/checkout v3.0.2 composite
  • actions/upload-artifact v3 composite
  • msys2/setup-msys2 v2 composite
.github/workflows/stale.yml actions
  • actions/stale v8 composite