A libgdx game written, while briefly under the weather, in Scala 3, the premier programming language for contemporary mobile and game development. Based loosely on a prior thing.
The code is horrid and shameful. It contains state and mutation, inconsistencies, aberrations and general travesties. Nothing is nice here.
At the time of writing this was built with Scala 3.6.3, libgdx 1.13.1, JDK 21 and Android SDK 36.
The following Android SDK instructions may be out of date, it is not clear what updates have happened since they were written.
Before building this you need to install the Android SDK command-line tools, even if you're just building the Desktop version.
-
Go to the Android Studio Website and witness the command line tools.
-
Then decide to just use Homebrew:
brew install android-commandlinetools
- Then install the build tools and platforms (while agreeing to sell your firstborn):
sdkmanager 'platforms;android-29' 'build-tools;29.0.2' tools
- Create a file
local.properties
:
sdk.dir=/opt/homebrew/share/android-commandlinetools/
- Run it:
./gradlew desktop:run
- Or package it:
./gradlew desktop:dist
- Achieving greatness:
desktop/build/libs/desktop-x.y.jar
- Which you can run:
java -jar desktop/build/libs/desktop-x.y.jar
# or, on a Mac
java -XstartOnFirstThread -jar desktop/build/libs/desktop-x.y.jar
On the Mac you need an icon. See this answer for incantations.
With this and JDK 21 installed:
export JAVA_HOME=/path/to/java/21
jpackage \
--input desktop/build/libs/ \
--name Tertis \
--app-version x.y \
--main-jar desktop-x.y.jar \
--main-class org.merlin.tertis.DesktopLauncher \
--type dmg \
--java-options '-XstartOnFirstThread' \
--icon mac/Tertis.icns
Yielding: Tertis-x.y.dmg
.
-
Get a keystore.
-
Create
keystore.properties
:
storePassword=<password>
keyPassword=<password>
keyAlias=<alias>
storeFile=<file>
- Build it:
./gradlew android:assemble
- Achieve a result:
android/build/outputs/apk/release/android-release.apk
- See also the Android docs.
It's probably easiest to just fire up IntelliJ, select the android run configuration, use the AVD Manager UI to create a Pixel 8 device running Android 14 and be done.
- Audio editing with Audacity
- Vector editing with Inkscape
- Pixel editing with Gimp
- The raised fist - https://en.wikipedia.org/wiki/Raised_fist#/media/File:Fist_.svg
assets/click.mp3
- https://freesound.org/people/JonnyRuss01/sounds/478197/assets/drop.mp3
- https://freesound.org/people/TampaJoey/sounds/588502/assets/crash.mp3
- https://freesound.org/people/timgormly/sounds/170958/assets/triangle.mp3
- https://freesound.org/people/acclivity/sounds/31189/assets/gong.mp3
- https://freesound.org/people/josemaria/sounds/55438/assets/OpenSans-Regular.ttf
- https://fonts.google.com/specimen/Open+Sansassets/tap.png
- https://www.iconfinder.com/icons/446301/finger_gesture_hand_interactive_scroll_swipe_tap_icon