- 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.
87 lines
2.4 KiB
Markdown
87 lines
2.4 KiB
Markdown
## **Chain Reaction - Game Design Document**
|
||
|
||
### **Core Concept**
|
||
|
||
Players click once to create a static explosion that destroys floating circles. The goal is to clear the screen with one strategic click, triggering chain reactions of destruction.
|
||
|
||
### **Gameplay Mechanics**
|
||
|
||
**Primary Mechanic**:
|
||
|
||
- Click anywhere to create explosion at position
|
||
- Explosions destroy circles within radius
|
||
- Destroyed circles trigger secondary explosions (chain reaction)
|
||
- Game ends when all circles are destroyed or time expires
|
||
|
||
**Circle Properties**:
|
||
|
||
- Random radii (10-50px)
|
||
- Random alpha transparency (0.3-1.0)
|
||
- Random colors (pastel palette)
|
||
- Physics: Smooth movement, collision detection
|
||
|
||
**Explosion Mechanics**:
|
||
|
||
- Static explosion at click position
|
||
- Explosion radius = 100px (tunable)
|
||
- Chain reaction: Destroyed circles explode after 0.1s delay
|
||
- Secondary explosions have 50% smaller radius
|
||
|
||
### **Core Loop**
|
||
|
||
**30-second gameplay cycle**:
|
||
|
||
- Start with 20-30 circles
|
||
- Player clicks strategically to create chain reactions
|
||
- Game ends when all circles destroyed OR time runs out (30 seconds)
|
||
- Win condition: Clear screen before time expires
|
||
|
||
### **Scoring System**
|
||
|
||
- Points = circles destroyed × multiplier
|
||
- Multiplier increases with consecutive chain reactions (1x, 2x, 4x, 8x...)
|
||
- Bonus points for clearing all circles in single click
|
||
|
||
### **Visual Design**
|
||
|
||
**Art Style**: Minimalist circles with:
|
||
|
||
- Pastel color palette (blues, purples, pinks)
|
||
- Alpha transparency (0.3-1.0)
|
||
- Smooth movement animations
|
||
- Particle effects on destruction
|
||
|
||
**UI Elements**:
|
||
|
||
- Score display
|
||
- Timer countdown
|
||
- "Chain Reaction" indicator
|
||
- Restart button
|
||
|
||
### **Technical Requirements**
|
||
|
||
**Spatial Partitioning**: Grid-based system for efficient collision detection
|
||
**Performance**: Handle 500+ circles with 60fps target
|
||
**Physics**: Smooth movement, realistic collision response
|
||
|
||
### **Game States**
|
||
|
||
1. **Menu**: Start screen, instructions, high score
|
||
2. **Playing**: Main gameplay loop
|
||
3. **GameOver**: Score display, restart option
|
||
|
||
### **Implementation Roadmap**
|
||
|
||
1. Basic window + circle generation (5min)
|
||
2. Click detection + explosion mechanics (10min)
|
||
3. Chain reaction logic + destruction system (15min)
|
||
4. Scoring + game states (10min)
|
||
5. Polish + optimization (20min)
|
||
|
||
### **Optional Enhancements**
|
||
|
||
- Power-ups (larger explosions, slower circles)
|
||
- Different circle types (fast/slow, larger/smaller)
|
||
- Time pressure mechanic
|
||
- High score system with local persistence
|