Build and run on Android #22
No reviewers
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!22
Loading…
Reference in a new issue
No description provided.
Delete branch "21-android-target"
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?
The game targets a tablet now. Desktop is where work is written because it iterates
faster; a tablet is where it is confirmed.
Android dlopens a shared object and calls
android_main— it never runs amain.#[bevy_main]generates that entry point and can only generate it where the cratebuilds as a
cdylib, so the app moves intosrc/lib.rsandmain.rsbecomes aone-line caller. Both platforms assemble the identical
App.Nothing in
world/,character/,ui/, ortheme/was touched to get a running APK.That is the bet in
CLAUDE.md§ Separation of Simulation and Presentation paying out,and it is the main reason this was worth doing now rather than after there is art to
redo.
android/build.shcross-compiles withcargo-ndk, links resources and assets withaapt2, adds the library, aligns, and signs.NativeActivityneeds no Java and so noGradle.
strip = "symbols"on release is worth 60 MB of the shared object.The three ADRs are the part worth reviewing
and the costs: a second place for every change to be wrong,
NativeActivitybeing theweaker host, doubled build times.
now. A touchscreen has no hover;
movement.rscurrently draws a route to the cursor;and #6, #7, #8 are all interaction. Deciding after they land means rewriting them.
on an empty scene at native tablet resolution is fact. "Therefore drop PBR" is not
yet, because the measurement that would distinguish fill-rate from shading cost has
not been taken. Filed as its own issue.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test(114passing) are clean; desktop is unaffected.
Ran on a Pixel Tablet (Android 17, Mali-G710, 2560x1600): renders over Vulkan in 546 ms,
loads its RON definitions from the APK, and takes touch input. Frame rate is a steady
31 fps, and four defects the spike surfaced are filed separately rather than fixed here
— blank screen on resume, system insets, forced portrait, and missing font glyphs.
Closes #21
🤖 Generated with Claude Code
https://claude.ai/code/session_01TA4hJHkRSU3XBxZYtMKXdh