Snake

Introduction

Snake is one of the most iconic video games in history, originating from the 1976 arcade game Blockade. This JavaScript version brings the classic gameplay to your browser with smooth controls and modern aesthetics. You control a growing snake that moves around a grid, eating food to grow longer while avoiding collisions with walls and your own tail. The game's simple concept and progressively challenging gameplay have made it a timeless classic.

Gameplay

Guide your snake around the game board to eat food items that appear randomly. Each piece of food makes your snake grow longer, increasing the challenge as you must avoid hitting your own body. The snake moves continuously in one direction until you change its course. As your snake grows longer, navigating the board becomes increasingly difficult. The game ends if you hit a wall or collide with your own body. Your score increases with each food item eaten, and the goal is to achieve the highest possible score before the inevitable collision.

Controls

Use the Arrow Keys (Up, Down, Left, Right) to change the snake's direction. On mobile devices, swipe in the desired direction or use the on-screen touch controls. Press Spacebar to pause and resume the game. The snake cannot reverse direction - you cannot go directly from moving up to moving down, or left to right. Plan your moves ahead to avoid trapping yourself.

Copyrights

source code