This is an online Snake game built using Django for the backend and HTML, CSS, and JavaScript for the frontend. The game is hosted at snake.keyneswu.top.
- Classic Snake game mechanics.
- Score submission and leaderboard.
- "Play Again" functionality
-
Clone the repository:
git clone https://github.com/yourusername/online-snake-game.git cd online-snake-game
-
Set up the environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
or
conda create -n snake conda activate snake conda install django
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser to access the Django admin:
python manage.py createsuperuser
-
Collect static files:
python manage.py collectstatic
-
Run the development server:
python manage.py runserver
-
Open your web browser and navigate to
https://127.0.0.1:8000
to see the game in action.