Skip to content

browser-based zombie survival game built with vanilla JavaScript, HTML5, and CSS. Players survive waves of zombies for 3 minutes while maximizing their score. No build tools, npm, or external dependencies.

License

Notifications You must be signed in to change notification settings

richardnixondev/Scriptocalypse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scriptocalypse

Play Now

Description

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)

How to Play

  • Arrow Keys ↑↓: Move player vertically
  • Spacebar: Shoot
  • ESC / P: Pause game
  • Goal: Survive 3 minutes and eliminate zombies to maximize your score

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

  • 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

Enemies

  • 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

Power-ups

  • Extra Life (green +) - Adds 1 life
  • Triple Shot (yellow 3) - 3 bullets for 10 seconds
  • Shield (blue S) - Invincibility for 5 seconds

Progressive Difficulty

  • Enemy spawn rate increases over time
  • Enemy speed increases over time

Audio & Visual

  • Sound effects (shoot, damage, game over)
  • Background music during gameplay
  • Volume control
  • Player flash on damage
  • Enemy death animations
  • Shield glow effect

Mobile Support

  • Touch controls (auto-detected)
  • Responsive design

Architecture

Game States

INTRO → GAME → VICTORY
         ↓        ↓
      GAME_OVER   │
         ↑        │
         └────────┘ (restart)

Core Functions

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

File Structure

├── index.html      # HTML structure
├── script.js       # Game logic (~800 lines)
├── style.css       # Styles (~470 lines)
├── images/         # Sprites and backgrounds
└── sounds/         # Sound effects and music

Contributing

Contributions are welcome! Feel free to open issues or pull requests.

Links

About

browser-based zombie survival game built with vanilla JavaScript, HTML5, and CSS. Players survive waves of zombies for 3 minutes while maximizing their score. No build tools, npm, or external dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •