iambj / snake

Good old classic snake!

Repository from Github https://github.comiambj/snakeRepository from Github https://github.comiambj/snake

Canvas Snake

I created this good old classic to play with HTML5 canvas a bit and get some practice creating a game.


TODO:

    [x] - Add scoring
    [x] - Add collisions on walls and snake
    [x] - Difficulties
    [x] - Fix apple positions and create them as instances.
    [x] - Multiple apple support
    [ ] - Refactor the snake and canvas object to their own classes
    [ ] - Abstract out as classes
    [x] - Standardize the size of the canvas (edges aren't a full gridSize)
    [x] - Apples spawn off canvas because of above
    [ ] - Random snake start
    [ ] - End a crash before going off stage (check ahead a grid space, if snake is only 1 cell, it looks like it goes off the screen)
    [ ] - Game over and reset
    [ ] - Themes
    [ ] - Munch sound 🙂 https://freesound.org/people/PapercutterJohn/sounds/318608/
    [ ] - Adjust canvas size on resize

BUG:
    [ ] - Some weirdness when turning. Snake head turns after already moving an additional block forward.

Demo

https://iambj.github.io/snake/

About

Good old classic snake!


Languages

Language:JavaScript 88.6%Language:HTML 11.4%