Skip to content

ruchi961/Linux-Multiplayer-Quiz

Repository files navigation

🟢 Linux-Multiplayer-Quiz

  • Operating System Innovative Project, python scripts written in the Linux Operating System with Socket communication and logic for a multiplayer Quiz game.
  • Using the concepts of Peer-to-Peer network and distributed system, implementing a multiplayer quiz which works on two different systems connected.
  • In order to start the quiz the users have to wait till other user joins in.
  • Once both the users are available, users on these two different machines can play quiz simultaneously.
  • Depending on the time taken the winner(with less time) will be selected.
  • Cases with incorrect answers are also reflected.
  • scratch implementation is done in virtualbox two

> Information

  • Language: Oracle VirtualBox

  • Date Created : Innovative Project

  • Subject : Operating System

  • Date Created : November 2020

  • Concepts used :

    • Multithreading
    • Socket Communication
    • Game stratergy
    • Mimicing distributed computing in linux operating system with python scripts
    • Exception Handling
    • Virtual Machine
    • Communication betwen multiple Linux Virtual Machines

> Packages

  • sys
  • socket
  • time
  • threading

> Install Packages (Dependencies)

cd to_Scripts
pip install threading
pip install socket

> Output

Users waiting for each other image

Users are connected image

Case 1: One user with incorrect and other with a correct answer. image

Case 2: Both the users answer correctly. User with less time wins. image

Case 3: Both the users answer incorrectly. image

_ Demo video for the implementation of the project _

> Prerequst to run

**Linux Systems must be connected in LAN in the virtualbox. (with Bridge Connection or any other connection so their IP are in the one network) **

> Run

  • Linux Machine Terminal
cd to_python_files
python3 Peer1Player1Machine1.py
  • Another Linux Machine's Terminal
cd to_python_files
python3 Peer2Player2Machine2.py