/django-dots-and-boxes

A online Dots & Boxes game with Django and WebSocket Programming (Django Channels)

Primary LanguagePython

Django Dots & Boxes Online Game

Dots & Boxes Online Game using python/django for backend and real-time communication using websockets and django-channels package.

Preview

Home Page Profile Page Game Room Board Game Game History

Features

  • User authentication(Sign up and sign in).
  • Single-player Game
  • Two-player Game using Web-socket
  • Custom User Profile
  • Log Users' Activities

Installation

  • Make sure Python is installed.

  • Clone the repository and change your directory to django-dots-and-boxes-local.

  • Create and Activate a Virtual Environment:

    • Linux/mac:
      $ pip install virtualenv
      $ virtualenv [YourVenvName]
      $ source [YourVenvName]/bin/activate
    • Windows:
      pip install virtualenv
      python -m venv [YourVenvName]
      [YourVenvName]/Scripts/activate

  • Install required packages:

pip install -r requirements.txt

Usage

  • migrate database changes:
python manage.py makemigrations
python manage.py migrate
  • Create a super user:
python manage.py createsuperuser
  • Run the application:
python manage.py runserver
  • Open the app at localhost:8000 or http://127.0.0.1:8000/