Basic 2d game made in java 24, using a free tutorial.
Java 24 gradle-8.14
Run command
./gradlew run
When the game window opens, use the W, A, S, and D keys to move the playable character.
To remove all picked-up items from the map, use main menu button "Start New Game" to clear the player's inventory.
Run the following commands to build the project and generate the .exe
./gradlew clean build
./gradlew run
./gradlew shadowJar
./gradlew launch4j
The generated executable will be located at:
LGK2Dgame/build/home/georgel/IdeaProjects/LGK2Dgame/build/exe/LGK2DGame.exe
LGK2Dgame/build/home/georgel/IdeaProjects/LGK2Dgame/build/libs/LGK2DGame-1.0-SNAPSHOT.jar
For non-Windows users, please use the following JAR commands:
java -jar build/libs/LGK2DGame.jar
java -jar LGK2DGame.jar
For convenience, I've also included a pre-built .exe
.exe , feel free to build it yourself using the commands above.
If you want to use the EXE file, it requires the Java 24 JRE folder. Use the link below to download the Windows version, add it to the project folder, and rename it to jre.
https://adoptium.net/temurin/releases?version=24&os=any&arch=any&mode=filter