A cross-platform endless runner built with libGDX, written in Java.
core: Main module with the application logic shared by all platforms (screens, entities, assets).lwjgl3: Desktop platform (Windows, Linux, macOS) using LWJGL3.lwjgl2: Legacy desktop platform using LWJGL2, for older systems.android: Android mobile platform. Needs the Android SDK.ios-moe: iOS mobile platform using Multi-OS Engine.teavm: Web/HTML platform, compiles the game to run in a browser.
Run automatically, jump to collect rings and stomp enemies. Rings are both the objective and the game's currency: pickups are worth 1 ring, stomping a Motobug from the air is worth 10, and the total is saved permanently (Preferences-backed, so it survives closing the app, logging out, or reloading the page on the web build). Getting hit costs a random 0-100 rings from that saved total, unless a Chili Dog (bought from the shop) is on hand to save you instead — it respawns you on the spot with everything you had.
Sonic is unlocked from the start; Tails and Knuckles cost 200 rings each, and Silver costs 300. Silver can double-jump (press jump twice within 1 second) to fly for 10 seconds, and has a telekinesis button (bottom-right, click/tap only, on every platform) that lifts nearby Motobugs into the air and calls down a bolt of fire to finish them off.
Controls: Space, mouse click, or touch — all map to jump. Escape (desktop/web) or the on-screen button (Android/iOS/web) pauses; 6 (desktop/web) or the on-screen button (Android/iOS/web) opens the shop. Press 5, or tap the screen 4 times within 2 seconds, to switch characters.
This project uses Gradle to manage dependencies.
The Gradle wrapper is included, so you can run Gradle tasks using gradlew.bat or ./gradlew.
Useful Gradle tasks and flags:
--continue: when using this flag, errors will not stop the tasks from running.--daemon: thanks to this flag, Gradle daemon will be used to run chosen tasks.--offline: when using this flag, cached dependency archives will be used.--refresh-dependencies: this flag forces validation of all dependencies. Useful for snapshot versions.android:lint: performs Android project validation.build: builds sources and archives of every project.clean: removesbuildfolders, which store compiled classes and built archives.lwjgl2:jar: builds application's runnable jar, which can be found atlwjgl2/build/libs.lwjgl2:run: starts the application (legacy desktop).lwjgl3:jar: builds application's runnable jar, which can be found atlwjgl3/build/libs.lwjgl3:run: starts the application (desktop).teavm:build: builds the JavaScript/HTML application into the build/dist/webapp folder.teavm:run: serves the web application at http://localhost:8080 via a local Jetty server.test: runs unit tests (if any).
Note that most tasks that are not specific to a single project can be run with a name: prefix, where name is the ID of a specific subproject.
For example, core:clean removes the build folder only from the core project.
See RELEASING.md — pushing a version tag builds native executables for every platform via GitHub Actions and publishes them to a GitHub Release automatically.
Sonic the Hedgehog and related characters are trademarks of SEGA. This is an unofficial, non-commercial fan project using visual and audio assets originally sourced from Sonic Mania, and is not affiliated with or endorsed by SEGA.