Skip to content

uchennafokoye/JavaScript-Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classic Snake Game: 
Github Link: https://github.com/uchennafokoye/classic-snake-game-101
Heroku Live Link: https://classic-snake-game-101.herokuapp.com/

This features the classic snake game, where the snake eats the apple. Upon eating an apple, the snake grows longer and moves faster. If it however bumps into itself or against the wall, the user loses and the snake dies. The user controls the snake with the arrow keys: left, right, up and down. 

On the programming angle, I made use of HTML5 canvas and pure Vanilla JavaScript. I particularly appreciated this project as it allowed me to make use of some particular computer science projects such as Linked List. I had previously coded the game without this data structure. However, I faced a number of challenges including unexpected behaviors and performance issues. I decided to refactor the code making use of the well-known algorithm linked list to represent the snake creature. This got rid of the unwanted behavior and dramatically improved performance.  

Afterward, I added the ability for the user to see the top ten scores and how the player stacks up to its previous plays using a mysql and php. To see the full functionality with the top ten high scores/database connectivity, one would need to visit the live Heroku website (as that is where the database username and password is saved)

About

HTML5 Canvas Game Using Pure JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published