- 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).
- 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.
- 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.
-
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.
Game Over Logic:
- Rendering: The game uses an HTML canvas for rendering. Each frame draws the player, zombies, bullets, and UI elements like lives and weapon status.
- Random Utilities: Several helper functions (randInt, randFloat, and rand) generate random values for positions, speeds, and attributes of zombies and the environment
-
Notifications
You must be signed in to change notification settings - Fork 0
TiKkU12345/ZOM-GAME
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published