This is a classic Snake game implemented using HTML, CSS, and JavaScript. The majority of the game logic is contained within the JavaScript file.
The game leverages requestAnimationFrame
to run the game engine loop. This method produces higher quality animation by eliminating flicker and shear that can occur when using setTimeout
or setInterval
.
More on this: Check StackOverFlow
- Clone or download the repository to your local machine.
- Open
index.html
in a web browser to start playing the game. - Use arrow keys or swipe gestures to control the snake.
- Eat food items to grow the snake and earn points.
- Avoid collisions with walls and the snake's own tail.
- Try to achieve the highest score possible!
"Keep calm and hiss on!"