22 July 2012

How To Make And Play Snake Game In HTML5

Hello friends today i am posting a new tutorial on HTML5.We all like playing games.What you say if i teach you how to make a game.

So today i make a SNAKE game in HTML5+JAVASCRIPT


Hope you enjoy this.
Before making game Enjoyy the live Demo.


LIVE DEMO                 DOWNLOAD CODE



So what we have to do copy and paste the below code in notepad or another editor you used and save as .html and enjoyy the game.In this gaame you can also control the speed of snake by editing the set_game_speed function.and this game also gives you scores.Which depends upon the length of the snake.

In this code contains play_game,rand_frog,and set_game_speed function.
If you want to change the game theme, modify these five variable values such as level,rect_wrect_hinc_score and snake_color.
What does the function does in this code.

play_game:Used to start the game.

rand_fog:Used to randomly select the snake in playing are.

set_game_speed:Used to set the speed of snake.

No comments:

Top 9 Simple Things Every Computer User Should Know How to Do

10.     We all know we should back up our computers, but it’s always one of those things that you’ll set up “one day”.  Setting up a ba...