Skip to content

manjunath-satyamurthy/game-server-demo-Tic-tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

game-server-demo-Tic-tac-Toe

A very simple multiplayer game server demonstration. Tic Tac Toe

Setup instructions:

step 1: Clone the git repo.

git clone https://github.com/manjunath-satyamurthy/game-server-demo-Tic-tac-Toe-.git

step 2: Ensure you have python 2.7 and virtualenv installed

step 3: install virtual environment in the gameserver/ folder

cd game-server-demo-Tic-tac-Toe-/gameserver
virtualenv env

step 4: Activate environment:

. env/bin/activate

step 5: install requirements

pip install -r app/requirements.txt

step 6: Create users

python app/manage.py migrate
python app/manage.py createsuperuser

Follow the instructions to create user and repeat step 6 for multiple users

step 7: Start server

python app/manage.py runserver

step 7: Now open the url localhost:8000 in 2 different browser windows and login in with the different user account just created. Do not use 127.0.0.1 as there will be cross origin request issue.

Architecture

Game Server Architecture

The above picture describes the proposed architecture. Using django server as an http server, django-channels for websockets server, redis as a caching layer, celery for asynchronous tasks.

The above architecture can be modified a little bit to use token based authentication systems by additionally using DjangoRESTFramework(DRF). DRF integrates with Django and help developers create REST api's easily.

Additional Note: This project uses python 2.7. It is advised to use python 3+ and hence have to update Django to version 2.0 and use the latest channels package for websockets.

Please go through the documentations of the technologies used. Django, DjangoRESTFramework, Channels, Redispy, Celery.

Screenshot

Screenshot

If you found this interesting and need any further help, feel free to contact me at pass2rahul@gmail.com

About

A very simple multiplayer game server demonstration. Tic Tac Toe

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published