Skip to main content

A fast moving zero-boilerplate 2D games framework

Project description

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().

Feature enhancements

  • Pixel perfect collision check between two actors via actor1.collidemask(actor2).

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

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

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgturbo-1.10.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pgturbo-1.10.0-py3-none-any.whl (149.9 kB view details)

Uploaded Python 3

File details

Details for the file pgturbo-1.10.0.tar.gz.

File metadata

  • Download URL: pgturbo-1.10.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pgturbo-1.10.0.tar.gz
Algorithm Hash digest
SHA256 e748a313047ab2c24b95495f5a294049655c0b7bd6e09ca9ef42e3639eb7260e
MD5 2a64eb23ccbdfd97ce8999a39d05ea62
BLAKE2b-256 22c805ec94702e685a2b1702d89036c11e6eadf0f0a64f180db2fa3abe1255e0

See more details on using hashes here.

File details

Details for the file pgturbo-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: pgturbo-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 149.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pgturbo-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2dde71475ca2245da1227e464cb815976e344aa32bf3f7fdeeb9aa6fe175ef81
MD5 e4846b90d9d6cec4c57ae3128ab0120c
BLAKE2b-256 77ab58e98e5e9bbe1d53a9018c5f19d129091a4822e6f0001346e64cf8bc8725

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page