A polished, modern JavaFX desktop game. Guess Master is a small-but-complete desktop project that demonstrates clean UI design, stateful game logic, score/leaderboard persistence, and extendable architecture for multiplayer and online features.
- Modern, professional desktop UI built with JavaFX (FXML + CSS).
- Smooth UX: modal overlays, animations, focused keyboard flow.
- Gameplay features: single-player, configurable rounds, attempt limits, scoring.
- Leaderboard with search & CSV export.
- Clean separation:
controllers,services,config,utils. - Easily packaged for distribution (Maven + JavaFX plugin).
- Single Player — Guess the hidden number, hints of higher/lower, attempts limited.
- Online Multiplayer — Players can connect through web sockets.
- Leaderboard — Top scores, filtering (all time / 7d / 1d), search, export CSV.
- Scoring system — Base points + difficulty multiplier + speed & accuracy bonuses.
- Post-round dialog — Modal overlay with round summary, breakdown of points, next/replay/menu options.
- Polished UI — Card surfaces, gradients, subtle shadows, consistent typography, keyboard navigation.
guess-master/
├─ pom.xml
├─ src/
│ ├─ main/
│ │ ├─ java/com/guessing/gamemaster/
│ │ │ ├─ GuessMasterApp.java # launcher
│ │ │ ├─ controllers/ # UI controllers (FXML)
│ │ │ ├─ services/ # GameService, LeaderboardService
│ │ │ ├─ utils/ # helpers, SceneManager
│ │ │ └─ config/ # DB init
│ │ └─ resources/com/guessing/gamemaster/
│ │ ├─ ui/ # all FXML screens / dialogs
│ │ ├─ styles/ # CSS files
│ │ └─ images/ # icons
└─ docs/
└─ ui-mockups/
- Language: Java (11+ recommended; project works with Java 17 LTS and newer).
- UI: JavaFX (FXML + CSS).
- Build: Maven (with
javafx-maven-pluginformvn javafx:run). - Persistence: small embedded store (H2-database).
- IDE: IntelliJ IDEA (Scene Builder for FXML visual editing).
- JDK 17 (or later) installed and
JAVA_HOMEset. - Maven (if using the provided
pom.xml). - JavaFX SDK version matching runtime (if not using the Maven artifacts) — prefer the Maven
org.openjfxdependencies to avoid manual module-path handling.
# Run the app (development)
mvn clean javafx:runmvn clean package
# If packaging to an executable JAR, follow plugin instructions to include JavaFX modsIf you produce an executable JAR that includes a JavaFX runtime (jlink or fat-jar), just:
java -jar target/guess-master-1.0.jarOtherwise, run with JavaFX module-path (example):
java --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml -jar target/guess-master-1.0.jar- Import as a Maven project.
- Make sure the
javafx-maven-pluginruns or configure VM options to include the JavaFX SDK:
--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml
- If controllers or FXML fail to load, check
fx:idmatches and resource paths use a leading slash (e.g.getResource("/com/guessing/gamemaster/fxml/main-view.fxml")).
- Controller thinness: Controllers handle UI events and delegate game logic to
GameService. This enables unit testing of game rules independently. - Service layer:
GameServiceencapsulates rounds, random number generation, attempt handling, scoring. - Dialog & overlay pattern: Use
StackPaneroot and preload modal dialogs (post-round) as hidden nodes — fast show/hide, simple animations, and consistent styling. - Scoring system: base points + difficulty multiplier + speed & accuracy bonuses. Designed to reward skill and speed.
- Persistence: small, local H2 DB. Leaderboard queries use name & date filters.
- Online multiplayer (matchmaking & real-time sync).
- Achievements & daily challenges.
- Native installers (jlink / jpackage) for Windows/macOS/Linux.
- Accessibility improvements & localization.
MIT License (simple and permissive).
- Developer: Raimi Dikamona Lassissi
- GitHub:
https://github.com/ray-cod/guess-master.git - Email:
rdikamona9@gmail.com
