Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 1.24 KB

README.md

File metadata and controls

17 lines (17 loc) · 1.24 KB

ZOM-GAME

  1. Player: The player object has properties like position (x, y), speed, weapon types, and current weapon settings. Includes methods for firing bullets (fire round), handling weapon-specific properties (apply weapon properties), and displaying on-screen text (say).
  2. Weapons: The player can use various weapons like revolvers, shotguns, miniguns, and laser guns. Each weapon has unique properties, such as bullet size, fire rate, and magazine size, which are applied dynamically.
  3. Zombies: Zombies are generated as objects with attributes like position, size, speed, and colour. Special zombies have unique behaviours, such as increasing the player's lives or changing their weapon when defeated.
  4.  Game Over Logic:
    
    The game ends when the player's lives drop below zero. A "YOU DIED!" message is displayed with the player's kill count, and the game prompts the user to restart by pressing ENTER.
  5. Rendering: The game uses an HTML canvas for rendering. Each frame draws the player, zombies, bullets, and UI elements like lives and weapon status.
  6. Random Utilities: Several helper functions (randInt, randFloat, and rand) generate random values for positions, speeds, and attributes of zombies and the environment