Introduction
What is Pill?
Pill is a modern game engine built entirely in Rust, designed to provide a robust and efficient framework for game development. It combines the power of Rust's memory safety guarantees with a flexible Entity Component System (ECS) architecture.
Key Features
🏗️ Entity Component System (ECS)
Pill is built around a powerful ECS architecture that separates data (Components) from behavior (Systems). This design pattern provides:
- Modularity: Easily add or remove functionality by composing components
- Performance: Cache-friendly data layout and efficient iteration
- Flexibility: Mix and match components to create complex game objects
🎨 Graphics & Rendering
The engine includes a comprehensive rendering system with support for:
- 3D Meshes: Load and render OBJ models
- Materials: Define surface properties with textures and parameters
- Textures: Support for color, normal, and other texture types
- Post-Processing: Customizable post-processing effects
⚙️ Physics Simulation
Integrated physics engine powered by Rapier, featuring:
- Rigid Bodies: Dynamic, static, and kinematic body types
- Colliders: Various collision shapes (boxes, spheres, meshes)
- Real-time Simulation: Accurate physics simulation for realistic movement
🌐 Networking
Built-in networking capabilities for multiplayer games:
- Client-Server Architecture: Reliable client-server communication
- Entity Synchronization: Automatic network replication of entities
- Custom Protocols: Flexible message system for game-specific needs
🔥 Hot Reloading
Rapid development workflow with hot-reloading support:
- Live Code Updates: Modify game logic without restarting
- Asset Reloading: Update assets on the fly
- Fast Iteration: See changes instantly during development
🎵 Audio System
Immersive audio capabilities:
- 3D Audio: Spatial audio with position and direction
- Audio Listeners: Camera-attached or custom positioned listeners
- Audio Sources: Attach sounds to game entities
Architecture Overview
┌─────────────────────────────────────────────────┐
│ Pill │
├─────────────────────────────────────────────────┤
│ Game Logic (Your Code) │
├─────────────────────────────────────────────────┤
│ Systems (Update Loop) │
├─────────────────────────────────────────────────┤
│ ECS Core │
│ ├─ Entities │
│ ├─ Components │
│ └─ Resources │
├─────────────────────────────────────────────────┤
│ Engine Modules │
│ ├─ Graphics (pill_renderer) │
│ ├─ Physics (Rapier integration) │
│ ├─ Audio │
│ └─ Networking (pill_net) │
├─────────────────────────────────────────────────┤
│ Core Utilities (pill_core) │
└─────────────────────────────────────────────────┘Use Cases
Pill is suitable for:
- 3D Games: First-person, third-person, and vehicle-based games
- Multiplayer Games: Networked games with client-server architecture
- Physics Simulations: Projects requiring realistic physics
- Rapid Prototyping: Quick iteration with hot-reloading
Examples
The engine comes with several example projects:
- Empty: Minimal starting template
- Floating-Pills: Basic 3D object demonstration
- Italian-Brainrot: Advanced example with multiple features
- Trucks: Vehicle physics and controls showcase
- Net-Minimal: Minimal networking example
Next Steps
Ready to start building with Pill? Head over to the Setup Guide to get your development environment ready.