pgzte is a fork of Pygame Turbo, which is a more swiftly-evolving, pygame-ce compliant fork of Pygame Zero, the zero-boilerplate games programming framework.
pgzte is initially agnostic between Pygame Turbo and Zero, offering a preferential setting, with fallback; and agnostic to the incorporation of additional Enodia features.
In Greek mythology, Enodia watched over entrances, standing on the main road into a city, and in the roads to private houses. She also was associated with crossroads, light, and passages between ~worlds. Prior Enodia code contributions are spread between:
- https://github.com/ullmer/Enodia-Pgzero
- https://github.com/ullmer/enodia
- https://github.com/ullmer/tangibles
- https://github.com/ullmer/plasma
- https://github.com/ullmer/designThinking
- https://github.com/ullmer/enoPivy
- https://github.com/ullmer/enoSolid
- https://github.com/ullmer/enoTurtle
- https://github.com/ullmer/plasma-java-jelly
... and then some (sigh).
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
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!
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.
- Sprite animation system for actors, easy to start using but with deep customization available.
- A proper
mousebuiltin 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
clockthat allow checking total elapsed time and saving timestamps with names and checking them / time elapsed since their creation. clock.timescaleproperty 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
clockand 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().
- Pixel perfect collision check between two actors via
actor1.collidemask(actor2). - Scaling actors and flipping their images both independently for X and Y.
widthandheightare 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)andActor.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
musicbuiltin with the other resource loaders for less friction in use.
- Fixed
music.is_playing()requiring an argument. - Fixed a bug where creating actors outside of functions in IDE mode (importing
pgtrunand usingpgtrun.go()at the end of the game file led to a crash because no display was initialized when image operations are performed by PGTurbo.
- Switched the base dependency from
pygametopygame-ceas it is being developed more actively and causes fewer installation problems. - Removed the dependency on
pyfxrfor tone synthesis. The same functionality is now provided withnumpyandpygamethemselves.
These former divergences between Pygame Turbo and Pygame Zero have been introduced to Pygame Zero itself:
None so far.