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.

Have Fun With Daily Casino Trips x3, by alianaalisa

With you not doing the driving, you can spare a lot of cash in gas and mileage on your vehicle with every day club trips. This will permit you to have more cash in your pocket for spending at the gambling club - which is significant. Regardless of whether it's a couple of dollars of reserve funds, it's a couple of additional dollars that may create the fortunate turn for you at the gambling machine.
August 10, 2020

"Programming Game AI by Example" python code examples 1.0, by DR0ID

This repository contains code examples of the book "Programming Game AI by Example" written in python.
August 09, 2020

game.py 8.8.8, by ahmed

availibe on PC
August 09, 2020

Why Office Space is beneficial for business? https://www.officeriders.com/, by Officeriders

It is safe to say that you are beginning a business and assessing your choices about renting an office? You are not the only one! Bunches of new companies are conflicted between maintaining their business for all intents and purposes and a physical area.
August 09, 2020

snake game! ?, by Nathan

snake chases apple
August 09, 2020

ArkaPygame: breakout clone 2.0, by Giovanni Gatto

A pseudo clone of breakout or arkaonoid
August 08, 2020

Minesweeper 1, by Andreas Isnes Nilsen

Minesweeper is a single-player puzzle computer game. The objective of the game is to clear a rectangular board containing hidden "mines" or bombs without detonating any of them, with help from clues about the number of neighboring mines in each field. The game originates from the 1960s, and has been written for many computing platforms in use today. It has many variations and offshoots.
August 08, 2020

TETRIS 1.0, by Siegmund

try to get the highest score by completing the lines.
August 07, 2020

Trial 1 1, by Shuprotim

Hi
August 07, 2020

Python DOOM v.1.0.3, by DLC

Raycasting game using DOOM sprites
August 07, 2020

Expendable 054 1.0, by Super Nunb

Run, shoot, grapple, parachute, and ride the elevator past Dr. Lobo's evil cyborgs, then take the fight to the dastardly doctor himself!
August 06, 2020

Assingment Help https://www.totalassignmenthelp.com/study-help, by Honey

Being an academic writer from the past 5 years providing Business assignment help writing services to college and university students also associated with the Totalassignmenthelp.com platform. I am dedicated to providing the best online academic writing services to college students at affordable rates.
August 06, 2020

Advantages Of Outsourcing Embroidery Digitizing Services x3, by alianaalisa

A digitising embroidery professional is a person who is well versed in the operation of the software and can reproduce exact embroidered replicas of the physical art onto fabric. This is the best person to guide you regarding the most suitable embroidery method if you are in possession of a logo and theme. The logo sewing can be carried out on different fabrics with the aid of an efficient digitizer. You can create a sense of belonging among team members by motivating them through embroidered caps and jerseys or preserve fond memories of associations with your friends by embroidery on pillow covers, bed sheets, etc.
August 06, 2020

PySnake 2.0.1, by Giovanni Gatto

The classic snake game. Use the arrow keys to guide the snake to eat his food. Do not go out of the border or onto yourself.
August 06, 2020

leafy420store https://leafy420store.com, by leafy420store

https://leafy420store.com
August 06, 2020

Montreal's Mobile App Developers 1.0.0, by Best App Developers

I've developed an App myself with by doing the manual work of searching for an App Development firm to partner with.
August 06, 2020

re 1.9.2, by ry

test
August 05, 2020

Snake 3.8, by Alexandru David

Snake Game
August 04, 2020

Gun Dash 0.1, by Luke Pyle

Explore handcrafted maps and fight monsters in a 2D bullet hell platformer!
August 04, 2020

First time coding https://www.youtube.com/watch?v=dQw4w9WgXcQ, by Nate

idk im still deciding
August 04, 2020

Python DOOM v.1.0.2, by DLC

Raycasting game using DOOM sprites
August 03, 2020

Aesthetic Collisions 1.0.1, by Jia Ming

Simulating perfectly elastic collisions while drawing lines between them to show the beauty of chaos.
August 03, 2020

ASD ASD, by Mustafa

ASD
August 03, 2020

Yuma the Jungle Girl 1.0, by Per

