A desktop quiz application built in C++ using Raylib with PostgreSQL (Supabase) integration for storing quiz results.
The project was developed as a learning experience in GUI programming, state management, database connectivity, and game/application development using C++.
Screenshots of the quiz interface, gameplay, and result screens.
- Interactive graphical interface using Raylib
- 30 multiple-choice questions
- Randomized question order
- Timer-based scoring system
- Dynamic score calculation
- Pause & Resume functionality
- Credits screen
- PRN (Student ID) input
- Result screen displaying score and completion time
- PostgreSQL (Supabase) database integration
- Automatic result storage
The application rewards quick and accurate answers.
- Correct answers earn points based on response time.
- Faster responses receive higher scores.
- Incorrect answers reduce the score.
- Total completion time is recorded and displayed after finishing the quiz.
Quiz results are automatically stored in a PostgreSQL database using libpq.
Each submission records:
- Student PRN
- Final Score
- Time Taken
| Action | Input |
|---|---|
| Navigate UI | Mouse |
| Select Answer | Left Mouse Button |
| Continue | Mouse |
| Pause | Esc |
| Resume | Mouse |
| Enter PRN | Keyboard |
| Component | Technology |
|---|---|
| Language | C++ |
| Graphics Library | Raylib |
| Database | PostgreSQL (Supabase) |
| Database Driver | libpq |
| Platform | Windows |
Quiz/
│
├── Images/
├── Assets/
├── main.cpp
└── README.md
git clone https://github.com/jeevansagale/Quiz.git- Visual Studio 2022
- Raylib
- PostgreSQL libpq library
- C++17 or newer
Open the project in Visual Studio, configure Raylib and libpq, then build and run.
This project was built to gain practical experience with:
- Modern C++
- GUI programming
- Event-driven applications
- State management
- Timer systems
- Randomization
- Database connectivity
- PostgreSQL integration
- User input handling
- File and data management
- User authentication
- Difficulty levels
- Question categories
- Leaderboard
- Timer per question
- Better UI animations
- Online multiplayer quiz
- Admin panel for managing questions
- Secure database credentials using environment variables
- Question loading from external JSON or database
- GUI
- Question system
- Random question order
- Timer
- Score calculation
- PRN input
- Pause system
- Result screen
- PostgreSQL integration
- Leaderboard
- Question editor
- Categories
- Improved UI
Contributions, suggestions, and feedback are welcome.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Open a Pull Request.
This project is licensed under the MIT License.
Jeevan Sagale
GitHub: https://github.com/jeevansagale




