BLOCKDECK Jeep HorrorAll games

CLASSIC SNAKE

Canvas Snake Game

Play the Canvas Snake game online and steer a growing yellow snake toward red apples in a simple browser grid.

  • Snake
  • Arrow keys
  • Open source
View original project ↗
Canvas Snake gameplay screenshot
Game preview · source linked below
Canvas Snake game cover

CLASSIC SNAKE

Play Canvas Snake online

Steer a growing yellow snake toward red apples in a simple HTML5 Canvas grid.

Selecting Play connects to Ahsan Ayaz / HTML5 Canvas Snake, which may use its own storage or network services. Game privacy details.

CA
Canvas SnakeGitHub Pages · MIT

Game guide

How to play the Canvas Snake game

Canvas Snake is a small JavaScript and HTML game by Ahsan Ayaz. The snake begins in the center of a 20×20 grid with a tail length of four. Eating the red apple adds one point, lengthens the tail and moves the apple to a new random square.

Game typeClassic grid game
ControlsArrow keys
Project licenseMIT
  1. Choose a direction. Press an arrow key to start moving and to steer left, up, right or down.
  2. Collect the red apple. Move the head onto the apple. Each apple grows the tail by one segment and increases the displayed score.
  3. Avoid your own tail. If the head reaches a square occupied by the body, the game returns the snake to its starting length and resets the score.

Arrow-key controls and wraparound edges

This version does not treat the outer wall as a collision. Moving past the left edge returns the snake on the right, and the same wraparound behavior applies vertically. Hitting the tail resets the position, tail length and score.

HTML5 Canvas source and license

The embedded demo is served from Ahsan Ayaz's GitHub Pages project. Its public repository contains the small Canvas implementation and an MIT license. Blockdeck links to that project and describes only the behavior visible in its source.

Open the original Canvas Snake project ↗