Template project for creating a new multi-platform code-only application with kool. The project contains the minimum set of dependencies and launcher code to get you started.
Clone this repo and import the kool-basic-template directory into your favourite IDE (e.g. IntelliJ).
Ideally, the build.gradle.kts is recognized and imported automatically. The project already contains a minimal set
of example code:
-
src/jvmMain/kotlin/Launcher.kt: JVM-specific context creation -
src/jsMain/kotlin/Launcher.kt: Javascript-specific context creation -
src/commonMain/kotlin/template/CommonLauncher.kt: Main application entry point. This is where you should start writing your app. The example-code creates a spinning color cube.
For further demos and examples you should consult the main kool repo. However, unfortunately, documentation is still barely existing (but you are welcome to contribute some 😄).
You can start the project right away out of your IDE or via Gradle from a terminal inside the kool-basic-template
directory:
./gradlew runJvmIn case you want to distribute your game, running it via Gradle or out of the IDE isn't really an option. Therefore, the task
./gradlew buildcreates two (very basic) distributions for JVM and JavaScript. The jvm distribution is packaged as a zip / tar file
under build/distributions/kool-basic-template-jvm.zip. The js distribution is located under dist/js where it can be
run using IntelliJ's built-in webserver: Open the index.html file in the project tree inside IntelliJ and click on
your favourite browser icon in the upper right corner of the editor. It should open a browser tab displaying the game.