Skip to content

Releases

v4.0

Choose a tag to compare

@Goldspear21 Goldspear21 released this 28 May 12:41

Changes (v4.0):

  • Added quiz_app.exe
  • Integrated server into main GUI.
  • multiple ways to execute the app.

Packaged jar version

Choose a tag to compare

@Goldspear21 Goldspear21 released this 24 May 16:50

๐ŸŽฎ FNaF-Themed JavaFX Quiz App

Welcome to the FNaF Quiz App, an interactive, animated quiz application inspired by Five Nights at Freddy's. Built with JavaFX, this project features a rich UI, music, GIFs, and a themed pause menu for a polished, spooky quiz experience!


๐Ÿš€ Getting Started

Prerequisites

  • Java 21 (or higher, e.g., OpenJDK 23)
  • JavaFX 21 SDK (JARs placed in the lib/ directory)
  • Visual Studio Code with Java Extension Pack

Project Structure

๐Ÿ“ quiz_app_package/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ run_app.bat                  # Batch file to run the quiz app
โ”‚   โ””โ”€โ”€ target/
โ”‚       โ”œโ”€โ”€ quiz_app-1.0-SNAPSHOT.jar
โ”‚       โ”œโ”€โ”€ original-quiz_app-1.0-SNAPSHOT.jar
โ”‚       โ””โ”€โ”€ classes/
โ”‚           โ””โ”€โ”€ ...                  # Compiled classes and resources
โ”œโ”€โ”€ server/
โ”‚   โ”œโ”€โ”€ run_server.bat               # Batch file to run the server
โ”‚   โ””โ”€โ”€ target/
โ”‚       โ”œโ”€โ”€ server_app-1.0-SNAPSHOT.jar
โ”‚       โ”œโ”€โ”€ original-server_app-1.0-SNAPSHOT.jar
โ”‚       โ””โ”€โ”€ classes/
โ”‚           โ””โ”€โ”€ ...                  # Compiled server classes
โ”œโ”€โ”€ javafx-sdk-23.0.2/               # JavaFX SDK (Windows)
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ ...                          # SDK files and legal docs
โ”œโ”€โ”€ README.txt                       # This file

๐Ÿƒ How to Run

You can run the application in one way

Using the Provided Batch File (Windows)

  1. Double-click run_app.bat in the project root, or
  2. Open a terminal in the project root and run:
    run_app.bat
    

Note: The batch file assumes Java and JavaFX are properly set up and referenced.


๐Ÿ’ก Features

  • ๐Ÿง  10-question quiz with randomized selection
  • โฑ๏ธ Countdown timer with animated progress bar
  • ๐ŸŽถ Background music that loops during the quiz
  • โธ๏ธ Pause menu (ESC or pause button)
  • GIF background (pause.gif)
  • Themed buttons: Resume, Restart, Quit
  • โœ… Correct/incorrect answer highlighting
  • ๐ŸŽจ Themed UI with custom fonts and effects
  • ๐Ÿ“œ Responsive question layout

๐ŸŒ Online Mode

  • Connects to a server on port 12345
  • Sends a CONNECT command
  • Submits score, time, and correct answers to the server
  • Receives leaderboard rankings

โœ… Requirements

  1. Java 21+ (OpenJDK recommended)
  2. JavaFX 21 SDK (JARs in lib/)
  3. VSCode with Java Extension Pack

โœ๏ธ Customization

  • Add questions to src/main/resources/txt/
  • Replace background music in audio/
  • Update GIFs/images in their respective folders

๐Ÿ“ฌ Feedback

Have suggestions or want to fork this for another theme?
Send feedback or bug reports here.


โš–๏ธ Legal

This project uses JavaFX, which is licensed under the GNU General Public License, version 2, with the Classpath Exception.
All Five Nights at Freddy's references and assets are for educational/fan use only. This project is not affiliated with or endorsed by Scott Cawthon or the official FNaF franchise.


Made with ๐Ÿ’€, ๐ŸŽƒ, and JavaFX and way too much coffee โ˜•.

Build System Upgrade with Persistent Leaderboard Support

Choose a tag to compare

@Goldspear21 Goldspear21 released this 24 May 16:43

๐Ÿ› ๏ธ Release: Maven Build, Batch Scripts & Improved Leaderboard Storage

This release introduces full Maven support, Windows batch files for easier launching, and a redesigned leaderboard storage system that now saves to a user directory on the host machine, improving persistence and portability.


โœจ What's New

๐Ÿงฉ General

  • โœ… Maven-based build system (pom.xml included)
  • ๐Ÿ“ฆ Clean build artifacts inside target/ folder
  • ๐Ÿ’ป Batch files (run_app.bat, run_server.bat) for quick execution with proper JavaFX paths
  • ๐Ÿ“ Leaderboard file (leaderboard.txt) now saved under user-specific directory, e.g.:
    • C:\Users\<username>\QuizAppData\leaderboard.txt on Windows

๐ŸŽฎ Quiz App Features

  • ๐Ÿง  10-question quiz with randomized selection
  • โฑ๏ธ Countdown timer with animated progress bar and color transitions (green โ†’ orange โ†’ red)
  • ๐ŸŽถ Background music that loops during the quiz
  • โธ๏ธ Pause menu (press ESC or pause button)
  • ๐ŸŽž๏ธ GIF background (pause.gif)
  • ๐ŸŽจ Themed buttons: Resume, Restart, Quit
  • โœ… Answer feedback with correct/incorrect highlighting
  • ๐Ÿ“œ Responsive layout for different screen sizes
  • ๐ŸŽญ Custom fonts and JavaFX styling for immersive UI

๐Ÿ–ฅ๏ธ Server Features

  • ๐Ÿ”Œ Leaderboard server that listens for client connections on port 12345
  • ๐Ÿ“ฅ Accepts and processes score submissions from quiz clients
  • ๐Ÿ“Š Sends top 3 leaderboard entries back to clients
  • ๐Ÿ‘ฅ Displays connected clients in real-time
  • ๐Ÿงต Handles multiple clients concurrently using threads
  • ๐Ÿ’พ Saves leaderboard to user-specific directory for persistence
  • ๐ŸชŸ JavaFX GUI to start/stop the server, view logs, and track activity

๐Ÿ“ Project Structures

๐Ÿ“‚ quiz_app/ Project Structure

quiz_app/
โ”œโ”€โ”€ .vscode/                         # VSCode config files
โ”œโ”€โ”€ lib/                             # JavaFX JAR libraries
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main/
โ”‚   โ”‚   โ”œโ”€โ”€ java/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ bhargav/
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ App.java         # Entry point
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ client/          # Client networking code
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ quiz/            # Quiz logic and GUI
โ”‚   โ”‚   โ””โ”€โ”€ resources/
โ”‚   โ”‚       โ”œโ”€โ”€ audio/               # Background music
โ”‚   โ”‚       โ”œโ”€โ”€ gifs/                # GIF backgrounds
โ”‚   โ”‚       โ”œโ”€โ”€ images/              # UI images
โ”‚   โ”‚       โ”œโ”€โ”€ txt/                 # Question banks and fallback leaderboard
โ”‚   โ”‚       โ””โ”€โ”€ videos/              # Optional media
โ”‚   โ””โ”€โ”€ test/
โ”‚       โ””โ”€โ”€ java/
โ”‚           โ””โ”€โ”€ bhargav/
โ”‚               โ””โ”€โ”€ TestQuiz.java    # JUnit tests
โ”œโ”€โ”€ target/                          # Compiled output (via Maven)
โ”‚   โ””โ”€โ”€ quiz_app-1.0-SNAPSHOT.jar
โ”œโ”€โ”€ run_app.bat                      # Batch script to run the quiz app
โ”œโ”€โ”€ pom.xml                          # Maven build file
โ”œโ”€โ”€ UML.png                          # UML class diagram
โ””โ”€โ”€ README.txt                       # Project documentation

๐Ÿ“‚ server_app/ Project Structure

server_app/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ main/
โ”‚       โ”œโ”€โ”€ java/
โ”‚       โ”‚   โ””โ”€โ”€ bhargav/
โ”‚       โ”‚       โ”œโ”€โ”€ Server.java                  # Entry point to launch server GUI
โ”‚       โ”‚       โ””โ”€โ”€ server/
โ”‚       โ”‚           โ”œโ”€โ”€ LeaderboardServer.java   # Handles server logic, client threads
โ”‚       โ”‚           โ””โ”€โ”€ LeaderboardServerGUI.java# GUI for controlling server
โ”‚       โ””โ”€โ”€ resources/                           # (Optional) Resource folder if needed
โ”œโ”€โ”€ target/
โ”‚   โ””โ”€โ”€ server_app-1.0-SNAPSHOT.jar              # Compiled server JAR
โ”œโ”€โ”€ run_server.bat                               # Batch script to launch server with JavaFX
โ”œโ”€โ”€ javafx-sdk-23.0.2/                            # JavaFX SDK required for runtime
โ””โ”€โ”€ README.txt                                   # Project documentation

