our projects - recent releases
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not. Once you finished getting started you could add a new project or collaborate with other people. Or perhaps you're interested in making pygame (the python multimedia library) itself better? First you may need to learn a thing or two about pygame by reading the docs.
Free Python Games 1, by Grant Jenks
Prison Xcape 1.0, by Othman Alikhan
Exiled 1.0, by Othman Alikhan
blank 12*12 2d grid game engine! 1, by dylan
Rogue Colors 0.3, by Joseph
hiding sniper 1.0, by leon
jumpy man 0.1, by can't share this
PYGJS 1.0, by Asher Wolfstein
Ned for Spod 1.1, by Pablo Pizarro
Basic Blind Chess v0.8.3i, by nakayama
notepad-- 1.0.0, by Ian Mallett
Business Real Estate News fff, by Business Real Estate News
Middle East News fff, by Middle East News
Pygame menu 1.5, by Pablo Pizarro
Ken's Bingo 0, by Ken
Text Factory 1.0, by Diliup G
news
pyglet 1.3.0b1 released

pyglet 1.3.0b1 has been released. pyglet is a cross-platform windowing and multimedia library for Python. Links:
February 2017 PyWeek challenge
- Invites entrants to write a game in one 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 game tools, code and expertise,
- Will let a lot of people actually finish a game, and
- May inspire new projects (with ready-made teams!)
| Timetable | |
|---|---|
| Friday, 20 January 2017 | Pre-registration open |
| Sunday, 12 February 2017 | Theme voting commences |
| Sunday, 19 February 2017 at 00:00 UTC | Challenge start |
| Sunday, 26 February 2017 at 00:00 UTC | Challenge end, judging begins |
| Sunday, 12 March 2017 | Judging closes, winners announced |
More info: Rules | Resources | Help
pygame 1.9.2 released
PySDL2 0.9.5 released
PySDL2 is a slim wrapper around the SDL2 libraries and can be used without further ado using Python and a binary distribution of the SDL2 libraries.
Version 0.9.5 is a minor feature release, bringing PySDL2 on par with the 2.0.5 release of the SDL2 libraries. On top, it comes with the following noteworthy changes:
- Fixed issue #94: added support for TrueType font collection (TTC) files
- Fixed issue #80: added flip and rotation support for TextureSprite objects
You can download it from http://bitbucket.org/marcusva/py-sdl2/downloads/ or http://pypi.python.org. The documentation, listing all of its features, can be browsed online at http://pysdl2.readthedocs.org.
cocos2d 0.6.4 released

The cocos2d Team has released cocos2d 0.6.4, a 2D framework for games and multimedia that uses Python, pyglet and six.
http://python.cocos2d.org/
pyglet 1.2.4 released

pyglet 1.2.4 has been released. pyglet is a cross-platform windowing and multimedia library for Python. Links:
pygame sprint at EuroPython
February 2016 PyWeek challenge
- Invites entrants to write a game in one 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 game tools, code and expertise,
- Will let a lot of people actually finish a game, and
- May inspire new projects (with ready made teams!)
The dates of this challenge are are 00:00 UTC Feb. 28, 2016 to 00:00 UTC March 6, 2016.
More info: http://www.pyweek.org/
New pygame website now the default front page
tweets
videos
About
Hello internet traveller,
welcome to our humble (and slightly strange) little part of the World Wide Web. Let me give you a quick introduction about what you've stumbled upon here.
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. Like SDL, pygame is highly portable and runs on nearly every platform and operating system. Millions of people have downloaded pygame itself, which is a whole lot of bits flying across the interwebs.
pygame.org (the website) welcomes all Python game, art, music, sound, video and multimedia projects. Once you have finished getting started you could add a new project or learn about pygame by reading the docs. For more information on what is happening in the pygame world see the community dashboard, which lists many things like our projects we are working on, news (our blog with rss), twitter, reddit (forum), stackoverflow (Q&A), Bitbucket (development), irc (chat), mailinglist (we love writing electronic mail to each other) and other various bits and pieces about pygame from around the internets.
pygame (the community) is a small volunteer group of creative humans who ♥ making things (there may also be a few cats, several koalas, dozens of doggos, 3.14 gnomes, and 42 robots who also tinker amongst us). We respect each other, and follow the Python community code of conduct, whilst we help each other make interesting things.
Enjoy yourself whilst looking around. We look forward to your creations.
Best humanly possible wishes and extra toasty warm regards,
pygame
ps. We spell colour without the u (sorry), and we always spell pygame with lower case letters. Also, please do excuse the mess - we're doing some renovations around here you see.
More silly nonsense about Pygame
- Silliness built in. Pygame is meant to make software things fun. New silliness is added every 3.1415 seconds.
- Does not require OpenGL. With many people having broken OpenGL setups, requiring OpenGL exclusively will cut into your user base significantly. Pygame uses either opengl, directx, windib, X11, linux frame 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 systems package manager. Comes with binary installers (and uninstallers) for Windows or MacOS X.
- Truly portable. Supports Linux (pygame comes with most mainstream linux distributions), Windows (95,98,me,2000,XP,vista, 64bit 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 from nokia, game consoles like gp2x, the One Laptop Per Child (OLPC), and the Orange Pi.
- It's Simple and easy to use. Kids and adults make games with pygame. Before the Raspberry Pi, the microbit, or the OLPC, Pygame has been taught in courses to young kids, and college students. It's also used by people who first programmed in z80 assembler, or c64 basic, and for Indie game productions.
- Does not require a GUI to use all functions. You can use pygame without a monitor - like if you want to use it just to process images, get joystick input, or play sounds.
- 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.
- It's not the best game library. It's not even the second best. But we think it's sort of ok.
tutorials
The PYGAME Documentation page has a number of tutorials. A Newbie Guide to pygame is very good.
These are some recent tutorials on various pygame topics:
On-line books using Python and Pygame
- Program Arcade Games by Paul V Craven. Introduction to programming using Python and Pygame. The book also contains quite a bit of example code for learning to program with Pygame and Python. Site includes animated code examples, video, and interactive quizzes.
- Making Games with Python & Pygame - A free Pygame book that includes several example games and explains how each one works. Assumes some knowledge of Python.
General Tutorials
- Rapid Game Development with Python - by Richard Jones. The basics of pygame are introduced with the example of a simple racing game. Then the program is improved by introducing classes.
- sjbrown's Guide to Writing Games Advanced tutorial for object oriented and design pattern based programming. Shows how to design your game in a way that network playing can be added later on.
- Tutorials by DR0ID
- PyGame object oriented tutorials by przemo_li
- "Intro to PyGame" CourseHero course by maaack
- Thepythongamebook tutorial about Pygame
Pygame Tutorials on Specific Topics
- piman's sprite tutorial
- Screencasts and tutorials at Scriptedfun, making an arkanoid type game
- A tutorial for sound in Pygame
- A tutorial on making a top-down tile-based game
- PyGame Physics Youtube Tutorials by maaack
- Creating a 2D Minecraft style game
- YouTube series creating a top down racing game with Python 3
learningpython.com
- Creating a Game in Python using PyGame
- TextWidget - A simple text class for PyGame - A tutorial about working with text in PyGame!
Non-English Resources
Spanish
Brazilian Portuguese
- Introdução a Programação de Jogos usando PyGame (Introduction to Game Development using PyGame). This covers the basics and the final target is a good side-scrolling game.
Italian
- All Pygame tutorials Questa � una traduzione non ufficiale del tutorial su pygame di Pete Shinners, curata dagli utenti di python-it.
Français (french)
- Sur Wikibooks, Traduction compl�te des tutoriels officiels de Pete Shinners.
Greek
- Python Game Programming (Greek) - A free Pygame book for Greek audiences. Introduces programming in a fun way. No previous experience required.
Polish
- Isometric Game Part 1 - Introduction to pygame
- Isometric game part 2 - Sprites
- Isometric game part 3 - Collisions
- Isometric game part 4 - Pygame, OpenGL and fairies
- Isometric game part 5 - to draw a 2D map
- Isometric game Part 6 - to draw a map of an isometric
- Cz.7 isometric game - mouse in the world of isometries
CookBook
def show_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:
- Please start a new page for each recipe.
- Use the <pre><code>YOUR CODE</code></pre> tags to put in code.(View source of some other pages to see how it is done.)
- Except where otherwise noted, recipes posted in the pygame cookbook are in public domain.
- Tabs are lost when posting, so convert tabs to spaces first if you use them.
Generic recipes
ProfilingRunningInCorrectDirectory
LinearInterpolator
SmoothInterpolator
BoundingBox
2DVectorClass
3DVectorClass
CommandDispatch (A pattern for building GUIs)
2DGeometryEngine
QuadTree
MemoizingDecorator (Another lazy resource loader)
SignalSlot (A signal/slot implementation)
Interpolator (An improved interpolator)
BezierCurve
RGBColorConversion
CalculateDist
SpatialHashMap
ConstantGameSpeed
PyGame recipes
LazyImageLoadingSimpleFontManager
TTFToBitmapConverter
toggle_fullscreen
Joystick_analyzer
ImagePacker
SmallerRectForSpriteCollision
GradientCode
ConchMusicSoundToolkit
FastPixelPerfect
SettingWindowPosition
DummyVideoDriver
WindowResizing
TextWrapping
CairoPygame
Load_32-bit_BMP_with_Alpha
HeadlessNoWindowsNeeded (Use pygame without using creating a window)
SubtractRects
ShadowEffects (Using arrays)
MatplotlibPygame
IntersectingLineDetection
MmapSurfaces
WxPython
Pygame2exe
InputWrapper
RotateCenter
MidiScheduler
SpatialHash_for_Pygame
Spritesheet
PyOpenGL recipes
SimpleOpenGL2dClassesOBJFileLoader
GLLight
GLSLExample
GLSL_ARB_Example
TextureCoordinateArithmetic
MakeOpenglDrawIn2D
CrossPlatformTextOpengl
Resources
Cookbook Code
3D Models
- STLFinder - the free 3d models search engine
- Yobi3D - free 3D models search engine
- Digital Furniture 3D models
- Turbosquid 3D models
- 3D Vi
- CGTrader 3D models marketplace
- the3modelstore.com
Tutorials
- Making Games with Python & Pygame - A free Pygame book.
- ProgramArcadeGames.com
- spriteart.com Pixel art tutorials.
- Color Rules of thumb.
- So You Want To Be A Pixel Artist?
- "Intro to PyGame" CourseHero course
Textures
- http://www.mayang.com/textures/
- http://www.imageafter.com/
- http://www.3dlinks.com/textures_free.cfm
- http://www.vb3d.com/Textures.html
- http://www.spiralgraphics.biz/packs/index.htm
- Blender Texture Disk
Music
- Free Music Archive: Creative Commons Licensed Music
- http://www.soundtaxi.net - Royalty Free Music / Production Music
- Jewelbeat.com Royalty Free Music
- free music loops
- http://creativecommons.org/audio/
- http://www.piano-midi.de/
- Gemafreie Musik
- Gemafreie Musik / Lizenzfreie Musik
- http://www.freesolopiano.com/
- http://www.modarchive.org/
- TAM Music Factory
- FL Studio Sound Packs
Royalty Free Music
Sound Effects
- The Freesound Project
- SoundSnap.com
- Free Sound Clips
- Music Mp3
- PDSounds.org
- Free-Loops.com
- The Matchmakers
- Pocket Sound
Royalty-Free Sound Effects
- Hollywood Production Music - Low Price Royalty Free Sound Effects
- http://www.partnersinrhyme.com/
- A repository of high-quality musical instruments samples
- http://www.stonewashed.net/sfx.html
- http://www.findsounds.com/
- http://freesoundfiles.tintagel.net/Audio/
- http://www.grsites.com/sounds/
- http://www.sounddogs.com/start.asp
- sfxr - 8-bit sound effect generator
Fonts
- Cool Free Fonts
- http://www.goodfonts.org/
- http://www.grsites.com/fonts/
- http://www.aenigmafonts.com/
- http://www.algonet.se/~guld1/freefont.htm
- http://www.clavis.ne.jp/~sonic/segasonic/act5/font.htm
- http://www.1001freefonts.com/
- http://www.graffitifonts.com/fonts.shtml
- Celtic fonts
- http://www.dafont.com
- Font Squirrel
- Ten by Twenty
Stock Photos
Clip Art
Free Game Engines
Pixel Art
- phanxgames.com
- http://www.charas-project.net/resources.php?lang=en
- http://www.reinerstileset.4players.de:1059/englisch.htm
- Heroic- mito fantasy tilesets (2D and isometric)
- textures
- space graphics
- RTS graphics
- Volumetric Sprites
- http://rivendell.fortunecity.com/goddess/268/tilesets.html
- Sithjester's RMXP Resources - free RPG sprites
- Liberated Pixel Cup
- First Seed Material (Japanese)
- First Seed Material (Google-translated into English)
- ESPRI-Q (Japanese)
- ESPRI-Q (Google-translated into English)
- Pokefans tilesets (German)
- http://stackoverflow.com/questions/143050/where-to-get-sprites-tilesets-for-2d-games
- ArtSader
- Last Guardian sprites
Other Resource lists
Help (irc, lists)
If you need any sort of help,or just want to shoot the breeze, you can most anytime find people in the pygame IRC channel. irc.freenode.net 6667 #pygame
Mailing List
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 list by sending a plain-text e-mail to majordomo@seul.org. Leave the subject field blank and in the body put only "subscribe pygame-users" (without the quotes).
You will receive an authentication response. Follow the directions in that e-mail to complete the subscription process.
Forums and Newsgroups
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 use Nabble which started mirroring on 2012/05/21.
questions and answers
Hacking
Notes for hacking, developing, and modifying pygame.
Building pygame
See the wiki page: Compilation to figure out how to compile pygame on different platforms.
Keeping up with developments.
Try and discuss changes on the mailing list. Especially if you plan to do a big change, it might be a good idea to coordinate with people. See info, for details on joining the mailing list.
Most developers are not on irc all of the time - and some never. So if you need a more realtime chat try and organise a time on the mailing list. Email lets people communicate in their own time zones.
Commit logs are important to keep them short, and also to summarize the changes you have made.
Buildbots, pygame compiled on every change
There is a pygame github page. Development now happens on github.
The set up more buildbots issue tracked developments in the buildbots.
Links to individual buildbot pages
Linux manylinux builds
Manylinux builds are binary files for pip which should work on many versions of linux. See in the pygame repo manylinux-build/README.rstGenerating docs
python makeref.py
The makeref.py program runs Sphinx to generate HTML docs and src/docs/{module}_doc.h C headers from reStructuredText source.
The reStructuredText .rst files are stored in the reST/source and reST/source/ref directories.
An online reStructuredText primer can be found at the Python site.
Sphinx specific markup is described in theSphinx Documentation.
The Python Sphinx package itself depends on Docutils, Jinja2, and Pygments.
For Python 2.x, installing Sphinx will also grab and install its dependencies.
Sphinx can be downloaded from PyPi or using easy-install.
For Python 3.x only the latest repository versions work.
Be sure to install Sphinx last so it does not grab the wrong dependency versions:
pip install sphinx
Running tests
To run the tests from the test sub-directory in the pygame distribution:
python run_tests.py
To run the tests from the pygame.tests module:
python -m pygame.tests
In either case the --help command line option will give usage instructions.
Code style
Try and follow the code style of the particular file you are editing.
Use 4 spaces instead of tabs, and Pep-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.
Writing tests.
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
Submitting changes to github
See http://www.contribution-guide.org/. If you are a member of the pygame repo on github you can start a new branch like this:git clone git@github.com:pygame/pygame.git
cd pygame
git checkout -b my-fixes-branch
# Edit your changes here.
git commit .
git push --set-upstream origin my-fixes-branch
A heading
project comments
meetups
awesome sauce
spotlighted projects
glLib Reloaded 0.5.9, by Ian Mallett
Program Arcade Games With Python and Pygame 1, by Paul Vincent Craven
Mastermind Networking Lib 4.1.3, by Ian Mallett
QANAT 0.7, by Paul Paterson
SGC 0.2.1, by Sam Bull
SubTerrex 0.3.1, by Paul Paterson
Making Games with Python & Pygame 1, by Al Sweigart
Life as a Bit DLX-v1.01, by Sean J McKiernan
Toonloop 1.1.3, by Alexandre Quessy
Arcade Tonk Tanks 0.0.6, by Koen Lefever
Foodforce2 1.0, by Deepank Gupta
PaintBrush 1.1, by John Eriksson
Ardentryst 1.71-testing, by Jordan Trudgett
Plague 3.38, by benedict carter
555-BOOM! 0.6.1, by Gregory Ewing
Woody Tigerbaum's Interplanetary Package Delivery 0.92, by Dave LeCompte
Trip on the Funny Boat 1.5, by Pekka Kujansuu
Barbie Seahorse Adventures 1.0, by Phil Hassey
Bouncy the Hungry Rabbit post-r4, by Richard Jones
Colonel Wiljafjord and the Tarbukas Tyranny contest, by Phil Hassey
Nelly's Rooftop Garden 1.0, by Alex Holkner
20,000 Light Years Into Space 1.2, by Jack Whitham
GalaxyMage 0.3.0, by Colin McMillen
Angry, Drunken Dwarves 1.0.1, by Joe Wreschnig
The Witch's Yarn 1.3, by Keith Nemitz
Dynamite 1.1, by Phil Hassey
Quido: Failed Experiment 1.1, by Simon Wittber