A trigger-happy hunter has come to Yuma's jungle. It's up to the jungle girl to stop him.
August 03, 2020

Turtle Race 1.0, by Sebastian

A Race that's fun for everyone!!
August 03, 2020

Turtle Race 1.0, by Sebastian

A Race That,s Fun for everyone
August 03, 2020

plataforma medio mierda 1,0, by fred

platafomas mierda
August 03, 2020

Sarana4D | Agen Judi Togel Terpercaya | Situs Judi Togel Online Terpercaya 1.2.0, by Clay Mores

Sarana4d merupakan Agen Togel Online terpercaya di Indonesia yang menyediakan berbagai pasaran togel terbaik seperti Togel HK, Togel Hongkong, Togel Sydney, Magnum4d, Tokushimapools, Sanya4d, Saigon4d dan Shanghaipools. Sarana4d tentu menjadi salah satu pilihan terbaik untuk para penggemar permainan Togel Online. Dimana Sarana4D memberikan pelayanan 24jam nonstop sepanjang hari dengan proses deposit dan withdraw yang sangan cepat.
August 02, 2020

First Project 2.0.0.dev10, by Finley McDonough

Um Hi
August 01, 2020

Flag War 0.0.1, by Oleg

War
July 30, 2020

PySnake 1.8.8, by Giovanni Gatto

The classic snake game. Use the arrow keys to guide the snake to eat his food. Do not go out of the border or onto yourself.
July 30, 2020

Funny Mobile Ringtones Download 1.0, by david stamith

If I have a Sprint or Nextel cell phone, can I download free ringtones? The answer is yes, but Great that dependant on which type you have, things can vary. Apparently, the situation with the Sprint and Nextel ringtones is a little different. So, depending on for which type of contact you want to download free ringtones, there are things to give some thought to.
July 29, 2020

pong 0.1.1, by pong

play some pong
July 28, 2020

RPG Tactical Fantasy: In The Name of The Five Cats v1.0.3, by AA

RPG Tactical Fantasy game, turn-based and in 2D.
July 28, 2020

Yellow Spaceship! 1.0.0, by Paul

Simple 2d space game
July 28, 2020

PySnake 1.8.7, by Giovanni Gatto

The classic snake game. Use the arrow keys to guide the snake to eat his food. Do not go out of the border or onto yourself.
July 28, 2020

news

Ludum Dare 46

Saturday April 18th to Tuesday April 21st, 2020
Starts at 3:00 AM CEST *

Join us for Ludum Dare 46, our first event of 2020!
April 08, 2020

One focus: pygame 2 critical issues. (Feature freeze 2 months)

For the next two months, I'd like to try to focus on pygame 2 critical issues.

Backwards compatibility issues people are reporting with the pygame 2 dev releases.

So there's a feature freeze on anything not related to these issues. One issue at a time until the two months are up or we are done.

 

The first issue is: "SDL 2: Per Pixel Alpha error".

November 17, 2019

Alakajam, PyWeek, and Ludum Dare game jams.

Over the next weeks we have plenty of game jams that people from the pygame communities take part in.

Alakajam is first starting on September 20th. "Alakajam! is a young community gathering game development enthusiasts from all backgrounds. We host a series of informal events, that give you a chance to both make games and get people to play them. Alakajam! competitions, taking place over a week-end, three times a year. Start/end times are suited to European timezones."

Then the must-use-python 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 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 from Sept. 22, 2019 to Sept. 29, 2019, and theme voting is already on.

Finally, Ludum Dare is an event where you create a game from scratch in a weekend based on a theme. Saturday October 5th to Tuesday October 8th, 2019. Starts at 12: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 (48h more rules). The Jam now lets people submit paper board games, and even things like crafts that aren't games at all!

Want to join in as part of a team? The pygame community game (stuntcat) is also taking part, by creating a new mini game for some of these game jams. Drop into the discord chat #communitygame channel and say hi ( https://discord.gg/r8yreB6.

Also, how about inviting women and non-binary people to make the game with you?

September 20, 2019

Learn python by contibuting to pygame (at the europython 'sprint' and online)

pygame europython sprint

