Update README with implemented features

This commit is contained in:
Richard Nixon 2026-01-24 21:52:34 +00:00
parent 262a35bc80
commit fa91d71873

103
README.md
View file

@ -10,64 +10,89 @@ Scriptocalypse is a zombie survival game set in the year 2666. The objective is
## How to Play
- **Arrow Keys ↑↓**: Move player vertically
- **Spacebar**: Shoot
- **Goal**: Survive as long as possible and eliminate zombies to increase your score
- **ESC / P**: Pause game
- **Goal**: Survive 3 minutes and eliminate zombies to maximize your score
## MVP - (Minimum Scope)
- [x] 3 game states (intro screen, game screen, game over screen)
- [x] Start and restart functionality
## Game Modes
### Normal Mode
- 3 lives
- Power-ups available
- Progressive difficulty
### Hardcore Mode
- 1 life only
- 50% faster enemies
- No power-ups
- Separate high score
## Features
### Core Gameplay
- [x] 3 game states (intro, game, game over)
- [x] Win condition (survive 3 minutes) with victory screen
- [x] Lose condition (run out of lives)
- [x] GitHub versioning
- [x] Pause functionality (ESC/P key)
- [x] High score system with localStorage
### Enemies
- [x] **Normal Zombie** - Standard speed, 1 HP
- [x] **Fast Zombie** (green) - Higher speed, 1 HP
- [x] **Tank Zombie** (larger) - Slower, 2 HP
- [x] **Boss** - Spawns every 60 seconds, 10 HP with health bar
### Power-ups
- [x] **Extra Life** (green +) - Adds 1 life
- [x] **Triple Shot** (yellow 3) - 3 bullets for 10 seconds
- [x] **Shield** (blue S) - Invincibility for 5 seconds
### Progressive Difficulty
- Enemy spawn rate increases over time
- Enemy speed increases over time
### Audio & Visual
- [x] Sound effects (shoot, damage, game over)
- [x] Background music during gameplay
- [x] Volume control
- [x] Player flash on damage
- [x] Enemy death animations
- [x] Shield glow effect
## Planned Improvements
### Bug Fixes
- [ ] Implement win condition (survive 3 minutes)
- [ ] Fix memory leak with intervals on restart
- [ ] Fix duplicate event listeners on restart
- [ ] Add victory screen
### New Features
- [ ] **Progressive difficulty** - Enemies spawn faster/move quicker over time
- [ ] **Hardcore mode** - Fewer lives, faster enemies
- [ ] **Enemy variety** - Different zombie types with varying speeds and health
- [ ] **Boss fights** - Boss appears every minute survived
- [ ] **Background music** - Use music.mp3 during gameplay
- [ ] **High score** - Save records with localStorage
- [ ] **Pause** - Pause game with ESC or P key
- [ ] **Power-ups** - Extra life, triple shot, temporary shield
- [ ] **Visual feedback** - Flash on damage, zombie death animations
- [ ] **Mobile support** - Touch controls for mobile devices
### Mobile Support
- [x] Touch controls (auto-detected)
- [x] Responsive design
## Architecture
### Game States
```
INTRO → GAME → GAME_OVER
↑ ↓
└─────────┘ (restart)
INTRO → GAME → VICTORY
↓ ↓
GAME_OVER │
↑ │
└────────┘ (restart)
```
### Core Functions
| Function | Description |
|----------|-------------|
| `introPage()` | Sets up intro screen |
| `startGame()` | Initializes game, resets variables |
| `timeGame()` | Updates game timer |
| `spawnPlayer()` | Creates player and starts collision detection |
| `playerMove()` | Handles keyboard input |
| `shoot()` | Creates bullet and manages movement |
| `spawnEnemy()` | Recursively spawns enemies |
| `checkCollision()` | Detects bullet-enemy collision (AABB) |
| `checkCollisionEnemy()` | Detects player-enemy collision (AABB) |
| `endGame()` | Ends game and displays score |
| `initGame()` | Initializes game, resets state |
| `resetGame()` | Cleans up intervals and game elements |
| `timeGame()` | Updates timer and checks win/boss spawn |
| `spawnPlayer()` | Creates player and collision detection |
| `shoot()` | Creates bullet(s) based on power-ups |
| `spawnEnemy()` | Spawns enemies with random types |
| `spawnBoss()` | Spawns boss with health bar |
| `spawnPowerUp()` | Spawns random power-ups |
| `togglePause()` | Pauses/resumes game |
| `victoryGame()` | Shows victory screen |
| `endGame()` | Shows game over screen |
### File Structure
```
├── index.html # HTML structure
├── script.js # Game logic
├── style.css # Styles
├── script.js # Game logic (~800 lines)
├── style.css # Styles (~470 lines)
├── images/ # Sprites and backgrounds
└── sounds/ # Sound effects and music
```