Skip to content

ADFA-6489 | Add the Fun and Games LibGDX template bundle - #132

Open
jimturner-adfa wants to merge 8 commits into
mainfrom
feat/fun-and-games-libgdx
Open

jimturner-adfa wants to merge 8 commits into
mainfrom
feat/fun-and-games-libgdx

Conversation

@jimturner-adfa

@jimturner-adfa jimturner-adfa commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds Fun and Games LibGDX, a template bundle with three playable libGDX 1.13.1 games, converted from the standalone FunandGames-libGDX repository. It is the libGDX counterpart of Fun and Games JME from #131, and uses that PR's libraries field the same way: libGDX ships in each game's app/libs/ instead of being fetched from Maven Central.

Template Language Game
Demo (libGDX) Java A 3D Earth you drag to spin, an orbiting rocket, a starfield
Block Game (libGDX) Kotlin The falling-block puzzle
Bubble Wand (libGDX) Kotlin A first-person bubble shooter

Details

  • Same layout as Fun and Games JME: addon.json (org.appdevforall.funandgameslibgdx), the gallery page, README.md, .gitignore, and day and night icons. The game source is unchanged from the source repository.
  • templates.json lists five files per game from Maven Central, with sha256, to app/libs:
    • gdx-1.13.1.jar
    • gdx-jnigen-loader-2.5.2.jar, which gdx depends on
    • gdx-backend-android-1.13.1.aar
    • the gdx-platform natives jars for armeabi-v7a and arm64-v8a
  • Each app/build.gradle.peb uses those files instead of Maven. Where libGDX differs from jME:
    • AndroidX: a local .aar does not carry its dependencies, so androidx.core:core is declared directly, at the 1.9.0 the template already forces for Code on the Go's offline repository.
    • Native code: copyAndroidNatives now unpacks libgdx.so into build/gdx-natives/<abi>/ instead of app/libs/<abi>/. A Copy task owns its whole destination, so with the jars in app/libs Gradle 9 counted them as its output and failed compileDebugJavaWithJavac for an undeclared implicit dependency. This was found on the device and fixed.
    • .gitignore: each template's .gitignore drops its app/libs/ line, which would have kept the jars out of generated projects' git.
  • The docs get the corrections the ADFA-6489 | Download third-party libraries into .cgt templates #131 review made to Fun and Games JME: the "How the IDE finds it" paragraph, the bundle size, and a Demo README written for Code on the Go rather than Android Studio.
  • The .cgt is about 7.8 MB.

Testing

  • addons check passes and the bundle builds. The workflow's template checks pass locally: XML, JSON5, Pebble brace balance, and no unwanted files.
  • On a device (Pixel 6 Pro): the bundle installs from the Extensions Manager, and all three games build and run.
  • On the desktop: each game was rendered from the template and built with assembleDebug, using AGP 9.3.1, Gradle 9.6.1 and the configuration cache. Each APK contains libgdx.so for both ARM ABIs, and libGDX never entered the Gradle cache, so it came only from app/libs.
  • The last commit, the doc corrections, was not re-tested on the device. It changes no build or source file.

Ticket