If you want to join in online, come into our 'Discord' #contributing channel https://discord.gg/r8yreB6. If you're at EuroPython you can find information about the sprints on their website.

July 12, 2019

pygame 1.9.6 released with a few regression bug fixes

Whilst we focus like a shark-lazer on pygame 2, here is a bonus pygame 1.9.6 with a couple of small regression bug fixes.

- mp3 via smpeg was missing in manylinux builds.
- mixer thread deadlock issue when controlling it from different threads.
- pygame.version.vernum now has major, minor, and patch attributes.
April 25, 2019

pygame 1.9.5 released into the wilds

pygame 1.9.5

TLDR; Some highlights.

Every single source file has been heavily modified and moved in this release. Initial (source code only) support for SDL2 has been merged in. We also support compiling with SDL1 in the same code base, so the migration to pygame 2 is easier. pygame 2 will be released with SDL2 being the default backend when some remaining issues are ironed out. The 1.9.x releases will continue with SDL1 until then. Also, the C API of pygame is undergoing a transformation with lots of cleanups. Then there have been plenty of other cleanups all throughout the python code as well. There's still lots to clean up, but things should be significantly easier for people to contribute (👋 hello and thanks new contributors!). The documentation has been improved with better examples links, search functionality, and improved navigation. Support for older Macs, and newer Macs has been improved. The mask, midi, draw, and math modules have gotten lots of polish with rough edges removed.

Thanks

A very special thanks to the people who have volunteered commits to pygame since the last release. In alphabetical order...

(@alphaCTzo7G) | Amos Bastian (@amosbastian) | Andrey Lopukhov (@andreyx86) | Augusto Noronha (@augusto2112) | Bernardo Sulzbach (@bernardosulzbach) | (@Bottersnike) | Cai Q.T. (@CAIQT) | (@Cerealdragon) | Charles (@charlesej) | (@ChrisWeissNike) | (@cmtrapp02) | Daniel Molina (@daniel-molina) | David Caughell (@DavidCaughell) | David Lönnhager (@dlon) | (@dr0id) | burmer (@dtschirmer) | (@e1000) | xFly_Dragon (@husano896) | (@IchMageBaume) | René Dudfield (@illume) | (@LambdaGoblin) | Lenard Lindstrom (@llindstrom) | François Magimel (@Linkid) | (@LiquidFenrir) | Mark Hurley (@markph0204) | Marius Gedminas (@mgedmin) | (@metulburr) | Michael Farrell (@micolous) | Dominik George (@Natureshadow) | Nik (@nikolas) | Nunu-Willump (@Nunu-Willump) | (@pleboulanger) | Rebecca Chen (@rchen152) | (@robertpfeiffer) | Sett (@sw00) |

Quite a few new people have helped out with this release 🤗

An equally special thanks to everyone else who has contributed in other ways. Thanks to claudeb, imallet, and deshipu for moderating the discord chat to keep it friendly. Thanks to the twitter folk, and the stackoverflow Q&A people. Thanks to everyone who puts their game up on the pygame website for others to look at. Thanks to people making tutorials and sharing articles & books they've written. Thanks to the r/pygame mods and community. Thanks to pyladies groups for running fun sessions, and for making things better. Thanks to the teachers providing feedback, and for doing something fun with their students. Thanks to Debian, Raspberrypi, Arch, Fedora, and all the other community groups. 🖤

More details.

#945 Vector: Explain slices and swizzling
#944 Update surface documentation
#937 Make mask offset boundary checking consistent
#936 Update midi documentation
#931 Fix drawing 1 pixel wide off-surface ellipses
#929 Use SDL_RWops instead of pg_FopenUTF8.
#928 Fix LayeredDirty's inconsistent use of its source rect
#927 Workaround for locale errors with PyPy
#926 Update dependencies for manylinux builds.
#924 Upload .whl binaries to a github draft release when creating tag.
#923 Update scrap documentation
#922 #881 #879 Fix zero-sized mask segfaults
#920 Fix the SystemError when no type specific clipboard content exists.
#917 Update scrap tests
#914 Update freetype tests
#911 #893 #889 #876 #874 #844 #840 #831 #819 Improved mask tests
#900 Add sprite tests
#899 bugfix for dirty sprite when using a source rect
#891 Add missing Vector2.magnitude()
#873 Fix mask index out of bounds segmentation fault
#806 Mask constructor 'fill' argument
#807 Use version directives consistently in documentation and update style
#805 Event functions: pump parameter and keyword arguments
#803 Add customized repr()/str() output for Mask objects
#802 Fix aaline()/aalines() not drawing on a surface's border
#797 Keep surface alpha value for copied surfaces with SRCALPHA flag
#760 #707 Load images on multiple threads properly
#783 Fix overlap_mask() making incorrect mask
#751 #749 #748 #746 #745 Added get_init() to all modules with an init() function
#725 Allow camera module to be used on Windows
#722 API version macros
#698 Use pre styles in docs
#670 Converting between ANSI notes and MIDI notes or frequencies
#663 Compile for PyPy 3 and PyPy fixes
#665 Chimp tutorial: reindent and clean some code
#664 Chimp tutorial: fix reST syntax
#656 #649 Handle Unicode objects and paths properly
#631 Fix failing tests test_aapolygon and test_pie
#630 Fix freetype rotation rendering
#596 aaline cleanup
#582 draw.aaline: blend correctly
#577 #573 Fixed FreeType memory leaks
#571 Fix surface.blits() bugs

#560 Added math.Vector2 subclass test for issue
#558 Raise TypeError on invalid point arguments
#557 Update typecheck to allow subtypes
#545 update system font lists in sysfont.py
#538 Mac fonts support using system_profiler
#559 Allow clean silencing of support prompt
#553 Fix homebrew travis mac builds
#551 Fixed freezing while playing music from file objects
#550 updated for python 3
#546 Improve message on failed imports & cleanup
#544 Spelling fix in examples/glcube.py
#540 DirtySprite subclass allow other _layer values
#536 dependency version into README & Cleanup SDL1.2
#534 More test cleanups.
#535 draw_py for Python algos & aaline testing
#534 More Test cleanup
#518 Organise the docs modules by usage, add search form.
#517 Test cleanup n+1 : yet another test cleanup branch
#516 PY_VERSION_HEX < 0x02070000 : cleanup
#515 Fix draw polygon ; tests & code cleanup
#514 Cleanup Python < 2.7 references
#511 Fix odd-width ellipses not drawing correctly
#510 Update unit tests draw.ellipse, add unit tests draw.(aa)line(s)
#509 Midi tests : add, refactor, cleanup
#508 More test method cleanup
#507 Improve mac compile times on travis.
#505 Remove "if 1:" pattern in tests
#504 Cleanup mixer test
#503 Clang format all the src_c/.c files
#502 Cleanup some test methods & test/sndarray_test.py
#501 Add draw_ellipse unit test
#500 Test for overlap mask
#499 Remove boilerplate imports from top of test files
#498 Adding a test for Thick Line Bug
#493 0 sized masks are now possible
#489 transform.scale does not crash for zero sized surfaces
#488 Added unit test 'test_zero_surface_transform' for issue 411
#486 Moved jquery.plugin.docscomments.js into pygameweb.
#485 Repo cleanup. 8 things in top level. Rest in buildconfig/. Old stuff removed.
#484 Added mac sdl2 support. Changed config.py -sdl2
#483 Support older mac core duo 2 cpus
#482 The giant SDL2_patches merging PR.
#476 Do not try to add portmidi on freebsd. It does not exist.
#475 Resurrect Python 3.4 builds on Appveyor

March 31, 2019

🐱‍🏍 stuntcat early release. What's next?

🐱‍🏍 stuntcat is our open source mini-game we worked on in order to drive pygame 2 development forward. We wanted to make a real mini-game and try to release it for sale on as many platforms as possible. So that other people can look at the source code and distribute their game on more platforms too.

We only had 4 days... but during that time more than 14 people got involved. We learnt a lot during this. The compilation instructions for pygame 2 were improved so that more people could build development versions. We automated the installer generation for Windows, Mac, and pypi on github (so other projects can copy this base-code and do it too). Gif animation saving was started (because when you release your game you want a gif right?). Missing features and areas where documentation could be improved were identified (animated sprites, and scenes anyone?). Fixes to pymunk (a great 2D physics engine) were made so distributing physics games to end users is now easier. There's also an example of using the tile map loader (PyTMX) with the physics engine. More than a month after the game jam finished we are working on issues discovered during the making of 🐱‍🏍 stuntcat.

We want to make distributing pygame apps easier for people. You made your game, now you want to share it with your friends or even sell it right? The first place we made a release was on itch.io, a platform for selling games and apps. There we uploaded the Mac, Windows, and source for people to download with a pay-what-you-feel option.

Next step is to release the game on Steam (another popular games platform). For the next step we need to raise $100 for the Steam App fee. We also have to make the game better! It's already a pretty fun mini game, but requires more mini games and more polish. We also need to make pygame 2 pre-release binaries so that we can actually publish on Steam.

Thanks to the makers of stuntcat: bitcraft, blubberquark, Bottersnake, claudeb, illume, Kuba | ThePolish, TJWhale, hfoxp, xeno, M, CaptHurls, dlon, dirk0, viblo, and kleines filmröllchen.



day 0: $0 of $100 raised for Steam app fee.
day 1: $5 of $100
day 2: $57 of $100
day 3: $100 of $113.20
day 14: $107 of $113.20
day 20: $127 of $113.20
If you ever wanted to support pygame development financially and you can afford it, this is how you can by purchasing stuntcat on itch.io for $2 or what ever you feel. update: we raised enough to make a steam release. Thanks to everyone who chipped in!

January 07, 2019

PyPy low latency improvements for apps like games.

January 04, 2019

🐱‍🏍 — the first pygame 2 community game

To help drive pygame 2 development, we are making a game with pygame 2.

The whole pygame community is invited to take part. In making this one game. In 4 days.

More info here.

github repo: https://github.com/pygame/stuntcat

November 27, 2018

pygame Artist in Residence exhibit - timelapse of development in October

Josh Bartlett has made a video for his pygame Artist in Residence exhibit. It's a timelapse of Trosnoth development in October.

There is also a blog post about it: timelapse trosnoth development video. See the trosnoth tag on his blog to see his earlier blog posts made during October.

ps. if you want to see the text more clearly you'll need to watch it fullscreen in 1080p.

Trosnoth is a networked multi player game originally developed as part of a computing class.

November 26, 2018

tweets

reddit

videos

About

Pygame is a set of Python modules designed for writing video games. Pygame adds functionality on top of the excellent SDL 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 the line-by-line chimp tutorial, and the introduction 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.

tutorials

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. See https://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.

General Tutorials

Pygame Tutorials on Specific Topics

Books with Pygame Tutorials

Non-English Resources

Spanish

Brazilian Portuguese

Français (french)

  • Sur Wikibooks, Traduction compl�te des tutoriels officiels de Pete Shinners.

Greek

Polish

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

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

LazyImageLoading
SimpleFontManager
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
Tint
SoundGeneration
DrawWaveform

PyOpenGL recipes

SimpleOpenGL2dClasses
OBJFileLoader
GLLight
GLSLExample
GLSL_ARB_Example
TextureCoordinateArithmetic
MakeOpenglDrawIn2D
CrossPlatformTextOpengl

Resources

Cookbook Code

3D Models

Tutorials

Textures

Music

Royalty Free Music

Sound Effects

Royalty-Free Sound Effects

Fonts

Stock Photos

Clip Art

Free Game Engines

Pixel Art

Other Resource lists

Help (irc, lists)

Discord chat, pygame server

If you want to discus projects you're working on, there is a new chat server on 'Discord': https://discord.gg/r8yreB6, a chat service very popular in other game dev communities.

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.

Mailing list archives are hosted by Gmane and Seul.org.

irc

pygame IRC channel. irc.freenode.net 6667 #pygame

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.

How to do debug builds?
python setup.py build --debug install
How 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

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.

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

Generating docs

python setup.py docs

This runs buildconfig/makeref.py which runs Sphinx to generate HTML docs and src_c/docs/{module}_doc.h C headers from reStructuredText source.

The reStructuredText .rst files are stored in the pygame/docs/reST/ref/ (reference manual) and docs/reST/tut/(tutorials) directories.

An online reStructuredText primer can be found on the Python website site.

Sphinx specific markup is described in theSphinx Documentation.

Parameters for functions should be documented with param info field lists.

The Python Sphinx package itself depends on Docutils, Jinja2, and Pygments.

You need a recent sphinx to build the pygame docs (1.7 at time of writing).
pip install sphinx --user

Running tests

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.

C API docs

The C API docs can be found at https://www.pygame.org/docs/c_api.html. The source code for these docs in RestructuredText format is in docs/reST/c_api.rst and docs/reST/c_api/.

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.

For C code, we use clang-format. There is a config in src_c/.clang-format which tries to use a pep-7 style.

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
Then go to the web https://github.com/pygame/pygame to create a pull request. Add a couple of reviewers who you think might want to review the code. If you are not part of the github pygame organization, then fork pygame with github, and then when you're ready, send us a pull request.

Issue triage

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:

  • Thank the person for submitting the issue. They didn't have to, and it took them some time.
  • Close if it doesn't happen with SDL2.
  • Ask 1.9.6 issues to test with 2.
  • Tell people we need a test. Tell them in which file.
  • Tell people we don't have time, if we are not likely to fix it soon.
  • Tell people if a PR would be accepted. Tell them which files they may need to edit.
  • Tell people to use stackoverflow/etc for issues with their own code. Then close these issues. Maybe link to some documentation on it if there is some.
  • Labeling the module/OS/version they are on. If it's an issue with image loading label it 'image'. If it's on windows, label it 'windows', if it's an SDL2 issue label it SDL2.
  • Adding tasks to the top of the issue including, 'add a unit test', 'add reproducable code' are helpful to see how far along the issue is to being fixed.

issues

A heading



the content

downloads

download.shtml

developers

A heading



the content

project comments

meetups

awesome sauce

spotlighted projects

Mastermind Networking Lib 4.2.0, by Ian Mallett

A networking lib designed to be simple to use.
October 17, 2018

Albow 2.2, by Gregory Ewing

A Little Bit of Widgetry for PyGame
January 29, 2014

glLib Reloaded 0.5.9, by Ian Mallett

OpenGL Library + Shader OpenGL Library + TONS MORE STUFF!
January 26, 2014

Program Arcade Games With Python and Pygame 1, by Paul Vincent Craven

Learn to program using Python and Pygame!
July 19, 2013

QANAT 0.7, by Paul Paterson

A shoot-em-up inspired by the classic Galaxians game. Repel waves of invaders using your gun turret. Manage the temperature of the turret to avoid overheating.
April 19, 2013

SGC 0.2.1, by Sam Bull

A GUI toolkit for Pygame, to ease game development for Pygame developers. Works with no code change with a normal Pygame display or with an OpenGL display. This is a lightweight toolkit, with focus on the attention to detail. It is also customisable, allowing developers to theme the widgets to match their game.
March 25, 2013

SubTerrex 0.3.1, by Paul Paterson

Explore deep subterranean caves using only your trusty ropes and flares.
September 02, 2012

Making Games with Python & Pygame 1, by Al Sweigart

A free book covering the Pygame library for beginner and intermediate Python programmers. Includes the source for 11 game clones including Tetris, Bejewled, Othello, Connect Four, and others.
July 03, 2012

Life as a Bit DLX-v1.01, by Sean J McKiernan

A full-featured cellular automata simulator. The focus is on "Conway's Game of Life." With the 'Rule Panel' you can also explore other rule combinations.
December 26, 2011

Toonloop 1.1.3, by Alexandre Quessy

Toonloop is a live stop motion animation software.
December 31, 2009

Arcade Tonk Tanks 0.0.6, by Koen Lefever

Just use the cursor keys and the space bar to shoot the other tanks.
December 28, 2009

Foodforce2 1.0, by Deepank Gupta

Food Force 2, based on Food Force, is being developed as free software. It is cross-platform as it is written in the Python programming language, and runs on platforms including the One Laptop Per Child XO and the Sugar desktop environment. Food Force 2 is currently in beta, and available for download on Linux and Windows platforms.
December 06, 2009

PixelPaint F-b, by Pie

A simple paint program.
October 06, 2009

PaintBrush 1.1, by John Eriksson

A public domain class that can be used in drawing applications or games. Two demos included.
September 16, 2009

Ardentryst 1.71-testing, by Jordan Trudgett

Ardentryst is a free, open-source, cross-platform action/RPG sidescrolling game that is fun for all ages. Follow hero Pyralis, a warrior with fire magic, and heroine Nyx, an ice mage, on a quest through a castle, forests and snowy mountains to reclaim peace in the realm of Ardentryst.
August 12, 2009

Plague 3.38, by benedict carter

Plague is a real-time top down â??rogue-likeâ? arena shooter pitting humans against the zombie horde, inspired by the games Syndicate, XCOM and Gauntlet. Currently under development, Plague already features procedural level generation, cellular automata modeling for physical effects, a 2D physics engine, AI and line of sight vision for every â??sentientâ? game entity, multiple weapons and a whole heap more, all running in real-time.
August 12, 2009

555-BOOM! 0.6.1, by Gregory Ewing

Puzzle game and electromechanical sandbox. Based on my PyWeek 5 competition entry.
February 02, 2009

Disk Field 1.01, by Jeremy

Navigate the disk to the end point.
September 25, 2007

Woody Tigerbaum's Interplanetary Package Delivery 0.92, by Dave LeCompte

Deliver packages in space with the power of interplanetary slingshots.
July 10, 2007

Trip on the Funny Boat 1.5, by Pekka Kujansuu

A side scrolling shooter game starring a steamboat on the sea.
April 23, 2007

Barbie Seahorse Adventures 1.0, by Phil Hassey

Barbie the Seahorse wants to go to the moon! Let the good times roll with this swell side-scroller. Won teams category in pyweek #4!
April 22, 2007

Bouncy the Hungry Rabbit post-r4, by Richard Jones

You play Bouncy the Hungry Rabbit. You're in a garden with yummy veggies and a farmer who's not keen on you eating them. You can hide (and move around) under the ground.
October 05, 2006

Typus Pocus Pyweek3, by Team PyAr

A typing game, with a twist.
October 02, 2006

Colonel Wiljafjord and the Tarbukas Tyranny contest, by Phil Hassey

An adventure game tribute to some of the old LucasArts and Sierra classics -- Monkey Island and Space Quest. Made for pyweek #3.
September 25, 2006

Nelly's Rooftop Garden 1.0, by Alex Holkner

A physics-based puzzle game written for PyWeek 2.
April 22, 2006

20,000 Light Years Into Space 1.2, by Jack Whitham

"20,000 Light Years Into Space" is a single-player real-time strategy game with a "Steampunk" sci-fi theme.
April 17, 2006

GalaxyMage 0.3.0, by Colin McMillen

GalaxyMage is a free, open-source tactical/strategic RPG for Windows, Linux, and Macintosh.
March 26, 2006

Angry, Drunken Dwarves 1.0.1, by Joe Wreschnig

In Angry, Drunken Dwarves, you are an angry, drunken dwarf. Why are you so angry? Who knows. But you've decided to take your aggression out on other dwarves, by dropping gems on their heads. Lots of gems.
January 12, 2006

The Witch's Yarn 1.3, by Keith Nemitz

Graphical Interactive Fiction Stage director metaphor UI. Sit-com inspired interactive comic book as theater.
September 16, 2005

Dynamite 1.1, by Phil Hassey

The evil potentate is ruining everyone's lives! Use the power of dynamite to destroy his strongholds.
September 15, 2005

Quido: Failed Experiment 1.1, by Simon Wittber

This was TeamXerian's entry in pyweek 2005.
September 09, 2005

Pylonoid 1.2, by Sami Hangaslammi

Puzzle game where you direct a stream of electricity with different kinds of power pylons.
September 06, 2005

OUTERSPACE .5.13, by Administrator

A massive multiplayer online strategy game. The game itself supports internal message boards, self updating clients, and it doesn't stop there. An amazing accomplishment.
December 05, 2002