Pygame Turbo
A quicker moving fork of the zero-boilerplate games programming framework Pygame Zero, based on Pygame.
The documentation for Pygame Turbo is found here: https://pgturbo.readthedocs.io/
The code repository for Pygame Turbo is found here: https://github.com/Mambouna/pgturbo
Switching to Pygame Turbo
If you’ve been working with Pygame Zero so far and want to use some of the new features in Pygame Turbo, it’s easy to switch over.
First, install the pgturbo pip-package:
pip install pgturbo
If you’ve been running your game with the command pgzrun from the command line, you can simply switch to running it with the command pgtrun instead.
If you’ve been using import pgzrun and pgzrun.go() in your main script, you only have to change these to import pgtrun and pgtrun.go().
That’s it!
Divergence to Pygame Zero
This is a changelog which keeps track of which changes exist in respect to the main Pygame Zero project. If and when those features are added to Pygame Zero, they will be removed from the running list.
New features
Sprite animation system for actors, easy to start using but with deep customization available.
A proper mouse builtin to get the state of different mouse properties like positions, relative movements, state of buttons being pressed and more. Also allows changing of visibility, cursor shape and others.
Easy to use and feature rich controller support making coding games with controller controls easy while also allowing multiple controllers for multiplayer support with simple interfaces.
Convenience functions for clock that allow checking total elapsed time and saving timestamps with names and checking them / time elapsed since their creation.
clock.timescale property that allows slowing down, speeding up or pausing the game time. Integrating the different timescale with actor movements or other time relevant code is up to the user.
Global ready timers in clock and for each individual actors that make tracking if triggerable thing or cooldown is ready far easier.
Take screenshots with F12 in the game window or manually from code with screen.screenshot().
An on_exit() event hook that runs before the PGTurbo game quits, be it on purpose or from an error.
Feature enhancements
Pixel perfect collision check between two actors or an actor and a point via actor1.collidemask(target).
Scaling actors and flipping their images both independently for X and Y.
width and height are now proper gettable and settable properties for actors. Alternative properties allow reading the dimensions of the actors bounding box when rotated.
Angle and target-based movement functions for Actors, similar to what is possible in Scratch and other environments.
Velocity property and movement function for Actors that only move in straigth lines. Also includes an intercept function to calculate necessary velocity to meet a target actor that also has a constant velocity.
Two more functions for easily getting velocities towards angles or points.
Create Actors from simple shapes without needing an image, via Actor.Rectangle(width, height, color), Actor.Ellipse(width, height, color) and Actor.Triangle(width, height, color).
Function to check if an actor is currently withing the screen bounds: .is_onscreen().
Setting movement limits for actors for example to keep them on the screen.
More understandable error reporting for wrong positional values.
String color names are spellchecked to make fixing typos easier.
Schedule functions with arguments instead of only ones without any.
Optionally schedule functions in absolute time unaffected by clock.timescale.
Aligned usage of music builtin with the other resource loaders for less friction in use.
New FULLSCREEN and RESIZABLE global variables that control game window properties like WIDTH and HEIGHT do.
Enhancements of the storage builtin: an autosaving mode, and setup() and overwrite() methods that make working with persistent data easier.
Tint and shade actors with their .tint_color and .tint_value properties for easy highlight or flash effects.
Let actors save any arbitrary values for game mechanics in their .data dictionaries.
Allow tuple rect arguments for screen.draw.rect() and .filled_rect().
Ported example game projects to PGTurbo: Asteroids, Flappybird, Memory, Pong and Snake.
Fully overhauled the documentation of the project.
Bug fixes
Fixed music.is_playing() requiring an argument.
Fixed a bug where creating actors outside of functions in IDE mode (importing pgtrun and using pgtrun.go() at the end of the game file led to a crash because no display was initialized when image operations are performed by PGTurbo.
Fixed a bug where storage would not correctly ensure its target directory and file existed when trying to load and save.
Fixed a bug where generated tones played for the wrong duration.
Fixed a bug where mouse wheel input could crash the program.
WIDTH, HEIGHT and all other game window variables are now in global scope with their default values even if the user does not set them, meaning there are no crashes when trying to read them.
Fixed drawn rects to conform to how base Pygame does it to stay within the given rect bounds.
Dependencies
Switched the base dependency from pygame to pygame-ce as it is being developed more actively and causes fewer installation problems.
Removed the dependency on pyfxr for tone synthesis. The same functionality is now provided with numpy and pygame themselves.
Integrated changes
These former divergences between Pygame Turbo and Pygame Zero have been introduced to Pygame Zero itself:
None so far.
Metadata
Release files for pgturbo 1.16.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pgturbo-1.16.0.tar.gz | 8.2 MB | Without provenance | Details for pgturbo-1.16.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pgturbo-1.16.0-py3-none-any.whl | Python 3 | none | any | Details for pgturbo-1.16.0-py3-none-any.whl |
Total release size: 8.3 MB
Release files / pgturbo-1.16.0.tar.gz
| Download URL | pgturbo-1.16.0.tar.gz |
|---|---|
| Size | 8.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f02ae774079f4e2b77822898a302bcec25b08f08a797c0c09f336eb40ddea236
|
|
BLAKE2b-256 checksum How to use checksums |
898631580baabf803144124a0ae0feae632941ecc805b0478405dd8273c0f5b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.10
|
Release files / pgturbo-1.16.0-py3-none-any.whl
| Download URL | pgturbo-1.16.0-py3-none-any.whl |
|---|---|
| Size | 157.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f06439999cda4cb7294985e3381b62590f10f2d1493955591205ff13814d0542
|
|
BLAKE2b-256 checksum How to use checksums |
ed050960a1e74c4d9ede4e8ccb5aa121a83d51e0bee918fc1bb1fe52984b1d05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.10
|
Security for pgturbo 1.16.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.