Welcome to Retro Snake Game, a nostalgic revival of the classic Snake game! Built with React and inspired by LeetCode's "353. Design Snake Game" problem,.
🕹️ Live Demo
- 🗺️ Multiple map options for varied gameplay
- 📏 Adjustable board sizes to suit your style
- 🎮 On-screen arrow buttons for easy mobile play
- 🚀 Dynamic speed increases as your snake grows
- 📊 Local storage for high scores
useLocalStorage.ts
: Keeps your high scores safe and sounduseQueue.ts
: Manages the snake's movement with queue magicuseRAF.ts
: Ensures buttery-smooth animationsuseRadioState.ts
: Handles those pesky radio button states
- Score Context: Keeps tabs on your growing score
- Game Config Context: Manages all your game settings in one place
# Clone
git clone https://github.com/real-devance/retro-snake-react.git
# Dive into the project
cd retro-snake-react
# Install
npm install
# run
npm run dev
- ⚛️ React
- 📜 TypeScript
- 🎨 Tailwind CSS
- 🎮 HTML5 Canvas
- ⚡ Vite
- 🧪 Vitest