Quiz Trainer is a Python application designed to help players practice and improve their quiz skills using questions from the Open Trivia Database (opentdb.com) API. It provides a user-friendly interface, allowing players to focus on gameplay rather than technical setup.
- Fetches trivia questions in real-time using the requests module.
- Generates quizzes using a custom renderer paired with the game module.
- Tracks player progression with stats such as time spent, accuracy, and scores. Configurable to show results after each question or at the end of the game.
- Supports AI-controlled bots with adjustable accuracy to play alongside players.
- Handles unexpected user input and corrupted JSON files robustly.
- Offers extensive configuration and settings to tailor gameplay.
- Supports local turn-based play and synchronous multiplayer over TCP.
- Includes a GUI for accessibility alongside the default terminal interface.
Please use Python 3.10 or above due to the use of match statements
- run ools/requirements.bat OR python -m pip install -r requirements.txt OR pip install -r requirements.txt
- run main.py
- If you want to run in idle (or other IDEs) follow these steps.
- Setup first
- Modify the script to change the following constants: (Maxs_Modules/renderer.py) compact_console = True, use_colour = False
- Run main.py with the following arguments: --ide (To do this in idle, go to Run -> Run Module Customized)
- Note (CLI only) --ide tells the program to disable timed input, meaning time limits will not be enforced
- Windows 11 doesn't like the ░ symbol in console, so it is recommended to change "divider_symbol" (Maxs_Modules/renderer.py)
- Some constants in the script can be modified to change the game's behavior
- game.py : max_number_of_questions = Maximum number of questions per game (shouldn't exceed 50)
- game.py : max_number_of_players = Maximum number of players per game (shouldn't exceed 4) (apply to bots as well)
- game.py : host_a_server_by_default = Should the default game be a server (True/False)
- renderer.py : compact_console = Use the compact variant of the console
- renderer.py : console_width = Width of the console
- renderer.py : divider_symbol = Symbol used as borders and such when printing, can be changed on compact console
- renderer.py : auto_htmlify = Convert text to html when printing to the GUI
- renderer.py : auto_colour = Convert some strings to coloured variants
- renderer.py : use_colour = Enable colour
- Setup first
- Open Tools directory
- Run start_server.bat or join_local_server.bat
- Setup first
- Run main.py
- Create a new game
- In the game settings menu, set Host a server to True
- Wait for other players to join
- Unless port forwarding is set up, the game will not be visible to other players on the internet
- Setup first
- Run main.py
- Join a game using the IP address of the host and the port