Skip to main content

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

Project description

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

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

pgzpro-1.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

pgzpro-1.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pgzpro-1.1.0.tar.gz.

File metadata

  • Download URL: pgzpro-1.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pgzpro-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3a5c5b1abea49162f8fe2f916e442872127e1692d0c17e8f00cb8132d310b431
MD5 1bf89241934e86d601fd1fbcf5771842
BLAKE2b-256 e6eb964c27a32d5cc186bd3cd6746e0519d99395e7a40be6c0e0363723e8b288

See more details on using hashes here.

File details

Details for the file pgzpro-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pgzpro-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pgzpro-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67943d8debd78c3878849fdb5f293f2b886ccb0624445a049c4a10072fddf01a
MD5 85554aa61e76b6d6c9eebb7ad11316fe
BLAKE2b-256 fe1a134d4eb96ba78376c9bd94fc29d0bc0d92ce3438d757c50f666ccc5c2c6f

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