A real-time battle simulation built with the Bevy game engine in Rust, demonstrating autonomous combat between 10,000 units with basic performance optimizations. Features objective-based gameplay with destructible uplink towers and dramatic sprite sheet explosion effects. The entire codebase was generated with Claude Sonnet 4.
- Massive Scale Combat: 10,000 autonomous units (5,000 vs 5,000) with real-time combat simulation
- Objective-Based Gameplay: Destroy enemy uplink tower to win, tower destruction triggers cascade explosions
- Sprite Sheet Explosions: Custom shader-based 5×5 flipbook animation system with billboard rendering
- GPU Particle Effects: Bevy Hanabi particle system with debris, sparks, and smoke for enhanced explosions
- Squad Formation System: 50-unit squads with tactical formations and commander promotion
- Autonomous Combat: Units automatically target, fire, and engage enemies within range
- Spatial Partitioning: Grid-based collision optimization reducing complexity from O(n*m) to O(k)
- RTS Camera Controls: Smooth WASD movement, mouse rotation, and zoom controls
- Audio: 5 random laser sound variations with performance throttling
- Procedural Generation: Battle droids and uplink towers generated programmatically
- Rust (latest stable version)
- Git LFS (Large File Storage) - for texture and audio assets
- GPU with Vulkan support (recommended for best performance)
- Install Git LFS (if not already installed):
# Ubuntu/Debian
sudo apt-get install git-lfs
# macOS
brew install git-lfs
# Windows
# Download from https://git-lfs.github.com/- Clone the repository:
git clone https://github.com/ggand0/bevy-rts-sim.git
cd bevy-rts-sim
git lfs pull # Download LFS assets (explosion textures, audio)- Run the simulation:
For most systems:
cargo run --releaseAMD GPU Users (Linux): AMD GPUs on Linux require specific Vulkan loader settings to avoid segfaults:
VK_LOADER_DEBUG=error VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json cargo run --releaseDevelopment mode (faster compile times, lower performance):
cargo run
# Or for AMD GPU:
VK_LOADER_DEBUG=error VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json cargo run- WASD: Camera movement
- Right-Click + Drag: Rotate camera view
- Scroll Wheel: Zoom in/out
- F: Volley fire (all units fire simultaneously)
- G: Advance
- H: Retreat
- E (during gameplay): Destroy enemy tower (test cascade explosions)
- Y: Spawn test animated sprite explosion
- U: Spawn test custom shader explosion
- I: Spawn test solid color explosion
- docs/PROJECT_OVERVIEW.md: Complete architecture and systems reference
- docs/EXPLOSION_SYSTEM.md: Explosion system technical documentation
Game parameters can be modified in src/constants.rs.
This project is licensed under the MIT License - see the LICENSE file for details.
