QuizzGame is a client-server application designed to simulate a trivia game similar to Kahoot. Players answer general knowledge questions to accumulate points and compete against each other in lobbies of three participants. At the end of each game, the winner is announced to all players.
- Concurrency: Handles multiple clients and simultaneous games using multithreading.
- Database Integration: Stores questions and leaderboards in a SQLite database.
- Trivia API Integration: Dynamically fetches trivia questions using HTTP GET requests with libcurl.
- Admin Settings: Allows an administrator to modify game settings and add new questions using a secure password.
- TCP Communication: Implements a multithreaded TCP protocol for client-server interaction.
- Secure Password Storage: Encrypts the admin password using SHA-256 with OpenSSL.
- SQLite: For question and leaderboard storage.
- libcurl: To interact with the Trivia API.
- cJSON: For JSON manipulation.
- OpenSSL: For password hashing.
- Multithreading: Ensures efficient handling of multiple clients.
Ensure you have the following installed:
- GCC compiler
- SQLite development libraries
- libcurl
- OpenSSL development libraries
- cJSON library
To compile all files, run the following command in the terminal:
make allThis will generate the server and client executables.
Start the server by executing:
./serverTo connect a client, open a new terminal and run:
./client 127.0.0.1 2909Here, 127.0.0.1 is the localhost address, and 2909 is the default port.
- Players connect to the server using the client application.
- Use the
START GAMEcommand to initiate a new trivia session. - Players respond to questions within the allotted time.
- The server calculates scores and displays the leaderboard.
- At the end of the game, the winner is announced.
- SETTINGS: Access game settings (requires admin password:
parola_admin). - LEADERBOARD: View the current leaderboard.
- HELP: Display available commands.
- QUIT: Disconnect from the server.
- Server: Manages client connections, game sessions, and interacts with the database.
- Client: Sends commands to the server and interacts with the user.
- Database: Stores questions and leaderboard data.
- Integrate a graphical user interface for clients.
- Optimize server message handling.
- Enable question category selection.
QuizzGame is licensed under the GNU General Public License v3.0.
Copyright (C) 2025 QuizzGame Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Thank you for choosing QuizzGame! Enjoy the trivia experience.