https://github.com/ukhang/snake-game
Experience the nostalgia of the classic Snake game, crafted from the ground up, showcasing pure coding ingenuity.
https://github.com/ukhang/snake-game
css3 es6 html5 html5-audio-tag html5-game js js-events typescript typescript-game
Last synced: about 2 months ago
JSON representation
Experience the nostalgia of the classic Snake game, crafted from the ground up, showcasing pure coding ingenuity.
- Host: GitHub
- URL: https://github.com/ukhang/snake-game
- Owner: Ukhang
- Created: 2022-04-12T17:33:16.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-28T17:37:54.000Z (5 months ago)
- Last Synced: 2025-03-30T17:06:59.660Z (3 months ago)
- Topics: css3, es6, html5, html5-audio-tag, html5-game, js, js-events, typescript, typescript-game
- Language: TypeScript
- Homepage: https://snake-game-omega-five-31.vercel.app/
- Size: 9.79 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Snake - Game 🐍
Experience the nostalgia of the classic Snake game, crafted from the ground up, showcasing pure coding ingenuity.
## Installation
Follow these steps to set up and run the game locally:
1. Clone the repository:
```bash
git clone https://github.com/Ukhang/snake-game.git
```
2. Navigate to the project directory:
```bash
cd snake-game
```
3. Install dependencies:
```bash
npm install
```
4. Start the development server:
```bash
npm run dev
```
5. Open the game in your browser at:
```
http://localhost:5173/
```## Directory Structure
```
|-- public
| |-- music
| |-- food.mp3
| |-- gameover.mp3
| |-- move.mp3
| |-- music.mp3
|-- src
|-- assets
| |-- styles.css
|-- scripts
|-- audio.ts
|-- food.ts
|-- game.ts
|-- snake.ts
|-- ui.ts
```## Development
- **Vite Configuration**: The project uses Vite for fast development and optimized builds.
```javascript
import { defineConfig } from "vite";export default defineConfig({
root: "src",
build: {
outDir: "../dist",
assetsDir: "assets",
},
});
```## Contact
For any queries or suggestions, feel free to reach out:
- Email: [[email protected]]([email protected])