Skip to content
🐍 a simple version of retro snake in childhood,you can choose speed or wall as an obstacle 💭 模拟简易版贪吃蛇
JavaScript CSS HTML
Branch: master
Clone or download
Latest commit 214ed86 Sep 27, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
css update project structure Jan 20, 2018
js chnage Sep 27, 2018
.gitattributes Initial commit Dec 1, 2017
_config.yml Set theme jekyll-theme-time-machine Dec 1, 2017

Retro Snaker

pure navtive JavaScript combined with canvas,no dependence

The results are shown as follows:



How to use

You can do an attempt in my blog laboratory :

You can also clone this project and try it locally

git clone

or use the .zip

And the structure about this project is very simple,you just need to open the .html to have a try

│   index.html
│   │   main.css
    │   snake.js

I think the focus is on the idea of the program, I do not compress,you can see the original JS

About settings

Main Function:

  1. you can choose wall as an obstacle 「on」or「off」

  2. you can choose speed the moving speed of the snake 「slow」「normal」or「fast」

And the other rules are the same as the snake rules played in childhood

Such as:

  • You can eat your body or hit the wall to kill yourself (under the wall model)

  • According to how much food you eat to increase the length of the snake

You can’t perform that action at this time.