Play the Game!
Cat Survival Game is a browser-based game where the player controls a cat using the keyboard. The goal is to survive as long as possible by collecting items to increase the score while avoiding obstacles. As the game progresses, it becomes more challenging.
- Move the cat using arrow keys
- Spawn obstacles and collectible items at random positions
- Collision detection between the cat and game objects
- Score system that increases by collecting yarn
- Cat grows bigger when collecting pizza, increasing difficulty
- Game over when colliding with a cactus
- Sound effects for actions and events
- High score saved using localStorage
- Restart game without page reload
- Increase game speed over time
- Add levels or difficulty indicators
- Add mute / sound toggle button
- Mobile controls support
- Different cat skins or themes
- HTML
- CSS
- JavaScript (ES6)
- DOM Manipulation
- Local Storage
- Audio API
- Start Screen: Shows game instructions and start button
- Game Screen: Main gameplay view
- Game Over Screen: Displays final score, high score, and restart button
- DOM selection and game state variables
- Event listeners for keyboard and buttons
- Game loop logic
- Collision handling
- Spawning and despawning items
- Score and high-score logic
- Game start, game over, and restart logic
- Cat class
- Properties: position, size, movement states
- Methods:
moving()
- Cactus class
- Properties: position, size, DOM element
- Methods:
movingCactus()
- Pizza class
- Properties: position, size, DOM element
- Methods:
movingPizza()
- YarnBall class
- Properties: position, size, DOM element
- Methods:
movingYarn()
[https://drive.google.com/file/d/16v8rzzdLq5BJSAtWatznCZiemJX-gscr/view]