Professional 2D/2.5D Game Engine for Python
Project description
๐ VoidRay 3 - 2D/2.5D Game Engine
A professional 2D/2.5D game engine built with Python and Pygame. VoidRay provides the core infrastructure and tools needed to build any type of game, while giving developers complete control over their game logic and mechanics.
๐ Engine Features (v3)
๐ฏ Core Engine Systems
- ๐งฉ ECS Architecture: Modern Entity-Component-System for flexible game objects
- โก Advanced Physics: Collision detection, rigidbodies, and spatial partitioning with quadtree optimization
- ๐ฎ Multi-Input Support: Keyboard, mouse, gamepad with frame-perfect detection
- ๐ต Spatial Audio: 3D positioned audio with distance attenuation and effects
- ๐ฆ Asset Streaming: Efficient loading, caching, and resource streaming
- ๐จ Advanced Renderer: 2.5D graphics pipeline with depth sorting and post-processing
- ๐ง Debug Tools: Performance monitoring, profiler, and visual debugging overlay
- ๐พ Save System: JSON and binary save/load with integrity checking
๐๏ธ What You Build
VoidRay gives you the foundation - you create the game:
- Game Logic: Your gameplay mechanics, rules, and systems
- UI Design: Menus, HUDs, and interface layouts using our UI framework
- Content Systems: Inventory, dialogue, AI behaviors, progression systems
- Game Assets: Art, sounds, levels, and content creation
- Gameplay Flow: How your game plays, feels, and engages players
โจ Engine Capabilities (v3)
๐จ Advanced Graphics & Rendering
- 2.5D Support: Depth-based rendering with layered sprites and advanced camera system
- Shader System: Retro pixel-perfect rendering with configurable pixel sizes
- Sprite Management: Rotation, scaling, animation with batch rendering optimization
- Visual Effects: Particle systems, bloom effects, and post-processing pipeline
- Performance: Spatial culling, batch rendering, and 60+ FPS optimization
โก Enhanced Physics System
- Rigidbody Dynamics: Mass, velocity, acceleration, drag, and realistic forces
- Advanced Colliders: Box, circle, polygon collision shapes with trigger support
- Physics Events: Collision callbacks, overlap detection, and sensor systems
- Spatial Optimization: Quadtree partitioning for efficient collision detection
- Performance: Optimized broad-phase and narrow-phase collision detection
๐ฎ Comprehensive Input Management
- Multi-Device Support: Keyboard, mouse, gamepad with unified API
- Advanced Detection: Key states, combinations, just-pressed/released detection
- Frame-Perfect Input: Precise timing for competitive games
- Input Mapping: Customizable control schemes and input rebinding
๐ต Professional Audio System
- Spatial Audio: 3D positioned sound with distance attenuation
- Audio Effects: Real-time audio processing and effects
- Multi-Format: WAV, MP3, OGG support with automatic format detection
- Performance: Efficient audio streaming for large files
๐๏ธ Robust Architecture
- ECS System: Modular, reusable, and extensible components
- Scene Management: Advanced scene transitions with loading screens
- Asset Pipeline: Automatic loading, preprocessing, and optimization
- Memory Management: Efficient resource usage with automatic cleanup
- Debug Tools: Performance profiler, memory monitor, and debug overlay
๐ฎ Complete Pacman Game Example
VoidRay 3 includes a fully functional Pacman game demonstrating all engine features:
import voidray
from voidray import Scene, GameObject, Vector2, Keys, BoxCollider
from voidray.rendering.renderer import Advanced2DRenderer
from voidray.utils.color import Color
class Pacman(GameObject):
"""Player-controlled Pacman with physics and animation."""
def __init__(self, x, y):
super().__init__("Pacman")
self.transform.position = Vector2(x * CELL_SIZE + CELL_SIZE//2, y * CELL_SIZE + CELL_SIZE//2)
self.direction = Vector2(0, 0)
self.speed = 120
# Add physics collider
collider = BoxCollider(CELL_SIZE - 4, CELL_SIZE - 4)
self.add_component(collider)
def update(self, delta_time):
input_manager = voidray.get_engine().input_manager
# Handle input with frame-perfect detection
if input_manager.is_key_pressed(Keys.LEFT):
self.direction = Vector2(-1, 0)
elif input_manager.is_key_pressed(Keys.RIGHT):
self.direction = Vector2(1, 0)
elif input_manager.is_key_pressed(Keys.UP):
self.direction = Vector2(0, -1)
elif input_manager.is_key_pressed(Keys.DOWN):
self.direction = Vector2(0, 1)
# Physics-based movement
if self.can_move_in_direction(self.direction):
movement = self.direction * self.speed * delta_time
self.transform.position += movement
class PacmanGameScene(Scene):
"""Complete Pacman game with all VoidRay features."""
def __init__(self):
super().__init__("PacmanGame")
self.score = 0
self.game_over = False
def on_enter(self):
super().on_enter()
self.setup_maze()
self.setup_characters()
# Configure camera for optimal viewing
camera = voidray.get_engine().camera
camera.position = Vector2(MAZE_WIDTH * CELL_SIZE // 2, MAZE_HEIGHT * CELL_SIZE // 2)
def update(self, delta_time):
super().update(delta_time)
self.check_collisions()
self.check_victory()
def main():
"""Initialize and start VoidRay Pacman."""
voidray.configure(
width=608,
height=772,
title="VoidRay 3.1.0 - Pacman Demo",
fps=60
)
voidray.on_init(init_game)
voidray.start()
if __name__ == "__main__":
main()
Features Demonstrated:
- โ Advanced 2D rendering with sprite batching
- โ Physics-based collision detection
- โ Frame-perfect input handling
- โ Component-based game objects
- โ Scene management system
- โ Real-time performance monitoring
๐ฏ Game Types You Can Create
๐น๏ธ Arcade & Action Games
- Pacman-style games with advanced AI and physics
- Space shooters with particle effects and collision systems
- Platformers with precise physics and smooth controls
- Racing games with realistic vehicle dynamics
๐ Advanced Game Genres
- Metroidvania games with interconnected worlds
- Physics puzzlers leveraging the advanced physics engine
- Multiplayer games using the networking system
- RPGs with save systems and complex UI
๐ฎ Modern Features
- Real-time lighting and visual effects
- Procedural generation with the flexible component system
- Audio-reactive games with spatial audio
- Performance-optimized games running at 60+ FPS
๐ง Engine Architecture (v3)
VoidRay 3.1.0 Engine
โโโ ๐ฎ Core Systems
โ โโโ Engine State Management
โ โโโ Component Registry & ECS
โ โโโ Advanced Asset Streaming
โ โโโ Resource Pool Management
โโโ ๐จ Graphics & Rendering
โ โโโ Advanced 2D Renderer
โ โโโ Shader Manager (Retro Mode)
โ โโโ Camera System with Following
โ โโโ Post-Processing Pipeline
โโโ โก Physics & Collision
โ โโโ Physics Engine with Rigidbodies
โ โโโ Quadtree Spatial Partitioning
โ โโโ Advanced Collision Detection
โ โโโ Physics Events & Triggers
โโโ ๐ฎ Input & Controls
โ โโโ Multi-Device Input Manager
โ โโโ Frame-Perfect Detection
โ โโโ Input State Management
โโโ ๐ต Audio & Sound
โ โโโ Spatial Audio System
โ โโโ Audio Effects Processing
โ โโโ Multi-Format Support
โโโ ๐พ Data & Saves
โ โโโ JSON/Binary Save System
โ โโโ Asset Loading & Caching
โ โโโ Resource Management
โโโ ๐ง Development Tools
โโโ Performance Profiler
โโโ Debug Overlay System
โโโ Engine Validator
โโโ Error Dialog System
๐ VoidRay 3.1.0 vs Alternatives
| Feature | VoidRay 3 | PyGame | Arcade |
|---|---|---|---|
| Learning Curve | โ Beginner to Pro | โ Low-level | โ ๏ธ Medium |
| Setup Time | โ Instant (zero config) | โ Manual setup | โ ๏ธ Some setup |
| Built-in Physics | โ Professional (rigidbodies, quadtree) | โ Basic/None | โ ๏ธ Basic |
| ECS Architecture | โ Full ECS with components | โ Manual | โ Class-based |
| 2.5D Support | โ Native depth sorting | โ Manual | โ ๏ธ Pseudo-3D |
| Performance | โ 60+ FPS with 350+ objects | โ ๏ธ Depends on code | โ Good |
| Save System | โ Built-in JSON/Binary | โ Manual | โ Manual |
| Audio System | โ Spatial 3D audio | โ ๏ธ Basic mixer | โ ๏ธ Basic |
| Debug Tools | โ Profiler, overlay, validator | โ None | โ ๏ธ Basic |
| Asset Management | โ Streaming, caching, pooling | โ Manual | โ ๏ธ Basic |
| Version | 3 | 2.6.1 | 2.6.x |
๐ Performance Benchmarks (v3)
โก Real Performance Data
- 354 objects rendered simultaneously (Pacman demo)
- 60+ FPS stable performance on modern hardware
- Advanced renderer with batching and culling
- Memory efficient - automatic resource cleanup
- Spatial optimization - quadtree collision detection
๐ง Optimization Features
- Automatic batching reduces draw calls
- Spatial culling only renders visible objects
- Asset streaming loads resources on-demand
- Physics optimization with sleeping objects and broad-phase detection
๐ Getting Started
๐ฏ Quick Start (5 minutes):
- Download VoidRay 3
- Study the code to understand the engine
- Modify and create your own game
- Deploy on Replit for sharing
๐ Documentation Available:
- API Reference - Complete function documentation
- Physics Guide - Advanced physics simulation
- Component System - ECS architecture guide
- Performance Tips - Optimization strategies
๐ค Contributing to VoidRay 3
๐ป Development Areas
- Engine Features - Add new systems and components
- Performance - Optimize rendering and physics
- Documentation - Improve guides and examples
- Game Examples - Create showcase games
๐ฎ Example Games Wanted
- Platformer showcasing physics
- Shooter demonstrating effects
- RPG using save systems
- Multiplayer game with networking
๐ License & Legal
GNU General Public License v3.0 (GPL-3.0)
โ You Can:
- Use VoidRay 3 for any purpose (personal, commercial, educational)
- Study and modify the engine source code
- Distribute your changes and improvements
- Create and sell games made with VoidRay
โ ๏ธ Requirements:
- Include license notice in distributed engine code
- Make source code available if distributing modified engine
- Use same GPL-3.0 license for engine modifications
Your games keep their own license - Only engine modifications need to be GPL-3.0.
๐ VoidRay 3 - Ready for Production
๐ Proven in Action:
- Complete Pacman game included as example
- 354 objects rendered at 60+ FPS
- Professional architecture with ECS and physics
- Production-ready save system and asset management
๐ฏ Perfect For:
- Indie developers building commercial games
- Game jams requiring rapid prototyping
- Educational projects teaching game development
- Professional studios needing Python-based tools
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file voidray-3.1.0-py3-none-any.whl.
File metadata
- Download URL: voidray-3.1.0-py3-none-any.whl
- Upload date:
- Size: 196.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a48ff1056957513d869a6ffb6649619af8c3c456d3adfbec2058e7a138d961
|
|
| MD5 |
8099fc59c595ccfb90374de92c982a4c
|
|
| BLAKE2b-256 |
fef334b333907cf07f80fdf06459a401358cae7bf8d66d896e5014618b7ada3d
|