Follow-up to ADFA-6489 (#131).

Update: Block Game rename and displayName (ab41fee)

  • ADFA-6568: Tetris is an enforced trademark, so the falling-block template is now Block Game (libGDX). That covers the tetris/ → blockgame/ directory, TetrisGame → BlockGame, TetrominoType → PieceType, and the README, addon.json and gallery page. This matches the JME bundle's rename in ADFA-6568 | Rename the Tetris template to Block Game #140.
  • ADFA-6571: templates.json has a top-level "displayName": "Fun and Games", the same as the JME bundle in ADFA-6571 | Give Fun-and-Games-JME a collection displayName #141 (changed from "Fun and Games (libGDX)" in 502306f), which titles the bundle's Extensions Manager card once the IDE reads it (ADFA-6570). Older IDEs ignore the key.
  • Checked: addons check passes, and the built .cgt lists demo, blockgame and bubblewand with the new displayName. No tetris text is left. This update was not re-tested on a device.

🤖 Generated with Claude Code

yaturner and others added 2 commits October 13, 2026 06:53
Converts the standalone FunandGames-libGDX repository into a template
addon under templates/Fun-and-Games-LibGDX, the same way as Fun and Games
JME: three playable libGDX 1.13.1 games (Demo in Java, Tetris and Bubble
Wand in Kotlin), with addon.json, the gallery page, README.md, .gitignore
and day/night icons.

templates.json lists the libGDX files under "libraries" (gdx, its
gdx-jnigen-loader dependency, gdx-backend-android as an .aar, and the
armeabi-v7a and arm64-v8a natives jars) from Maven Central, pinned by
sha256, into app/libs. Each app/build.gradle uses those files instead of
Maven. A local .aar does not carry its dependencies, so androidx.core is
declared directly, at the 1.9.0 the template already forces.

copyAndroidNatives now unpacks libgdx.so into build/gdx-natives/<abi>/
rather than app/libs/<abi>/. A Copy task owns its whole destination, so
with the jars in app/libs Gradle 9 counted them as its output and failed
compileDebugJavaWithJavac for using them without depending on the task.
The template .gitignore drops its app/libs/ line, which would also have
kept the jars out of generated projects' git.

Verified on a Pixel 6 Pro: the bundle installs, and all three games build
and run. Each game also builds on the desktop (AGP 9.3.1, Gradle 9.6.1,
configuration cache on) without libGDX ever entering the Gradle cache.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The review of #131 corrected the Fun and Games JME docs; apply the same
corrections here. The gallery page's "How the IDE finds it" now describes
the Extensions Manager install, and Limitations gives the bundle size.
Demo's README drops the missing screenshot and the Android Studio steps,
describes running in Code on the Go with libGDX in app/libs, and names the
libGDX license (Apache 2.0) instead of MIT. Docs only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…layName

Tetris is a trademark The Tetris Company actively enforces, including
against block games whose names end in "-tris". Rename the falling-block
template to "Block Game (libGDX)": the template directory (tetris/ ->
blockgame/), the game class (TetrisGame -> BlockGame), the piece enum
(TetrominoType -> PieceType), and every mention in the gallery summary,
README and gallery page. This matches the rename of the JME bundle.

Also give the bundle a collection-level "displayName": "Fun and Games
(libGDX)" in templates.json, so its Extensions Manager card no longer
takes the first template's name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimturner-adfa and others added 3 commits October 16, 2026 14:56
Replaces the placeholder thumb.png in demo, blockgame and bubblewand
(blockgame and bubblewand shared one blue square) with the new artwork:
512x512 RGBA on a transparent background, matching Flutter-Starter-Kit.

- demo: the round art came on opaque white corners; masked to a circle
  with an anti-aliased 2 px inset so no white fringe shows on dark themes.
- bubblewand: square art, resized.
- blockgame: already a transparent 500 px circle, centred on the 512
  canvas rather than upscaled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every template shipped the same 48x48 blue square as ic_launcher.png in
all four mipmap densities, so a generated app showed a blue box on the
home screen, in Recents, and in the install and Play Protect prompts.

- ic_launcher.png now uses the template's own art at the right size per
  density: mdpi 48, hdpi 72, xhdpi 96, xxhdpi 144.
- New mipmap-xxxhdpi (192) so high-density screens do not upscale 144.
- New app/src/main/ic_launcher-playstore.png (512x512) for the Play Store
  listing, following Android Studio's Image Asset convention.

Sourced from the 512 px thumb.png, which is already masked to a
transparent background.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimturner-adfa

Copy link
Copy Markdown
Contributor Author

Added ADFA-6567's icons to the libGDX templates, the same files as #146 uses for jME: new thumb.png (fabba56), and the app's ic_launcher at every density plus ic_launcher-playstore.png (e07b70e). Before this, every template shipped the same blue square. Checked on a device: the New Project screen shows the new art, and a project created from the updated bundle gets the new launcher icons.

Use the same displayName as the JME bundle (#141), dropping the
"(libGDX)" suffix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants