Skip to main content

High-performance game engine with Python bindings for 2D/3D games

Project description

PyWRKGame 3.0.0

๐ŸŽฎ High-Performance Game Engine for Python

PyWRKGame 3.0.0 is a revolutionary game development library with a C/C++ core and Python bindings, designed for maximum performance on mobile devices while maintaining ease of use.

Build Status License Python Version

โœจ Features

  • ๐Ÿš€ High Performance: C/C++ core optimized for mobile devices (30+ FPS on low-end Android)
  • ๐ŸŒ Cross-Platform: Windows, macOS, Linux, Android, iOS, consoles, VR/AR
  • ๐ŸŽจ Modern Graphics: PBR rendering, global illumination, advanced post-processing
  • ๐ŸŽฏ Complete Engine: Physics, audio, networking, AI, UI systems included
  • ๐Ÿ’ก Easy to Use: Create games in 10 lines of code or less
  • ๐Ÿ“ฑ Mobile-First: Touch controls, sensors, haptics, battery optimization
  • ๐ŸŽฎ Game Templates: Built-in templates for platformers, RPGs, shooters, puzzles

๐Ÿ“š Documentation

๐Ÿš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/pywrkgame/pywrkgame.git
cd pywrkgame

# Build C++ core
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release

# Install Python package
cd ..
pip install -e .

Your First Game (8 lines!)

from pywrkgame_api import Game

game = Game("My First Game", 800, 600)
player = game.create_sprite("player.png", 400, 300)

@game.on_update
def update(dt):
    player.move(game.input.x * 200 * dt, game.input.y * 200 * dt)

game.run()

Using Game Templates

from pywrkgame_api import quick_platformer

# Create a platformer in 4 lines!
game = quick_platformer("My Platformer")
game.add_player(100, 100)
game.add_platform(0, 500, 800, 50)
game.run()

๐ŸŽฎ Game Templates

PyWRKGame includes ready-to-use templates:

  • ๐Ÿƒ Platformer: Gravity, jumping, platforms
  • โš”๏ธ RPG: NPCs, dialog, 8-directional movement
  • ๐Ÿš€ Shooter: Bullets, enemies, auto-fire
  • ๐Ÿงฉ Puzzle: Grid system, piece matching, swapping

See examples/ for complete implementations.

๐Ÿ—๏ธ Building

๐Ÿ—๏ธ Building from Source

Prerequisites

  • CMake 3.16 or higher
  • C++17 compatible compiler
  • Python 3.7 or higher
  • pybind11 (automatically fetched by CMake)

Platform-Specific Requirements

Windows:

  • Visual Studio 2019+ or MinGW-w64
  • DirectX 12 SDK (included with Windows 10+)

macOS:

  • Xcode 11+ with Command Line Tools
  • Metal framework (included with macOS)

Linux:

  • GCC 7+ or Clang 6+
  • Vulkan SDK: sudo apt install libvulkan-dev

Build Instructions

# Clone repository
git clone https://github.com/pywrkgame/pywrkgame.git
cd pywrkgame

# Configure build
cmake -B build -DCMAKE_BUILD_TYPE=Release

# Build C++ core
cmake --build build --config Release

# Install Python package
pip install -e .

# Run tests
cd build
ctest --output-on-failure
cd ..
python -m pytest tests/python -v

Android Build

See ANDROID_BUILD.md for detailed Android deployment instructions using Buildozer.

# Quick Android build
buildozer android debug

๐Ÿงช Testing

# Run C++ tests
cd build
ctest --output-on-failure

# Run Python tests
python -m pytest tests/python -v

# Run integration tests
python -m pytest tests/python/test_integration_comprehensive.py -v

# Run specific test
python -m pytest tests/python/test_high_level_api.py -v

๐Ÿ›๏ธ Architecture

PyWRKGame uses a modern Entity-Component-System (ECS) architecture:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      Python High-Level API          โ”‚  โ† Game templates, quick functions
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚      Python Bindings (pybind11)     โ”‚  โ† C++ โ†” Python bridge
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         C++ Engine Core             โ”‚  โ† High-performance core
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ Renderingโ”‚ Physics  โ”‚  Audio  โ”‚  โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  โ”‚
โ”‚  โ”‚    AI    โ”‚ Network  โ”‚   UI    โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    Platform Abstraction Layer       โ”‚  โ† Cross-platform support
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Vulkan โ”‚ Metal โ”‚ D3D12 โ”‚ OpenGL   โ”‚  โ† Graphics APIs
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Components

  • ECS Framework: Efficient entity-component-system for game objects
  • Rendering Engine: PBR, global illumination, post-processing
  • Physics Engine: Bullet3 (3D) and Box2D (2D) integration
  • Audio System: 3D positional audio with HRTF
  • Network Manager: Client-server and P2P multiplayer
  • AI Framework: Behavior trees, pathfinding, procedural generation
  • UI System: Responsive layouts, touch controls, themes

๐Ÿ“ฑ Platform Support

Platform Status Graphics API Notes
Windows 10+ โœ… Supported D3D12, Vulkan Full feature support
macOS 10.15+ โœ… Supported Metal Full feature support
Linux โœ… Supported Vulkan Ubuntu 18.04+ tested
Android 5.0+ โœ… Supported Vulkan, OpenGL ES API level 21+
iOS 12+ โœ… Supported Metal iPhone 6s and newer
PlayStation ๐Ÿšง Planned GNM Requires dev kit
Xbox ๐Ÿšง Planned D3D12 Requires dev kit
Nintendo Switch ๐Ÿšง Planned NVN Requires dev kit
Oculus Quest โœ… Supported Vulkan Via Android build
HTC Vive โœ… Supported Vulkan Via desktop build

๐ŸŽฏ Performance

PyWRKGame is optimized for performance:

  • 30+ FPS on low-end Android devices (2D games)
  • 20+ FPS on low-end Android devices (3D games)
  • Automatic quality scaling based on device capabilities
  • Memory leak prevention with automatic management
  • Battery optimization for mobile devices

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

# Clone with submodules
git clone --recursive https://github.com/pywrkgame/pywrkgame.git

# Create development build
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build

# Run tests before committing
python -m pytest tests/python -v

๐Ÿ“„ License

PyWRKGame is released under the MIT License. See LICENSE for details.

๐Ÿ™ Acknowledgments

PyWRKGame uses these excellent libraries:

๐Ÿ“ž Support

๐Ÿ—บ๏ธ Roadmap

  • Core engine architecture
  • Cross-platform rendering
  • Physics integration
  • Audio system
  • Python bindings
  • Game templates
  • Android support
  • iOS support (in progress)
  • Console support (planned)
  • Visual editor (planned)
  • Asset pipeline (planned)

Made with โค๏ธ by the PyWRKGame team

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

pywrkgame-3.0.0.tar.gz (1.1 MB view details)

Uploaded Source

File details

Details for the file pywrkgame-3.0.0.tar.gz.

File metadata

  • Download URL: pywrkgame-3.0.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywrkgame-3.0.0.tar.gz
Algorithm Hash digest
SHA256 ecbadcbebc5e22d91c16a8f5bb4ed673c4238e01046ec072cdabac1061718e84
MD5 f42cba4af89fa75b000ec730ae1cfcee
BLAKE2b-256 a366adb222828ab9bce8d01274d95f9649e5fadd053030d7aab11310c4847a3b

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