Skip to content

HK116/RetroSnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Retro Snake Game

A classic retro-style snake game built with HTML, CSS, and JavaScript. Navigate the snake using arrow keys, eat the food to grow longer, and try not to hit the walls or your own tail. Press the Spacebar to start a new game! 🎮

Features 🚀

  • Game Controls: Arrow keys to control the snake’s direction. ⬆️⬇️⬅️➡️
  • Scorekeeping: Keeps track of the current score and high score. 🏆
  • Game Speed: The snake moves faster as you eat more food. 🐍💨
  • Game Reset: Automatically resets the game when a collision occurs (either with the walls or the snake’s body). 💥

Technologies Used 💻

  • HTML: Structure of the web page and game board.
  • CSS: Styling of the game, including the layout and visuals (game borders, snake, food).
  • JavaScript: Game logic, including movement, collision detection, score updating, and speed adjustment.

How to Play 🎮

  1. Clone this repository or download the files to your local machine.
  2. Open index.html in your browser.
  3. Press Spacebar to start the game. ⏳
  4. Use the arrow keys (Up, Down, Left, Right) to move the snake. ⬆️⬇️⬅️➡️
  5. Try to eat the food (the snake grows longer). 🍏
  6. Avoid hitting the walls or your own snake's body. 🚧
  7. Your score is displayed at the top of the screen. The high score is saved for each session. 📊

File Structure 📂

  • index.html: The main HTML file that structures the game and includes all necessary elements.
  • style.css: The CSS file responsible for the layout and styling of the game board, snake, and food.
  • script.js: The JavaScript file that controls the game logic, movement, scoring, and interactions.
  • snake-logo.png: Image for the game logo displayed at the start screen.

Screenshots 🖼️

Retro Snake Game Screenshot

Future Improvements 🚧

  • Add sound effects for actions like eating food and colliding. 🎧
  • Implement different difficulty levels. ⚙️
  • Add a start screen with more game instructions. 📝

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors