pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not. Once you finishedgetting started you couldadd a new project orcollaborate with other people. Or perhaps you're interested inmaking pygame (the python multimedia library) itself better? First you may need tolearn a thing or twoabout pygame by reading thedocs.

















python -m pip install -U pygame==2.5.2 --userRead therelease notes to find out what changed.
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
python -m pip install -U pygame==2.5.1 --userRead therelease notes to find out what changed.
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
python -m pip install -U pygame==2.5.0 --userRead therelease notes to find out what changed.
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
python -m pip install -U pygame==2.4.0 --userrelease notes
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
Over the next weeks we have plenty of game jams that people from the pygame communities take part in.
Thepygames hackathon runs fromMarch 20th, 2023 to April 17th 2023, and is open to people in USA and Canada. For this one there's $12,700 in prizes. "If you love programming and gaming, this is the perfect opportunity to showcase your skills and have some fun!"
Then the must-use-pythonPyWeek challenge "Invites entrants to write a game inone week from scratch either as an individual or in a team. Is intended to be challenging and fun. Will hopefully increase the public body of python game tools, code and expertise. Will let a lot of people actually finish a game, and may inspire new projects (with ready made teams!)." PyWeek runs fromMarch 26nd, 2023 to April 2nd 2023, and theme voting is already on.
Finally,Ludum Dare is an event where you create a gamefrom scratch in a weekend based on a theme.April 28th, 2023. Starts at 3:00 AM CEST *. Ludumdare is the oldest online game jam, and has the largest number of participants. There is a Jam (72h, less restrictive rules), and a compo (48hmore rules). The Jam now lets people submit paper board games, and even things like crafts that aren't games at all!
python -m pip install -U pygame==2.3.0 --userrelease notes
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
python -m pip install -U pygame==2.2.0 --userrelease notes
Please file an issue if you notice a problem:
https://github.com/pygame/pygame/issues
python -m pip install -U pygame==2.1.3 --userrelease notes
Pygame is a set ofPython modules designed for writing video games. Pygame adds functionality on top of the excellentSDL library. This allows you to create fully featured games and multimedia programs in the python language.
Pygame is highly portable and runs on nearly every platform and operating system.
Pygame itself has been downloaded millions of times.
Pygame is free. Released under the LGPL licence, you can create open source, freeware, shareware, and commercial games with it. See the licence for full details.
For a nice introduction to pygame, examine theline-by-line chimp tutorial, and theintroduction for python programmers. buffer, and many other different backends... including an ASCII art backend! OpenGL is often broken on linux systems, and also on windows systems - which is why professional games use multiple backends.
Multi core CPUs can be used easily. With dual core CPUs common, and 8 core CPUs cheaply available on desktop systems, making use of multi core CPUs allows you to do more in your game. Selected pygame functions release the dreaded python GIL, which is something you can do from C code.
Uses optimized C and Assembly code for core functions. C code is often 10-20 times faster than python code, and assembly code can easily be 100x or more times faster than python code.
Comes with many operating systems. Just an apt-get, emerge, pkg_add, or yast install away. No need to mess with installing it outside of your operating system's package manager. Comes with binary pos system installers (and uninstallers) for Windows or MacOSX. Pygame does not require setup tools with even ctypes to install.
Truly portable. Supports Linux (pygame comes with most main stream linux distributions), Windows (95, 98, ME, 2000, XP, Vista, 64-bit Windows, etc), Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS and OS/2, but these are not officially supported. You can use it on hand held devices, game consoles and the One Laptop Per Child (OLPC) computer.
It's Simple and easy to use. Kids and adults make shooter games with pygame. Pygame is used in the OLPC project and has been taught in essay courses to young kids and college students. It's also used by people who first programmed in z80 assembler or c64 basic.
Many games have been published. Including Indie Game Festival finalists, Australian Game festival finalists, popular shareware, multimedia projects and open source games. Over 660 projects have been published on the pygame websites such as: list needed. Many more games have been released with SDL (which pygame is based on), so you can be sure much of it has been tested well by millions of users.
You control your main loop. You call pygame functions, they don't call your functions. This gives you greater control when using other libraries, and for different types of programs.
Does not require a GUI to use all functions. You can use pygame from a command line if you want to use it just to process images, get joystick input, or play sounds.
Fast response to reported bugs. Some bugs are patched within an hour of being reported. Do a search on our mailing list for BUG... you'll see for yourself. Sometimes we suck at bug fixes, but mostly we're pretty good bug fixers. Bug reports are quite rare these days, since a lot of them have been fixed already.
Small amount of code. It does not have hundreds of thousands of lines of code for things you won't use anyway. The core is kept simple, and extra things like GUI libraries, and effects are developed separately outside of pygame.
Modular. You can use pieces of pygame separately. Want to use a different sound library? That's fine. Many of the core modules can be initialized and used separately.
The pygame Documentation page has a number of tutorials.A Newbie Guide to pygame is very good.
There are lots of examples that come with pygame. Seehttps://github.com/pygame/pygame/tree/master/examples. They should be installed, and are runnable like:
python -m pygame.examples.aliens
Below are unofficial tutorials and guides. Anything with wrong install instructions is not allowed.
defshow_cook_book_love(screen): txt="I love the CookBook!" f= SysFont("Arial",12) s= f.render(txt,1, (0,0,0)) screen.blit(s, (0,0))
Posting A Recipe:
Pygame maintains an active mailing list. You can email the list at pygame-users@seul.org
If you do not have a mail client configured on your computer you can subscribe to the mailing listby sending a plain-text e-mail to majordomo@seul.org. Leave the subject field blank and in the body putonly "subscribe pygame-users" (without the quotes).
You will receive an authentication response. Follow the directions in that e-mail to complete thesubscription process.
GMane, and google groups offer web based, and newsgroup access to the pygame mailing list. So you can talk with a forum-like interface to the pygame mailing list.
If you prefer newsgroups, GMane is running a newsgroup gateway at gmane.comp.python.pygame.
If you have a google account, and like google groups, there is a mailing list mirror at google groups mirror. To post, you must subscribe to the real mailing list first. It started mirroring the mailing list in 2008/04/28.
For a forum-like interface, you can useNabble which started mirroring on 2012/05/21.
Mailing list archives are hosted by Gmane and Seul.org.
pygame IRC channel. irc.freenode.net 6667 #pygame
Notes for hacking, developing, and modifying pygame.
See the wiki page:Compilation to figure out how to compile pygame on different platforms.
How to do debug builds?python setup.py build --debug installHow to speed up compilation? The build only compiles things that have changed by default.Parallel builds can be done with python 3.5+, where you can set the -j option with the number of workers you want to use. Probably setting it to the same as your number of CPU cores is a good idea.
python setup.py build -j4 install
There is apygame github page. Development now happens on github.
Right now, pygame usesGithub Actions andAppVeyor (windows) for CI. These are useful to make sure that changes proposed by contributors do not break pygame in any way, pygame must still build and work fine across different platforms and python versions.python setup.py docsThis runs buildconfig/makeref.py which runsSphinx to generate HTML docs and src_c/docs/{module}_doc.h C headers from reStructuredText source.
The reStructuredText .rst files are stored in thepygame/docs/reST/ref/ (reference manual) anddocs/reST/tut/(tutorials) directories.
An onlinereStructuredText primer can be found on the Python website site.
Sphinx specific markup is described in theSphinx Documentation.
Parameters for functions should be documented withparam info field lists.
ThePython Sphinx package itself depends onDocutils,Jinja2, andPygments.
To run the tests from the test sub-directory in the pygame distribution:
python test/__main__.py-v
To run the tests from the installed pygame.tests module:
python-m pygame.tests-v
In either case the--help command line option will give usage instructions.
An important option is -v. This lets you see more details of the tests as they run.
Try and follow the code style of the particular file you are editing.
Use 4 spaces instead of tabs, andPep-8 generally. Make sure your editor doesn't insert tabs.
Try to keep things under 80 characters wide.
Try not to mix in white space commits with other code commits. This makes reading diffs easier if you separate the whitespace updates from the actual changes.
For C code, we useclang-format. There is a config in src_c/.clang-format which tries to use a pep-7 style.
Tests are in the test/ directory.
Please see test/README.txt (in the pygame repo) for more of a description on the tests, and the testing framework.
A naming convention is used for all tests. So from the name of a module, class, method, or function, you can find the tests for it.
Each module has a test file. eg. for pygame.surface there is test/surface_test.py
In that file there are methods for each of the classes, functions and methods. So Surface.blit has a 'test_blit' method. There can be multiple test methods for each method. eg. 'test_blit_keyword_args' in surface_test.py one of a few tests Surface.blit. Add extra words at the end of the method name to make multiple tests for the same method.
Methods named with todo at the front "todo_blit" are methods that need to be written. Or finished. By default all of the todo tests are skipped by the test runner. You can however, make the todo_ tests fail - to see how many more tests need to be finished.
Tests can use tags in order to organise them. There are optionally [modulename]_tags.py files for each module. A test/surface_tags.py file is used to specify tags for the pygame.surface module. You can use tags to skip tests on different platforms, or to choose different tests to exclude or run.
There are some test related tools + code in test/util/ .
To see if anything in a module is not documented... you can use: python compare_docs.py pygame.sprite sprite.doc
To generate some test stubs for your unittests from an existing file... you can do: python gen_stubs.py midi
git clone git@github.com:pygame/pygame.gitcd pygamegit checkout-b my-fixes-branch# Edit your changes here.git commit.git push--set-upstream origin my-fixes-branch
There's a lot of issues, and people often only care about the issue for a short time. It can be helpful to categorize issues to save time for other developers, and to try and move an issue along.
Here are some general guidelines:
So, you've come up with some excellent bug fixes, tests or improvements to pygame and you are wondering how to go from there to getting your code merged into the pygame mainline. Here are some top tips:


























