Setup¶
This guide will show you how to set up a project with the Zeta engine.
Compiling the Zeta library¶
Zeta uses the Gradle build tool. If you’re on Windows, open a command line and run ./gradlew desktop:dist
in Zeta’s main folder. If you’re on a Unix system, run ./gradle desktop:dist
instead. This will create the zeta-1.0.jar
binary, which will be located in the desktop/build/libs
folder.
Writing code with Zeta¶
In your IDE, make sure to add the Zeta jar file as a dependency to your project so that it can detect Zeta’s functions and provide hints. Alternatively, link it to Zeta’s source code so that you also get quick access to documentation.
Linking to Zeta for a base game¶
When compiling and running your project, make com.thirds.zeta.desktop.DesktopLauncher
the main class, and put the Zeta binary in your game’s classpath. You should now be able to test Zeta. You don’t need to write any code at all at this point, Java should automatically invoke Zeta’s initialisation methods.
Linking to Zeta with mods¶
Zeta detects all mods in its classpath, so if you want to allow support for end-user mods as well as your game mod, make sure to run your game with a command like java -cp * com.thirds.zeta.desktop.DesktopLauncher
rather than referencing a jar directly. End users can then place their own mods in the folder you added to the classpath.