Libraries

Graphics/Window/Sound/UI

Pygame

Website:http://pygame.org/
Documentation:https://www.pygame.org/docs/index.html

Pygame is principally bindings for SDL (Simple DirectMedia Layer) for Python. As such it has limited support for GPU-accelerated rendering, and any support for rotation, scaling, or alpha-blending sprites is limited.

It is one of the oldest Python game libraries, dating from around 2000.

Add-ons:

  • pygame-text - simple text rendering in Pygame, with a range of layout and styling options
  • pgu
  • thorpy for pygame GUIs
  • Albow - widget set for GUIs

pgzero Pygame Zero

Website:https://pygame-zero.readthedocs.io/en/stable/

Pygame Zero is “training wheels for Pygame”, intended to make it simpler for complete beginner to create games in Python using Pygame.

Even so, it also has a number of feature additions such as a built-in event loop and tweening.

pyglet Pyglet

Website:http://pyglet.org/
Documentation:https://pyglet.readthedocs.io/

Pyglet is a game framework that offers functionality for 2D graphics and text rendering using OpenGL. It also has complete OpenGL bindings, and can be used as the basis of 3D games.

It also has spatial 3D audio using AVBin.

coco Cocos2D

Website:http://python.cocos2d.org/
Documentation:http://python.cocos2d.org/doc/index.html

Cocos2D, built on Pyglet, offers higher level primitives, such as scene transitions and sprites on which animations can be queued.

Arcade

Website:http://arcade.academy/index.html

Also built on Pyglet, this is a higher-level games framework with extensive documentation and examples.

The author has written a corresponding book on learning to program with Arcade.

kivy Kivy

Website:http://kivy.org/

Kivy is a cross-platform multimedia UI system built on OpenGL ES. As such it can be used for building games, though it is not specifically designed for this purpose.

panda Panda3D

Website:https://www.panda3d.org/
Documentation:https://www.panda3d.org/manual/

Panda3D is a 3D engine for Python or C++, developed by CMU in partnership with Disney.

Others

  • pysdl2-harness - some simple classes to make working with pysdl2 easier. Somewhat inspired by pyglet and trying to hide all the “ugly” stuff of SDL2
  • ModernGL - a PyOpenGL replacement

Physics

Pymunk

Website:http://www.pymunk.org/en/latest/
Documentation:http://www.pymunk.org/en/latest/overview.html

Pymunk is a complete 2D physics engine with a very Pythonic API and good documentation. Pymunk is based on Chipmunk, a fast physics engine written in C.

Lepton

Website:https://github.com/lordmauve/lepton
Documentation:https://pythonhosted.org/lepton/

Particle physics and rendering for OpenGL and Pygame.

Others

  • PyBox2D - 2D physics. This is now much less well maintained than PyMunk, and the documentation is lacking.