Template project for building a game using sola-game-engine.
A Design document template is provided inspired by the content found on develop.games
- Update gradle.properties
- basePackage -> base Java source package (ex.
com.your.game
) - gameName -> name of the game
- vendor -> your name / company
- basePackage -> base Java source package (ex.
- Remove
server
project if not needed- Remove
server
from settings.gradle.kts - Delete server
- Remove from project structure section
- Remove
- Update design document
- Update the icons
- assets/icon.ico : used by browser
- assets/icon.jpg : used by desktop (can also be a .png)
- Also, the image at the top of this README.md file!
- Update README to remove "sola-game-template" wording
JSON schema definitions are provided for various asset types. These can assist you in creating valid assets for the sola game engine to load when manually creating or updating them.
- SpriteSheet
- Font
- GuiDocument
- ControlConfig
- Open settings
- Go to
Languages & Frameworks | Schemas and DTDs | JSON Schema Mappings
- Click
+
and select the schema file to add - Add by file path pattern (recommendations below)
- SpriteSheet ->
*.sprites.json
- Font ->
*.font.json
- GuiDocument ->
*.gui.json
- ControlConfig ->
*.controls.json
- SpriteSheet ->
Run the following gradle command
.\gradlew.bat distWebZip
The output will be at dist/browser/<gameName>-browser-<version>.zip
.
This can be deployed to places like itch.io
when using the "HTML" project type.
Run the following gradle command
.\gradlew.bat distFatJar
The output will be at dist/swing/<gameName>-swing-<version>.jar
and dist/javafx/<gameName>-javafx-<os>-<version>.jar
.
Your users will need to have Java 17 installed to run the jar.
You also have the option to use jpackage to create an executable exe file. Your users will not need to have Java installed.
- Install JDK 17
- Update $JAVA_HOME path environment variable
- ex. C:\Program Files\Java\jdk-17.0.5
- To test configuration run:
jpackage --version
- Should see the current jdk version returned:
17.0.5
- Should see the current jdk version returned:
- Run the following gradle command
.\gradlew.bat distFatJarZip
- Output will be in the
dist
directory