sola game engine is a zero external dependency game engine (other than teavm for transpiling to JavaScript) that has been a hobby project for a long time. Two larger pieces of this project were broken into separate repositories for easier maintenance (the entity component system and JSON parser). Its purpose has been primarily for learning about how games are developed from the ground up, but I hope to one day use it to also make some small games.
You can view a collection of demos built with the sola game engine running in your browser at this itch.io page.
You can use the Sola Game Template repo as a template to start your repo using the sola game engine.
The general structure of a Sola project is to first create an instance of Sola. This is where all your amazing game code goes! Then you choose an implementation of SolaPlatform that has all the bindings for your desired platform to actually "play" the Sola.
public class Main {
public static void main(String[] args) {
SolaPlatform solaPlatform = new SwingSolaPlatform();
Sola sola = new ExampleSola();
solaPlatform.play(sola);
}
}
repositories {
maven {
url = uri("https://jitpack.io")
}
}
dependencies {
implementation("com.github.iamdudeman.sola-game-engine:sola-engine:SOLA_ENGINE_VERSION")
implementation("com.github.iamdudeman.sola-game-engine:platform-swing:SOLA_ENGINE_VERSION")
implementation("com.github.iamdudeman.sola-game-engine:tooling:SOLA_ENGINE_VERSION")
}
You can execute the example code in the browser at https://iamdudeman.itch.io/sola-game-engine-demos. The local server will have to be downloaded and executed separately.
- Sola examples
- Swing Platform example
- JavaFX Platform example
- Browser Platform example
- For browser the GenerateBrowserFilesMain is responsible for generating the JavaScript files
- The BrowserMain is the entry point GenerateBrowserFilesMain uses.
- Then DevBrowserFileServerMain acts as a simple http server for the files
- Server example
- sola game engine demos
- Play it on its itch.io page
- Acid Rain OLC CodeJam 2022
- Play it on its itch.io page
- Check out its GitHub repo
- re;memory OLC CodeJam 2023
- Play it on its itch.io page
- Check out its GitHub repo
- Vile Pirate Software Game Jam 15
- Play it on its itch.io page
- Check out its GitHub repo
Run the following gradle command
.\gradlew.bat distWebZip
The output will be at dist/browser/examples-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/examples-swing-<version>.jar
and dist/javafx/examples-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 distWinJPackageZip
- Output will be in the
dist/javafx
directory
JSON schema files 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.
- 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.schema.json -> *.sprites.json
- Font.schema.json -> *.font.json
- GuiDocument.schema.json -> *.gui.json
- ControlConfig.schema.json -> *.controls.json