๐Ÿ“ฆ How to Build

You can build both projects using Maven:

mvn clean package

The compiled .jar files will appear in the target/ directory of each project.


๐Ÿš€ How to Run

๐Ÿ”น Run Quiz App

run_app.bat

๐Ÿ”น Run Leaderboard Server

run_server.bat

Ensure your environment has the JavaFX SDK properly set up, or the batch files include the correct module paths.


๐Ÿ“‚ Leaderboard Data Storage

Leaderboard files are now stored in a directory like:

Windows: C:\Users\<username>\QuizAppData\leaderboard.txt
macOS/Linux: /home/<user>/QuizAppData/leaderboard.txt

This avoids overwriting files in resources/ and ensures persistence.


๐Ÿ“œ License

This project uses JavaFX and other dependencies under their respective licenses. See the javafx-sdk-23.0.2/legal/ folder for details.


๐Ÿ™‹ Support

Open an issue on this repository for bugs, suggestions, or questions.

No build tool alpha

Choose a tag to compare

@Goldspear21 Goldspear21 released this 24 May 16:12

๐Ÿ“ฆ Release: Initial Manual Build Version (v1.0)

This is the first release of the Quiz App with Leaderboard Server, created without any build tools. The application was manually compiled and run using javac and java. It includes a fully interactive JavaFX-based quiz client and a threaded leaderboard server.


๐Ÿงฉ Components

This project consists of two major components:

  1. ๐Ÿ–ฅ๏ธ Quiz App (Client)
  2. ๐Ÿ—„๏ธ Leaderboard Server

๐Ÿ–ฅ๏ธ Quiz App (Client) Features

  • ๐Ÿง  10-question quiz with randomized question selection on each run.
  • โฑ๏ธ Countdown timer with an animated progress bar that changes color (green โ†’ orange โ†’ red).
  • ๐ŸŽถ Looping background music during the quiz session.
  • โธ๏ธ Pause menu accessible via the ESC key or a dedicated Pause button.
  • ๐Ÿ–ผ๏ธ Animated GIF background (pause.gif) shown during pause state.
  • ๐ŸŽจ Themed UI including:
    • Custom button styles: Resume, Restart, and Quit
    • Highlighting of โœ… correct and โŒ incorrect answers
    • Stylized fonts and drop shadows
  • ๐Ÿ“œ Responsive question layout with dynamic text wrapping and alignment.

๐Ÿ—„๏ธ Leaderboard Server Features

  • ๐Ÿ“ก Accepts multiple client connections and processes quiz scores in real-time.
  • ๐Ÿ‘ฅ Maintains a live leaderboard that ranks players based on score.
  • ๐Ÿ”„ Thread-safe architecture using a thread pool to manage client communication.
  • ๐Ÿ’พ Persistent storage of scores in a file to retain leaderboard data between restarts.
  • ๐Ÿงช Built-in command handling for CONNECT, START_QUIZ, and SUBMIT_SCORE.
  • ๐Ÿ–ฅ๏ธ JavaFX GUI to:
    • Start/stop the server
    • Monitor logs and connected clients
    • Display current leaderboard entries

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ App.java             # Main entry point to launch the quiz client
โ”œโ”€โ”€ Server.java          # Entry point for the server GUI (if used)
โ””โ”€โ”€ ...                  # Additional packages or resources

๐Ÿ› ๏ธ How to Run (Manual Compilation)

Prerequisites

  • Java 8 or higher
  • JavaFX SDK 23.0.2 (included in javafx-sdk-23.0.2/)

How to run?

  • Head to the App.java file in src/ , then click on run. (This requires Visual Studio Code or a similar IDE with Java set up.)

๐Ÿ“‚ File Locations

  • Leaderboard Data:
    Stored in:

    ..\AssignmentGCIS124\txt\leaderboard.txt
    
  • Audio & GIF Assets:
    Stored under a folder such as audio/, gifs/, or resources/.


โš ๏ธ Known Limitations in v1.0

  • โŒ No build tools (Maven/Gradle)
  • โŒ No JAR packaging
  • โŒ No batch scripts
  • โŒ Manual compilation required
  • โŒ Leaderboard file doesn't support packaging due to being package-dependent if it is to be packaged.

๐Ÿ“„ License

JavaFX is distributed under the GPL v2 with the Classpath Exception.
See the javafx-sdk-23.0.2/legal/ folder for more details.


๐Ÿ’ฌ Feedback & Issues

Found a bug or have a suggestion? Open an issue or contribute your improvements!