Skip to main content

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

The documentation for Pygame Zero is found here: https://pygame-zero.readthedocs.io/en/stable/index.html

The GitHub of Pygame Zero is found here: https://github.com/lordmauve/pgzero

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.

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

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.

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

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

Source distribution (sdist)

Source distribution for pgturbo 1.14.0
File Size Uploaded
pgturbo-1.14.0.tar.gz 3.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pgturbo 1.14.0
File Interpreter ABI Platform
pgturbo-1.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.5 MB

Release files / pgturbo-1.14.0.tar.gz

Download URL pgturbo-1.14.0.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
0ac58c086c2bed876183576a1b83da9f1a0b954ccf5584b0f5fb32eb0e21d9a2
BLAKE2b-256 checksum
How to use checksums
38b5edb63ff3db60a32de48e880318585efad836aa4757e6a02b769d249ad43e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / pgturbo-1.14.0-py3-none-any.whl

Download URL pgturbo-1.14.0-py3-none-any.whl
Size 153.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e95d2ec1ebb86b02c2565efc778b9fdbddb19e3ebe24e507a7fe12952aa3d8cb
BLAKE2b-256 checksum
How to use checksums
aa5552f0606027521962d4669feba3c143921b94b101657d2dc8be08a76f043f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.14.0 This release

2 release files

1.13.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

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