2022-03-09 14:55:07 -07:00
|
|
|
## A Starter Game Template for the LittleKt Game Framework
|
|
|
|
|
|
|
|
This template repository contains a base project for creating games with [LittleKt](https://littlekt.com). It contains
|
|
|
|
the bare necessities to get a LittleKt project up and running. This includes the necessary plugins, dependencies and
|
|
|
|
source set structure.
|
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
This project is set up to use all the available platforms that LittleKt currently supports: **JVM**, **Web**, and *
|
|
|
|
*Android**.
|
2022-03-09 14:55:07 -07:00
|
|
|
If a certain platform isn't needed, simply deleting the source directory and the source sets in
|
|
|
|
the `build.gradle.kts` file will get rid of it.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Clone this repo and open up in IntelliJ to get started. Each platform target contains a class to execute for their
|
|
|
|
respective platform.
|
|
|
|
|
|
|
|
### JVM
|
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
#### Running
|
2022-03-09 14:55:07 -07:00
|
|
|
|
|
|
|
Run `LwjglApp` to execute on the desktop.
|
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
#### Deploying
|
2022-03-09 14:55:07 -07:00
|
|
|
|
|
|
|
A custom deploy task is created specifically for JVM. Run the `package/packageFatJar` gradle task to create a fat
|
|
|
|
executable JAR. This task can be tinkered with in the `build.gradlek.kts` file.
|
|
|
|
|
|
|
|
If and when the packages are renamed from `com.game.template.LwjglApp` to whatever, ensure to update the `jvm.mainClass`
|
|
|
|
property in the `gradle.properties` file to ensure that the `packageFatJar` task will work properly.
|
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
A jar will be outputted in the build directory. To run this JAR, use the following
|
|
|
|
command, replacing the name of the JAR, if needed: `java -jar --enable-preview game-1.0-all.jar`
|
|
|
|
|
|
|
|
If you are running on Mac OS, then the following command can be
|
|
|
|
used: `java -jar -XstartOnFirstThread --enable-preview game-1.0-all.jar`
|
|
|
|
|
2022-03-09 14:55:07 -07:00
|
|
|
### JS
|
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
#### Running
|
2022-03-09 14:55:07 -07:00
|
|
|
|
2024-03-23 18:15:04 -06:00
|
|
|
Run the `kotlin browser/jsBrowserRun` gradle task like any other **Kotlin/JS** project to run in development mode.
|
2022-03-09 14:55:07 -07:00
|
|
|
|
2024-07-16 08:27:33 -06:00
|
|
|
#### Deploying
|
2022-03-09 14:55:07 -07:00
|
|
|
|
|
|
|
Run the `kotlin browser/jsBrowserDistribution` gradle task to create a distribution build. This build will require a
|
|
|
|
webserver in order to run.
|