goome docs

IntelliJ IDEA 0.3

Community edition is enough.

Theres a goome plugin for the JetBrains IDEs with a tool window 0.5, live templates and a .goome.json preview. Get it from the JetBrains Marketplace or from disk, the Rider page has both ways and everything it does.

New project

  1. File > New > Project, pick Java, build system Gradle, DSL Groovy. For the JDK take 22 or newer, the dropdown can download one.
  2. Swap build.gradle for the one on Getting started in Java, it pulls goome from Maven Central, and hit the Load Gradle Changes button that pops up (or the refresh in the Gradle tool window).
  3. Paste the overlay from Getting started in Java into src/main/java/Main.java.

Running it

The green arrow next to main runs it. That run config doesnt read applicationDefaultJvmArgs, so add the flag yourself: Run > Edit Configurations, Modify options > Add VM options, and put in

--enable-native-access=ALL-UNNAMED

Or run the Gradle run task from the Gradle tool window (Tasks > application > run), that one does use build.gradle.

To try it without touching your screen put GOOME_BACKEND=test;GOOME_TEST_SHOTS=shots/ in the run config’s Environment variables and every frame lands in shots/ (Testing without a screen).

Debugging

The bug icon next to the arrow. Breakpoints work fine in your own code, including inside the g.frame(0, c -> ...) lambda. You cant step into goome itself, its C behind FFM. For that build a debug lib in c-goome, point -Dgoome.lib at it and attach gdb or lldb to the java process, or debug the same thing in C with CLion.

Pausing on a breakpoint stops your loop, so an overlay just stays frozen on its last frame until you continue. Thats normal.

Where the native lib comes from

The jar has libgoome for every OS inside. On the first run it gets unpacked into ~/.cache/goome/java/<hash>/ (%LOCALAPPDATA%\goome\java on Windows, ~/Library/Caches/goome/java on Mac) and loaded from there. A different lib gets a different hash, so you never get a stale one.

VM option Does
-Dgoome.lib=/path/to/libgoome.so loads that lib instead, for your own build of c-goome
-Dgoome.cache=folder unpacks somewhere else, when your home folder isnt writable
-Dgoome.native=lwjgl forces the LWJGL path, ffm forces FFM

Gotchas