🦎 Shadow Engine 2D
A modern, high-performance 2D game engine built in Rust
Website • Documentation • Examples • Discord
Powered by Shadow the Axolotl 🖤
✨ Features
Shadow Engine 2D is a complete 2D game engine with everything you need to build amazing games:
🎮 Core Systems
- Entity Component System (ECS) - Clean, intuitive architecture for game objects
- GPU Rendering - Hardware-accelerated graphics with WGPU (Vulkan, DirectX 12, Metal)
- Input Handling - Keyboard and mouse support with easy-to-use API
- Time Management - Delta time and frame-independent movement
⚡ Physics
- ShadowPhysics2D - Custom-built physics engine
- Gravity and force simulation
- Box and circle colliders
- Collision detection and response
- Dynamic and kinematic rigid bodies
- Realistic physics behavior
🎨 Graphics & Effects
- Sprite Rendering - Fast, batched sprite rendering with colors
- Texture System - Load PNG, JPG, and other image formats
- Particle System - Stunning visual effects
- Continuous and burst emission modes
- Built-in presets (explosion, fire, smoke)
- Customizable emitters with gravity and velocity
- Camera System - Professional camera controls
- Smooth following with configurable speed
- Zoom in/out functionality
- Camera shake effects
- Bounded camera movement
🖼️ UI System
- Flexible UI Components
- Panels with customizable borders
- Interactive buttons with hover states
- Progress bars
- Anchor-based positioning (Center, TopLeft, TopRight, etc.)
🔊 Audio System
- Sound Effects - Play multiple sounds simultaneously
- Background Music - Looping music with volume control
- Supported Formats - WAV, OGG, MP3, FLAC
- Volume Control - Per-sound and global volume adjustment
🚀 Quick Start
Installation
Add Shadow Engine 2D to your Cargo.toml:
[]
= "2.0.1"
Your First Game
use *;
use KeyCode;
📚 Examples
Shadow Engine 2D comes with comprehensive examples:
Basic Game
Simple player movement with WASD controls.
Physics Demo
Platformer with gravity, jumping, and collisions.
Particles & Camera
Particle effects with camera following and zoom.
UI Demo
Health bars, buttons, and UI panels.
Audio Demo
Sound effects and background music.
🎯 Core Concepts
Entity Component System
Shadow Engine 2D uses an intuitive ECS architecture:
// Spawn an entity
let entity_id = world.spawn;
// Add components
if let Some = world.entity_mut
// Query entities
for entity in world.entities
Physics System
let physics = new;
// Create a dynamic body
entity.add;
entity.add;
// Update physics in game loop
physics.update;
let collisions = physics.detect_collisions;
physics.resolve_collisions;
// Apply forces
if let Some = entity.
Particle System
let mut particle_system = new;
// Create particle emitter
let emitter_id = world.spawn;
if let Some = world.entity_mut
// Update particles
particle_system.update;
Camera System
let mut camera = new;
// Follow an entity
camera.follow;
camera.follow_speed = 5.0;
// Zoom
camera.zoom;
// Camera shake
camera.shake; // intensity, duration
// Update camera
camera.update;
Audio System
let mut audio = new.unwrap;
// Load sounds
audio.load_sound.unwrap;
audio.load_sound.unwrap;
// Play sound effects
audio.play_sound.unwrap;
audio.play_sound_with_volume.unwrap;
// Background music
audio.play_music.unwrap;
audio.set_music_volume;
audio.pause_music;
audio.resume_music;
UI System
// Create a health bar
let health_bar = world.spawn;
if let Some = world.entity_mut
// Create a button
let button = world.spawn;
if let Some = world.entity_mut
🎨 Asset Loading
Textures
// Load from file
let texture = load.unwrap;
// Load from bytes (embedded)
let bytes = include_bytes!;
let texture = from_bytes.unwrap;
// Sprite sheets
let spritesheet = new;
let = spritesheet.get_uv_coords;
Audio
Supported formats: WAV, OGG, MP3, FLAC
audio.load_sound.unwrap;
audio.play_sound.unwrap;
🛠️ Building from Source
# Clone the repository
# Build the library
# Run examples
# Run tests
📦 Dependencies
Shadow Engine 2D is built on top of excellent Rust crates:
- winit - Cross-platform window creation
- wgpu - Modern graphics API (Vulkan, DirectX 12, Metal)
- glam - Fast math library
- rodio - Audio playback
- image - Image loading and processing
- glyphon - Text rendering
🎯 Roadmap
- Entity Component System
- GPU Rendering
- Physics System
- Particle System
- Camera System
- UI System
- Audio System
- Texture Loading
- Animation System
- Tilemap/Level Editor
- Networking (Multiplayer)
- Save/Load System
- Scene Management
- Asset Hot Reloading
- Mobile Support (iOS/Android)
- WebAssembly Support
📄 License
Shadow Engine 2D is licensed under the MIT License - see the LICENSE file for details.
👨💻 About the Creator
Darian Jones - Age 14, Rust Developer
Shadow Engine 2D was created as a passion project to make 2D game development in Rust accessible, powerful, and fun. Inspired by Shadow the Axolotl, this engine aims to provide a clean API without sacrificing performance or features.
- 🦀 Rust enthusiast
- 🦎 Exotic animal lover (especially axolotls!)
- 🍕 Food adventurer
- 🎮 Game engine developer
"Building games should be fun, fast, and safe. That's why Shadow Engine 2D exists!"
🙏 Acknowledgments
- Shadow the Axolotl 🦎 - Official mascot and inspiration
- The Rust community for amazing libraries and support
- All contributors and users of Shadow Engine 2D
📞 Contact & Community
- Website: shadowengine2d.dev
- Documentation: docs.rs/shadow_engine_2d
- GitHub: github.com/shadowteamengine-design
Made with 🖤 by Darian Jones
Powered by Shadow the Axolotl 🦎
⭐ Star us on GitHub if you like Shadow Engine 2D!