Skip to content

Bottlecaps4/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake Project

I've recreated the classic snake game we all know and love.

Introduction

The project is part of The Odin Project's Javascript curriculum. The objective of the exercise is to recreate the classic acrcade game in which a snake object moves around the board eating food. With each piece of food the snake grows longer. The game is lost if the snake touches the edge of the board or gets so big it runs into itself.

Built with

  • HTML5
  • CSS3
  • JavaScript
  • jQuery

HTML-5

I've used the 'canvas' element to create a drawing platform on which to create the game. This is my first real use of the canvas element.

CSS

The CSS styling is based on the legendary Nokia 3310. This was my first ever phone and my first introduction to the snake game. I'm sure the phone still has 10% battery in my drawer somewhere.

JavaScript/jQuery

The entire gameplay of the snake game has been written in JS/jQuery.

How to play

Use the phone's keypad or else the arrow keys on your keyboard to move the snake.

Things to do

  • Create pop-ups when the game ends displaying score and allowing users to choose if they want to replay or not

  • Increase snake speed slightly with every food eaten.

  • Improve randomization of food location so as to avoid the snake body

  • Add function to the display keypad (up, down, left, right = 2, 8 4, 6)

Releases

No releases published

Packages

No packages published