Check out the live demo of the Snake Game: Snake Game Demo
A modern, responsive Snake game built with Svelte and Vite, featuring a shared online leaderboard powered by Supabase.
Clone the repository
git clone <repository-url>
cd SnakeGame
Install dependencies
npm install
Start the development server
npm run dev
Open your browser
Navigate to http://localhost:5173
and start playing!
The game works offline by default, but to enable the shared leaderboard:
SUPABASE_SETUP.md
src/lib/config.js
src/
āāā lib/
ā āāā SnakeGame.svelte # Main game component
ā āāā config.js # Game and API configuration
ā āāā supabase.js # Supabase client and API
āāā App.svelte # Root component
āāā main.js # Application entry point
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
The game implements several security measures:
For more details, see the security section in SUPABASE_SETUP.md
.
Feel free to submit issues and pull requests to improve the game!
MIT License - feel free to use this project for learning or building your own games.