A JavaFX desktop game project that demonstrates the Model-View-Controller architecture together with multiple object-oriented design patterns. The game is implemented as a university-style assignment and uses Java 19, JavaFX, and Gradle.
This project is an Angry Birds-style game, featuring projectile shooting, enemy structures, and physics-inspired collision behavior.
This project launches a simple game application using a JavaFX-based UI. The game logic is organized using MVC principles, and the source code is structured into clear architecture modules for configuration, model, view, controller, and game services such as collision, events, and persistence.
- JavaFX-based game launcher and UI
- MVC architecture with separate model, view, and controller layers
- Level loading from JSON scene scripts
- Player controls, shooting, enemy behavior, and collision handling
- Undo support with the Memento pattern
- Proxy-based model access and lazy update management
- Support for multiple design patterns throughout the application
The project demonstrates a number of classic object-oriented design patterns, including:
- MVC (Model-View-Controller)
- Abstract Factory
- Bridge
- Command
- Decorator
- Observer
- Proxy
- State
- Strategy
- Visitor
- Memento
src/main/java- main application codesrc/main/resources- game assets, fonts, icons, images, and scene scriptssrc/test/java- unit testsbuild.gradle- Gradle build configuration
- Java 19
- JavaFX 21
- Gradle wrapper included in the repository
From the project root, open a terminal in the niadp-mvcgame-b241-java folder and use the Gradle wrapper:
./gradlew build
./gradlew runOn Windows, use:
./gradlew.bat build
./gradlew.bat runThe application starts from cz.cvut.fit.niadp.MvcGameJavaFxLauncher.
Run unit tests with:
./gradlew test- The game loads level definitions from JSON files in
src/main/resources/sceneScripts - JavaFX support is configured via the
org.openjfx.javafxplugin - The project includes sample dependencies for JUnit, Mockito, JMockit, and Jackson

