Scriptocalypse is a zombie survival game set in the year 2666. The objective is to survive waves of zombies for 3 minutes. Your score is based on how many zombies you eliminate.
Tech Stack: HTML5, CSS3, Pure JavaScript (no external dependencies)
- Arrow Keys ↑↓: Move player vertically
- Spacebar: Shoot
- ESC / P: Pause game
- Goal: Survive 3 minutes and eliminate zombies to maximize your score
- 3 lives
- Power-ups available
- Progressive difficulty
- 1 life only
- 50% faster enemies
- No power-ups
- Separate high score
- 3 game states (intro, game, game over)
- Win condition (survive 3 minutes) with victory screen
- Lose condition (run out of lives)
- Pause functionality (ESC/P key)
- High score system with localStorage
- Normal Zombie - Standard speed, 1 HP
- Fast Zombie (green) - Higher speed, 1 HP
- Tank Zombie (larger) - Slower, 2 HP
- Boss - Spawns every 60 seconds, 10 HP with health bar
- Extra Life (green +) - Adds 1 life
- Triple Shot (yellow 3) - 3 bullets for 10 seconds
- Shield (blue S) - Invincibility for 5 seconds
- Enemy spawn rate increases over time
- Enemy speed increases over time
- Sound effects (shoot, damage, game over)
- Background music during gameplay
- Volume control
- Player flash on damage
- Enemy death animations
- Shield glow effect
- Touch controls (auto-detected)
- Responsive design
INTRO → GAME → VICTORY
↓ ↓
GAME_OVER │
↑ │
└────────┘ (restart)
| Function | Description |
|---|---|
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 |
├── index.html # HTML structure
├── script.js # Game logic (~800 lines)
├── style.css # Styles (~470 lines)
├── images/ # Sprites and backgrounds
└── sounds/ # Sound effects and music
Contributions are welcome! Feel free to open issues or pull requests.