Skip to main content

pygame

This project is a branch of pygame on QPython.

Pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task.

👉 We need your help to make pygame the best it can be! New contributors are welcome.


Installation

Before installing pygame, you must check that Python is installed on your machine.

To find out, open a command prompt (Windows) or a terminal (MacOS/Linux) and type:

python --version

If a message such as Python 3.8.10 appears, Python is correctly installed. Otherwise, go to the official Python website to install it.

Next, check if pip is installed:

pip --version

If you see something like pip 20.0.2 from /usr/lib/..., you're ready to install pygame:

pip install pygame

Once installed, test pygame by running:

python3 -m pygame.examples.aliens

If this doesn’t work, check the Getting Started guide for platform-specific setup help.


Help

If you're new to pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There's also full reference documentation.

You can browse documentation on the docs page, or locally via:

python -m pygame.docs

If local docs aren't found, it will open the online documentation.

To upgrade pygame to the latest version:

pip install pygame --upgrade

Best of all, the examples/ directory includes many playable programs to get you started.


Features

Pygame is a powerful library for game development, offering a wide range of features:

🎨 Graphics

  • Easy tools for 2D graphics and animation
  • Support for images, rectangles, and polygon shapes

🔊 Sound

  • Play and manipulate sound and music
  • Supports WAV, MP3, and OGG formats

🎮 Input

  • Handle keyboard, mouse, and joystick input easily

🕹️ Game Development Tools

  • Collision detection
  • Sprite management
  • Game loop support

Whether you're building a platformer, puzzle game, or something new — Pygame has you covered.


Building From Source

To use in-development features or contribute to Pygame, build it from source instead of installing via pip.

Installing from source is mostly automated. The most work is compiling dependencies. Once done, run:

python setup.py install

Release files for pygame-qpython 2.6.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygame-qpython 2.6.1.1
File Size Uploaded
pygame_qpython-2.6.1.1.tar.gz 6.7 MB Details

Release files / pygame_qpython-2.6.1.1.tar.gz

Download URL pygame_qpython-2.6.1.1.tar.gz
Size 6.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e50d319fa90c24e37066a6c4311e6db3f7c5ccc397e727952506277443c8aef2
BLAKE2b-256 checksum
How to use checksums
1c4e71e241ba455a3ae8eb783f6b1b63ad71f6687952475302d1d6ed2e6d506d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.7

Release history Release notifications | RSS feed

This release

2.6.1.1 This release

1 release file

2.6.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page