666df8f892eb8122304f03dda3e9e67c735de78a
- Added a new WGSL shader for background rendering with volumetric fog effects. - Created components for game entities including Circle, Velocity, Explosion, and ChainReaction. - Introduced game state management with GameState enum and LevelState resource. - Implemented event system for explosion requests and circle destruction notifications. - Developed plugins for game logic, input handling, movement, reactions, scoring, and UI. - Configured game settings through GameConfig resource with adjustable parameters. - Enhanced UI with configuration options and game over screens. - Integrated spatial grid for efficient collision detection and explosion handling.
Chain Reaction
A minimalist physics-based puzzle game where strategic clicks create explosive chain reactions. Clear the screen with one perfect click!
About
Chain Reaction is a fast-paced arcade game built with Rust and Bevy. Players must strategically place a single explosion to destroy floating circles, triggering chain reactions that clear the entire screen. Each game is a 30-second challenge to maximize your score through clever positioning and timing.
Features
- One-Click Gameplay: Simple to learn, challenging to master
- Chain Reaction Mechanics: Destroyed circles trigger secondary explosions
- Dynamic Scoring: Multiplier system rewards consecutive chain reactions
- Minimalist Design: Beautiful pastel color palette with smooth animations
- Physics Simulation: Realistic circle movement and collision detection
- Performance Optimized: Handles 500+ circles at 60fps
Getting Started
Prerequisites
- Rust (1.70.0 or later)
- Cargo (comes with Rust)
Installation
# Clone the repository
git clone https://github.com/yourusername/chain-reaction.git
cd chain-reaction
# Build and run
cargo run --release
Development Build
# Run in debug mode with faster compile times
cargo run
How to Play
- Objective: Clear all circles from the screen before time runs out (30 seconds)
- Click anywhere to create an explosion
- Strategy: Position your click to maximize the chain reaction
- Scoring:
- Base points for each destroyed circle
- Multiplier increases with consecutive chain reactions (1x → 2x → 4x → 8x...)
- Bonus points for clearing all circles in a single click
Controls
- Left Mouse Button: Create explosion
Game Mechanics
Circles
- Random sizes (10-50px radius)
- Pastel color palette
- Variable transparency (0.3-1.0)
- Smooth physics-based movement
Explosions
- Initial explosion radius: 100px
- Chain reaction delay: 0.1s
- Secondary explosions: 50% smaller radius
- Cascading destruction creates satisfying combos
Technical Details
Built With:
- Rust - Systems programming language
- Bevy - Data-driven game engine
- Spatial partitioning for efficient collision detection
Roadmap
See GDD.md for the complete game design document.
Potential Enhancements
- Power-ups (larger explosions, time freeze)
- Different circle types (fast/slow, bonus circles)
- High score persistence
- Multiple difficulty levels
- Sound effects and music
Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
License
See LICENSE for details.
Acknowledgments
- Built with Bevy Engine
Enjoy creating explosive chain reactions!
Languages
Rust
85.3%
WGSL
14.7%