Skip to main content

PGZPro - AI-Powered Game Development Toolkit

A powerful Python library that combines AI image generation with Pygame Zero enhancements. Create stunning games with AI-generated assets and streamlined development workflow.

🚀 Features

AI Image Generation

  • Flux Model Integration: Generate high-quality images using G4F's Flux AI model
  • Smart Prompt Translation: Automatic translation of non-English prompts
  • Transparent Backgrounds: Create PNG images with transparent backgrounds
  • Custom Dimensions: Generate images in any size up to 1024x1024 pixels

Pygame Zero Enhancements

  • Window Centering: Automatically center your game window on any screen
  • Seamless Integration: Works perfectly with Pygame Zero ecosystem
  • Desktop Notifications: Display beautiful notification messages

🛠️ Core Commands

Window Management

import pgzpro  # MUST be imported BEFORE pgzrun

pgzpro.center()           # Center the game window on screen
pgzpro.no_logging(True)   # Disable debug logging (optional)

import pgzrun

AI Asset Generation

# Generate game background (automatically fits screen)
background = pgzpro.bg_generate("fantasy forest with mountains")

# Generate character with transparent background
character = pgzpro.actor_generate("hero knight", "60x80")

# Generate game objects
crystal = pgzpro.actor_generate("magic crystal", "40x40")

Desktop Notifications

# Show notification message (auto-closes after 3 seconds)
pgzpro.message("Game started!")

# Custom notification with colors and duration
pgzpro.message("Level completed!", text_color="white", bg_color="green", duration=5.0)

# Quick notification (1 second)
pgzpro.message("Item collected!", duration=1.0)

⚠️ AI generation needs active internet connection

🆕 What's New in Version 1.1.0

  • Notification System: Added new message() function for desktop notifications
  • Correction of defects: Fixed cleaning of temporary files

📦 Installation

pip install pgzpro

🔄 Updating the Library

pip install -U pgzpro

or

pip install --upgrade pgzpro

Metadata

Release files for pgzpro 1.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 pgzpro 1.1.1
File Size Uploaded
pgzpro-1.1.1.tar.gz 9.1 kB Details

Built distribution (wheel)

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

Total release size: 18.5 kB

Release files / pgzpro-1.1.1.tar.gz

Download URL pgzpro-1.1.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b0234d9f4c039663a1e020bed03d26708a44c8538b823eab27d136c3005f0d0b
BLAKE2b-256 checksum
How to use checksums
7fee4109743dc1df1c209f5bcb9647a2aad403b62f94e3423e12b5c7d334ee5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pgzpro-1.1.1-py3-none-any.whl

Download URL pgzpro-1.1.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e07c919b7e18558453d3ed1973ee17631c735f43afae6c33dbf1cbc32ba2a3f9
BLAKE2b-256 checksum
How to use checksums
233a78c2a7a8aad7e94d5da669cea006384bbab6b228603ce802c2ce1878a553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

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