Live release: https://plutobox.github.io/scala-example-gdx-teavm/main
This project has a wild stack!
- LibGDX
- Java game engine.
- TeaVM
- Compiler for Java bytecode that emits JavaScript and WebAssembly that runs in a browser.
- gdx-teavm
- A backend solution for running LibGDX games in a web browser. Uses TeaVM.
- sbt
- Simple build tool. A build tool of choice for Scala developers... usually.
- Jetty
- A web server and servlet container. For local development.
Releases are the result of transpiling javascript using teavm in github actions. See branch gh-pages.
Every branch will have its own release to gh-pages
.
Be sure you are using correct java version 11.
sdk use java 11.0.14-zulu
Compile and transpile js.
make js
Start jetty server.
sbt
sbt:scala-example-gdx-teavm> jetty:start
Game should be rendered locally at http://localhost:8080/.
There's also a desktop runner. Other runners can be implemented as well.