Android as a target platform #21
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org#21
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Make Android a first-class target: the game must run on a tablet, not merely compile
for one.
A spike proved this is viable before any art exists to waste. The crate cross-compiles
to
aarch64-linux-androidin under two minutes, first try, with no dependency patchedand no feature disabled. On a Pixel Tablet (Android 17, Mali-G710, 2560x1600) the
mission view renders over Vulkan in 546 ms, RON definitions load from the APK, and
tapping a menu button transitions state.
Scope
src/lib.rsholds the app assembly behind#[bevy_main];src/main.rsbecomes aone-line caller. Android dlopens a shared object and calls
android_main— it neverruns a
main— and#[bevy_main]can only generate that entry point where the cratebuilds as a
cdylib.Cargo.tomlgainscrate-type = ["lib", "cdylib"], theandroid-native-activityfeature under
cfg(target_os = "android"), andstrip = "symbols"on release (worth60 MB of the shared object).
android/AndroidManifest.xmlandandroid/build.sh— cross-compile withcargo-ndk,aapt2 link, add the library, align, sign. No Gradle:NativeActivityneeds no Java.0003 (touch-first input), and
0004 (render budget,
Proposed).
docs/ROADMAP.mdandCLAUDE.mdupdated to record the platform and how to build forit.
Not in scope
The spike surfaced problems that are their own issues rather than this one: the blank
screen on resume, system insets, forced portrait, the missing font glyphs, touch camera
gestures, the movement-preview rework, and the render-resolution measurement that ADR
0004 is waiting on.
Moving from
NativeActivityto GameActivity is also deferred — it needs theandroidx.gamesAAR and with it Gradle and the Android Gradle Plugin's dependency tree,which is a build-system decision to make deliberately.
Done when
android/build.sh --installproduces a signed APK, installs it, and the mission viewruns on the tablet; desktop
build,test,clippy, andfmtare unaffected.