Game Dev Tools
Reusable Bevy game development utilities for 2D games
A collection of battle-tested game development utilities extracted from real game projects. Built for Bevy 0.17+.
✨ Features
- 🎥 Camera Effects: Screen shake, bloom, cinematic controls
- 💥 Particle System: Explosions, smoke, trails, and custom effects
- 🎵 Audio Management: Easy sound effects and music playback
- 🌌 Parallax Backgrounds: Multi-layer scrolling with automatic wrapping
- ❤️ Health System: Health, lives, and damage tracking
- 🎮 Input Utilities: Mouse world position tracking, fullscreen toggle
- 🚀 Physics Helpers: Space physics, velocity system, distance-based cleanup
🚀 Quick Start
Add to your Cargo.toml:
[]
= "0.1"
= "0.17"
Basic setup:
use *;
use *;
📚 Feature Guide
🎥 Screen Shake
Add dramatic impact to your game with configurable screen shake:
💥 Particle System
Create stunning visual effects:
Preset particles:
Particle::explosion_spark()- Bright explosion sparksParticle::smoke()- Expanding smoke cloudsParticleBehavior::explosion()- Gravity + dragParticleBehavior::floating()- Gentle floating debris
🎵 Audio System
Simple audio management with volume controls:
Built-in keyboard controls:
M- Toggle mute+/-- Adjust volume
🌌 Parallax Backgrounds
Multi-layer scrolling backgrounds that follow the camera:
❤️ Health System
Track health and lives for any entity:
🚀 Physics System
Space-like physics with momentum and drag:
// Velocity is automatically applied by the plugin
🎮 Input Utilities
Get mouse position in world coordinates:
Built-in keyboard shortcuts:
F11- Toggle fullscreenF12- Show FPS (requiresFrameTimeDiagnosticsPlugin)
🛠️ Configuration
Customize the framework for your game:
📦 What's Included
Components
Health- Health tracking with damage/healLives- Life systemVelocity- 2D velocitySpacePhysics- Space-like movement with momentumProjectile- Projectile with damage and optional lifetimeParticle- Animated particle with color/size interpolationParticleB behavior- Gravity, drag, and rotation for particlesParallaxLayer- Parallax scrolling layerCinematicCamera- Camera with effects
Resources
ScreenShake- Global screen shake controllerAudioSettings- Master, SFX, and music volumeAudioState- Current audio stateMouseWorldPos- Mouse position in world spaceCameraMovement- Camera velocity trackingGameDevConfig- Framework configuration
Systems
All systems are automatically added by GameDevToolsPlugin:
unified_camera_shake_system- Applies screen shakeupdate_particles- Updates particle effectsapply_velocity- Applies velocity to transformsupdate_camera_movement- Tracks camera velocityupdate_parallax_layers- Updates parallax scrollingupdate_mouse_world_position- Updates mouse world positiontoggle_fullscreen- F11 to toggle fullscreenaudio_controls- M to mute, +/- for volume
🎯 Examples
Run examples with:
See the examples/ directory for:
basic_setup.rs- Minimal setup with screen shakeparticles.rs- Particle system showcaseparallax.rs- Parallax background demophysics.rs- Space physics demo
🤝 Contributing
Contributions welcome! This library is extracted from real game projects and is designed to be practical and reusable.
📄 License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
🎮 Built With This
Share your game if you use this library! Open an issue to add yours here.
🔗 Links
Note: This library requires Bevy 0.17 or later.