This is an Asteroids game built with Java and JavaFX. Originally completed as part of the MOOC.fi Java programming course, the application has been adapted for the web using the JPRO framework and containerized for deployment.
Play the game at: https://asteroids-application.onrender.com
Use arrow keys to move and spacebar to shoot!! :D
- Runtime: Java 23
- Frameworks: JavaFX 21.0.2, JPRO 2025.3.3
- Architecture: Optimized for Apple Silicon (M4) and Linux-based containers
To run the application as a native desktop window, you can use the terminal or your IDE.
Using the Terminal:
mvn clean compile javafx:runUsing IntelliJ IDEA:
-
Open the Maven tool window (
View > Tool Windows > Maven). -
Click the "Reload All Maven Projects" icon to ensure dependencies are synced.
-
Navigate to
Plugins > javafx > javafx:runand double-click to execute.Note: If IntelliJ does not automatically create a run configuration after the build, manually create a new Maven run configuration and set the command to
javafx:run.
To run the application as a local web server without Docker, use the JPRO plugin:
mvn jpro:runOnce the server is running, the game is accessible in your browser at http://localhost:8080.
The application is fully containerized. To run the web version via Docker, pull the image and map the container's port to your local machine:
docker run -p 8080:8080 shivvanir/asteroids-applicationOnce the container is active, the game is accessible at http://localhost:8080.
If you clone the repo; use:
docker compose upThe official image can be found on Docker Hub.