Inspiration

When I was a child I really enjoyed playing Nokia's snake game. So this was heavily inspired by that. I just played around with the aesthetic to get a Tron and retro feel. To increase the difficulty I added an enemy snake.

What it does

In singleplayer mode use the 'W' 'A' 'S' 'D' keys on the keyboard to control the player/blue snake to eat food (orange square). The more food you eat without dying the higher your score. You will die if you hit the enemy snake or you hit yourself. In multiplayer mode another player can use the arrow keys on the keyboard to control the enemy snake.

How we built it

Pure and simple Javascript with basic HTML and CSS.

Challenges we ran into

There are lots of tutorials online teaching people how to make Javascript snake games. The added challenge for me was to create an autonomous enemy snake in singleplayer mode. The hardest part was to get multiplayer mode working to and make sure the event listener passed the event to the right functions.

Accomplishments that we're proud of

First Javascript and snake game I ever made!

What we learned

Using Switch and Case in Javascript and you need multiple event listeners for each function it is passing events into.

What's next for Javascript Snake Game!

Refining some of the graphics: When food gets eaten the blue snake will have a little bulge. Adding some animation for when the snake eats food.

Built With

Share this project:

Updates