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.
โจ 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
- Getting Started Guide - Create your first game in minutes
- API Reference - Complete API documentation
- Android Build Guide - Deploy to Android devices
- Examples - Sample games for each template
- Python API Summary - High-level Python API overview
- Python Bindings - C++ to Python binding details
๐ 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:
- pybind11 - Python bindings
- Bullet3 - 3D physics
- Box2D - 2D physics
- Vulkan - Graphics API
- OpenAL - Audio
- CMake - Build system
๐ Support
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join our community
๐บ๏ธ 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
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecbadcbebc5e22d91c16a8f5bb4ed673c4238e01046ec072cdabac1061718e84
|
|
| MD5 |
f42cba4af89fa75b000ec730ae1cfcee
|
|
| BLAKE2b-256 |
a366adb222828ab9bce8d01274d95f9649e5fadd053030d7aab11310c4847a3b
|