Skip to content

C0d3N1nja97342/snake-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game

A pure front-end Snake game built with TypeScript and Canvas, bundled with Vite.

Features

  • Keyboard controls — Arrow keys or WASD to move, Space to pause/resume
  • Mobile support — On-screen D-pad for touch devices
  • Auto speed-up — Snake accelerates every 5 food items
  • High score — Persisted in localStorage
  • Visual polish — Gradient snake body, snake eyes, food glow, pause overlay

Quick Start

npm install
npm run dev

Open the URL shown by Vite (default http://localhost:5173).

Build

npm run build
npm run preview

How to Play

Key Action
↑ / W Move up
↓ / S Move down
← / A Move left
→ / D Move right
Space Pause / Resume

On mobile, use the on-screen directional buttons.

Tech Stack

  • TypeScript — Game logic and rendering
  • Canvas 2D — Graphics
  • Vite — Dev server and bundler
  • Zero runtime dependencies

About

Pure front-end Snake game built with TypeScript and Canvas

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors