Skip to content

hermonochy/QuizMaster

Repository files navigation

License GPLv3

QuizMaster

QuizMaster is a fun game testing your knowledge and cognitive ability in many different areas. If you can copy and paste text into the command line interface and clone a repository, you're all set to dive in! If you've got some useful knowledge on top of this, you can create a quiz on it with QuizCreator and create a pull request.

Table of contents

Usage

Installation

  1. Clone this repository via terminal: git clone --recurse-submodules https://github.com/hermonochy/QuizMaster

If you prefer not to include the example quizzes, you can omit the --recurse-submodules flag: git clone https://github.com/hermonochy/QuizMaster

  1. Enter the directory containing the game executable: cd QuizMaster
Either:

Run the included script ./setup.sh (Linux) or setup.bat script for Windows (known issues with msys2 python conflict, only worry about this if you are a C++ developer). Do not worry if these scripts take some time to complete.

Or: (Advanced, Linux/Mac only):
  1. Set up a new virtual environment: python3 -m venv venv
  2. Activate the environment: source venv/bin/activate (To decativate, type deactivate)
  3. Install tkinter: sudo apt-get install python3-tk (If you do not use Debian or Ubuntu, you will have to find out your package manager for yourself and replace apt-get.)
  4. Install packages in requirements.txt: pip3 install -r requirements.txt

Steps 1 and 2 are optional, but recommended if you wish to avoid a headache with Python module conflicts.

Running QuizMaster

To start the application, enter ./run.sh for Linux or run.bat for Windows, into the command line interface.

Playing a Quiz

You'll be greeted by the homepage where you have the option to Play a Quiz or Make a Quiz. Selecting Make a Quiz opens QuizCreator, while Play a Quiz takes you into the game. To select a quiz, simply type the theme you would like to play. Alternatively, you can also select a random quiz or a general knowledge quiz, the latter of which takes random questions from random quizzes to create a new and unique quiz. Afterwards, it will request you select a game mode (see below).

The homepage

Game modes

Various game modes exist to allow the user to test different strengths in different areas. From the classic countdown to speed runs that challenge your quick thinking, each mode is designed to provide a unique experience. For most of the game modes, scores greater than 80% are above average, between 80% and 40% is average, and less than 40% is below average. Below are brief overviews of the current game modes.

The Game Mode selection window

Classic

The classic game mode allows you to answer questions with a countdown timer. Your score is recorded, and at the end, it will give advice appropriate to the score. Players can choose answers using keyboard inputs allocated to the answer, or mouse clicks, but be mindful of the timer!

Classic V2

Similar to classic, the time limit of classic V2 is the absolute time, rather than induvidual time limits. This game mode is generally the easiest of all.

Speed Run

Race against the clock to answer all questions correctly as fast as possible! An incorrect answer forces you to retry the question, and losing all lives results in starting the quiz anew. Your total time is recorded to push for improvement in future attempts. Currently, it's the most challenging game mode.

Survival

In Survival mode, players are allotted a limited number of lives to complete the quiz. Each incorrect response results in a life deduction, and the game concludes when you either exhaust your lives or answer all questions correctly. The objective is to survive as long as possible by maintaining accuracy throughout.

Practice

A more laid-back approach, this mode allows you to engage in practice sessions at your own pace. You receive immediate feedback on your answers and can choose to continue or end the quiz whenever you wish. Scores are not tracked in this mode.

A Classic V2 game

Preferences

There is a preferences window where you can change the song, volume, and background colour:

The Preferences window

Quiz Creator

The QuizCreator window, having loaded a Harry Potter quiz

  1. Run quizcreator by opening QuizMaster and clicking Make a Quiz. You can also start it separately with ./quizcreator on the command line interface in Linux.
  2. Use it to manage and create quiz questions. Click Add to include multiple choice questions and ensure you specify the correct answer followed by wrong answers separated by commas. Tooltips provide helpful guidance throughout the process.
  3. Once you have saved it, using the Save button or Save As for an entirely new quiz, you can easily test-play it using the play button, which opens the quiz in practice mode.

Adding Arguments

The file quiz.py also allows for the quiz path, game mode and volume to be added as arguments when starting the program. This is primarily for quick testing of a quiz; a shortcut for quiz makers.

usage: quiz [-h] [-q [QUIZPATH]] [-g [GAMEMODE]] [-v [VOLUME]]

Main program for QuizMaster. Features include: Playing quiz, preferences and starting QuizCreator.

options:
  -h, --help            show this help message and exit
  -q [QUIZPATH], --quizPath [QUIZPATH]
  -g [GAMEMODE], --gameMode [GAMEMODE]
  -v , --volume         enter a float (decimal) between 0 and 1
Current Game Mode Options
  • classic
  • classicV2
  • speedRun
  • survival
  • practice

Similarly in QuizCreator, a quiz parameter can be added to the end but for obvious reasons not a game mode parameter.

usage: QuizCreator [-h] [-q [QUIZPATH]]

Side program for QuizMaster, to make quizzes.

options:
  -h, --help            show this help message and exit
  -q [QUIZPATH], --quizPath [QUIZPATH]

Tutorials

Our Organization contains several tutorials for using QuizMaster.

Other QuizMaster Versions

While the original QuizMaster app is by far the most feature-rich and aesthetically pleasing option, there are several alternative versions tailored for different use cases and user preferences. All of these versions are organized under the QuizMaster organization, providing quick accessibility to all. Below is a brief overview of each version:

  • QuizMasterMini: This scaled-down version is designed for use on smaller devices or for users who may have budgetary constraints regarding data volumes. It retains many of the core functionalities, making it a suitable alternative for those who need a simpler interface without sacrificing key features.

  • QuizMasterTerminal: A minimalist iteration of QuizMaster, QuizMasterTerminal uses only 1.4 MB of storage. The significant difference here is the absence of a graphical user interface; all interactions occur via the terminal. This makes it an excellent choice for users comfortable with command line operations and those using resource-constrained environments.

  • MicroQuizMaster: As the lightest version of all QuizMasters, MicroQuizMaster is a mere 7 KB in size. Unlike QuizMasterTerminal, it does not include any example quizzes, focusing instead on ultra-lightweight functionality for users with the lowest-specification devices. It is particularly aimed at Windows users or those seeking a no-frills experience with minimal resource consumption.

  • QuizMasterPaper offers a printable version of quizzes that can be used in offline or classroom settings, given in either PDF or TXT. Unlike the other repositories, there is no quiz game but the quizcreator can still read the json format present in other repos.

  • QuizMaster-web: Currently in the early stages of development, QuizMaster-web aims to bring the QuizMaster experience to web browsers. This version is expected to provide a more versatile and accessible web-based application of the QuizMaster app, allowing users to engage with quizzes directly in their browsers without requiring any downloads or installations.

Each version of QuizMaster caters to specific needs and environments, ensuring that users can find an appropriate solution that matches their capabilities and preferences.

Summary

Quiz Game:

  • Classic game mode with timing and score recording (Classic/Classic V2).
  • Timed quiz questions with countdown (Speed Run).
  • Ability to answer questions and receive scores.
  • Background music during gameplay.
  • Start QuizCreator
  • Customise background colour and music

Quiz Creator:

  • Add, Edit, Delete, Duplicate, Open, Save, and Load functions for quiz questions.
  • Interactive GUI interface for managing quiz questions.

Engage with QuizMaster, where creating and playing quizzes is fun and interactive! We welcome contributions to enhance this project further—if you have new quizzes to share, please submit a pull request to the submodule for quizzes.

Please note: Some example quizzes may contain inaccuracies, as they have been contributed by AI or younger audiences from the Oxcobu branch at Cheney School.

Future Work

  • More methods of answering questions
  • Adding pictures to questions
  • More user-friendly method of installing the game
  • Multiplayer option
  • Different game modes
  • Web app version
  • Add links to external sources