Skip to content

Latest commit

 

History

History
142 lines (99 loc) · 3.63 KB

README.md

File metadata and controls

142 lines (99 loc) · 3.63 KB

Raised fist holding a one-by-four

Тэятис

A libgdx game written, while briefly under the weather, in Scala, 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 JDK 17, Scala 2.13.8, libgdx 1.11.0 and Android SDK 29.

Install the Android SDK command-line tools

Before building this you need to install the Android SDK command-line tools, even if you're just building the Desktop version.

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/

Building for the desktop

  • 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

Packaging for a Mac

On the Mac you need an icon. See this answer for incantations.

With this and JDK 17 installed:

export JAVA_HOME=/path/to/java/17
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.

Building for Android

  • 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

Running in the Android emulator

It's probably easiest to just fire up IntelliJ, select the android run configuration, use the AVD Manager UI to create a Pixel 5 device running Android 11 and be done.

License

Apache License, Version 2.0

Credits

  1. Audio editing with Audacity
  2. Vector editing with Inkscape
  3. Pixel editing with Gimp
  4. The raised fist - https://en.wikipedia.org/wiki/Raised_fist#/media/File:Fist_.svg
  5. assets/click.mp3 - https://freesound.org/people/JonnyRuss01/sounds/478197/
  6. assets/drop.mp3 - https://freesound.org/people/TampaJoey/sounds/588502/
  7. assets/crash.mp3 - https://freesound.org/people/timgormly/sounds/170958/
  8. assets/triangle.mp3 - https://freesound.org/people/acclivity/sounds/31189/
  9. assets/gong.mp3 - https://freesound.org/people/josemaria/sounds/55438/
  10. assets/OpenSans-Regular.ttf - https://fonts.google.com/specimen/Open+Sans
  11. assets/tap.png - https://www.iconfinder.com/icons/446301/finger_gesture_hand_interactive_scroll_swipe_tap_icon