A simple Scala 3 Native application that uses Raylib to render a window where letters are animated when pressed. Written for a post in my blog. The purpose of this "game" is to distract my toddler who is adamant he needs to smash random keys. I also learned quite a lot making it.
Important: The exact state of repository as described in the blogpost is at this commit. Since then, Raylib released 5.5 and introduced some breaking changes, so the bindings were updated to reflect that, and Scala Native was updated to 0.5.x
To run this, you will need to install Scala CLI. This project is only tested on Mac OS and Linux. Instructions and adjustment for Windows are welcome, as long as they're accompanied by a Github Actions workflow.
The project contains a build script that goes like this (all of this should be transparent to you and will be bootstrap from just having scala-cli):
- Invoke Scala CLI which
- invokes coursier CLI which
- invokes sn-vcpkg CLI which
- installs dependencies by invoking vcpkg CLI and then
- invokes scala-cli with correct compilation and linking flags which
- produces the binary
Absolutely scrumptious madness.
Run:
./build.sc app-debug
./build.sc app-release
to build a little-fingers
binary in debug or release configuration
To do this, first obtain and setup the bindgen CLI: https://sn-bindgen.indoorvivants.com/quickstart/index.html
./build.sc bindings