Python game development libraries

Updated Nov 2026

Python game development libraries open a window, read keyboard and mouse input, draw sprites or scenes, and play sound from Python code. A game framework runs a loop that handles input, updates the game state, and draws a new frame many times a second. These libraries let developers build prototypes, teaching projects, and small games without a full commercial engine.

Popularity

pygame has the most monthly downloads in this comparison, at 2.7M.

LibraryMonthly downloadsStarsLast releaseLicense
pygame
2.7M
9.0KSep 2024LGPL
pyglet
2.3M
2.2KOct 2026BSD
pygame-ce
776.6K
Not on GitHubAug 2026LGPL-2.1
Panda3D
210.5K
5.3KDec 2025BSD-3-Clause
Ursina
71.7K
Not on GitHubDec 2025MIT
Arcade
21.6K
2.1KOct 2025MIT
Pyxel
20.2K
Not on GitHubNov 2026MIT
Downloads: pypi, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Provides game-loop, drawing, input, audio, and sprite tools for Python.

Downloads / mo
2.7M
Stars
9.0K
Last release
2.6.1
License
LGPL

Strengths

  • Gives direct game-loop control. Choose when to process input, update state, and draw each frame.
  • Checks pixel-mask sprite collisions. Use collide_mask to test overlap between sprite collision masks.

Limitations

  • Events need servicing every frame. Process the event queue regularly to keep the window responsive.
  • Rotated sprites need fresh masks. Recreate the collision mask when the sprite image changes.

Quickstart

From docs.md
$ python -m pip install pygame==2.6.1
import pygame

pygame.init()
screen = pygame.display.set_mode((640, 480))
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    screen.fill("black")
    pygame.display.flip()
pygame.quit()

pygame examples

From open-source projects on GitHub

Provides native windows, input, OpenGL graphics, and media playback for Python applications.

Downloads / mo
2.3M
Stars
2.2K
Last release
2.1.19
License
BSD

Strengths

  • Exposes native OpenGL rendering. Use pyglet.gl directly or build on higher-level graphics abstractions.
  • Manages multiple native windows. Create separate windows across a multi-monitor desktop.

Limitations

  • Legacy batching needs migration. Replace Batch.add with ShaderProgram vertex-list APIs in newer pyglet.
  • Video playback needs FFmpeg. Install FFmpeg before playing video.

Quickstart

From hello_world.py
$ python -m pip install pyglet==2.1.19
import pyglet

window = pyglet.window.Window()

@window.event
def on_draw():
    window.clear()

pyglet.app.run()

pyglet examples

From open-source projects on GitHub

Develops games in Python through a community fork of pygame.

Downloads / mo
776.6K
Last release
2.5.8
License
LGPL-2.1

Quickstart

From surface.html
$ python -m pip install pygame-ce==2.5.8
import pygame

surface = pygame.Surface((640, 480))
surface.fill("black")

pygame-ce examples

From open-source projects on GitHub

Provides a three-dimensional scene engine with Python bindings, collisions, and audio systems.

Downloads / mo
210.5K
Stars
5.3K
Last release
1.10.16
License
BSD-3-Clause

Strengths

  • Includes a complete scene engine. Use Python to control a scene-oriented game and rendering engine.
  • Integrates Bullet physics. Use Bullet bodies for rigid-body dynamics and collision detection.

Limitations

  • Collision systems stay separate. Bullet bodies do not collide with ODE bodies or native CollisionNodes.

Quickstart

From README.md
$ python -m pip install panda3d==1.10.16
from direct.showbase.ShowBase import ShowBase

app = ShowBase()
app.run()

Panda3D examples

From open-source projects on GitHub

Provides a game engine and framework for Python.

Downloads / mo
71.7K
Last release
8.3.0
License
MIT

Quickstart

From README.md
$ python -m pip install ursina==8.3.0
from ursina import Ursina, Entity

app = Ursina()
cube = Entity(model="cube")
app.run()

Provides a Python framework for two-dimensional games with sprites and collision tools.

Downloads / mo
21.6K
Stars
2.1K
Last release
3.3.3
License
MIT

Strengths

  • Batches sprite drawing. Draw SpriteList collections together through the graphics processor.
  • Hashes static sprite collisions. Enable spatial hashing for collision checks against non-moving sprite lists.

Limitations

  • Targets desktop graphics hardware. Web and mobile are currently unsupported.
  • Moving sprites weaken spatial hashing. Reserve spatial hashing for sprite lists that mostly stay still.

Quickstart

From sprite_minimal.py
$ python -m pip install arcade==3.3.3
import arcade

window = arcade.Window(640, 480, "Example")

@window.event
def on_draw():
    window.clear()

arcade.run()

Arcade examples

From open-source projects on GitHub

Provides a retro game engine for Python.

Downloads / mo
20.2K
Last release
3.0.2
License
MIT

Quickstart

From README.md
$ python -m pip install pyxel==3.0.2
import pyxel

def update():
    if pyxel.btnp(pyxel.KEY_Q):
        pyxel.quit()

def draw():
    pyxel.cls(0)
    pyxel.text(5, 5, "Hello", 7)

pyxel.init(160, 120)
pyxel.run(update, draw)

FAQ

pygame suits two-dimensional games with a hand-written event and draw loop. Arcade suits two-dimensional games built around sprite lists, views, and callbacks. Panda3D and Ursina suit three-dimensional games with a scene graph.

Panda3D is a full game engine with a live scene graph, model loading, collisions, and audio. Ursina builds an entity and prefab framework on top of it for faster setup. Pyxel is a retro engine with its own pixel graphics, sound, and asset editor.

pygame-ce is a separately published community fork that exposes the same pygame import and game APIs. A project installs one of the two distributions, and its dependency manifest names which one.

pyglet provides native windows, input, OpenGL graphics, and media playback for Python applications. It also loads sprites and models.

For coding agents

Found your game development library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official