Port the ActorInstanceBattle combo state machine, CRaceMotionData attack
data, player motion/combo tables, NEW_Attack + OnAttack/OnHit packets and
remote FUNC_ATTACK/FUNC_COMBO playback so keyboard and touch attacks swing
and hit on the real-server path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route each finger to UI, the attack button, a floating lower-left joystick or
the camera (drag rotate, pinch zoom, tap = world click). Touch mode is default
on Android/iOS and available on desktop via --touch / AVA2_TOUCH=1; it disables
SDL touch-to-mouse and drives app.ENABLE_MOBILE_HUD. The joystick feeds the
original camera-relative movement path and the attack button sets the same
attack-key state as player.SetAttackKeyState. New `touch` Python module; the
mobile HUD joystick and combat wheel become display-only.
Tests: ava2.touch_router, ava2.touch_game (GameWindow + mobile HUD).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SDL_StartTextInput was called once for the whole session, which keeps the
Android soft keyboard over the game. Where SDL reports on-screen keyboard
support, the frame loop now starts/stops text input with the original
EditLine focus (ime.EnableCaptureInput/DisableCaptureInput in ui.py), the
in-game chat and the dev login view. Desktop keeps text input always on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The APK holds code only: on Android the client enters
SDL_GetAndroidExternalStoragePath() at startup, where the flattened client
root (assets/loose + python-root + python27.zip) is pushed. Script-root
discovery now also accepts a flattened root (game.py beside uiscript/) in
the working directory. Missing data shows a message box, and fatal errors
go to logcat because stderr is not captured on Android.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Water, network-actor, flying-effect and weapon-trace clocks used
frames*0.033 or frames/60, and the sky box, effect.Update, fly.Update and
render-target previews advanced a fixed 1/30 or 1/60 s per call, so their
speed followed the frame rate. They now use the measured frame delta
(game_clock = sum of dt in main; GetGameFrameDelta for the Python-driven
paths; elapsed SDL ticks for render targets). --frames runs keep their
fixed 0.033 s step. The SpeedTree wind update is left unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port CGrannyLODController::UpdateLODLevel and
CGrannyModelInstance::Update(dwAniFPS): actors whose model has a
_lod_01.gr2 sibling and stand more than 500 units from the camera
target get 30-120 animation FPS by camera distance (LODDISTANCE_ACTOR
5000, LODDISTANCE_BUILDING 25000 for models of 500+ units), and their
pose time only advances every 120/fps frames, so the SDK's cached pose
is reused in between. Restarted or switched motions re-sample at once.
The _lod_ meshes themselves are still not swapped in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TerrainHeightmap::AppendCulledDrawRefs references the cached, shared-
geometry patch commands for the visible quadtree patches (writing the
background light into the cache) instead of copying them into a new
vector each frame. BuildCulledDraws keeps its copying behaviour on top
of it for existing callers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDL_GPU pipeline renders into its own view-sized colour target and
already composites it over the whole render target, so routing it through
gpu_scene_texture cost one extra same-size copy per frame. The scaled
intermediate is now used only by the SDL geometry fallback; the hardware
composite upscales with linear filtering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AVA2 builds with ENABLE_MAP_OBJECT_OPTIMIZATION: CArea::
__UpdateLoadedObjectInstances unloads objects whose 2D distance from the
main actor is at least max(OBJECT_DIST, 5000). CPythonBackground::Update
now takes the main actor position (as CPythonApplication passes it) and
sets that loading center on MapObjectManager, which skips farther
objects before their frustum test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MapObjectManager::AppendDrawRefs references each visible object's cached
Render3DDraw (writing the per-frame light into the cache) rather than
copying the whole command (two texture strings, shared_ptrs, matrices)
every frame. main.cpp flattens owned draws and refs in submission order
(FlattenDraws) and passes a pointer list to RenderSceneGPU/RenderScene.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Network actor ground shadows use the actor's own IsVisible frustum
test (its bounds cover the shadow) instead of building 17-vertex
meshes with terrain queries for every actor on the map.
- Shadow ring uses a precomputed sin/cos table and reserved streams.
- Frame and network draw vectors reserve last frame's peak count and
append network draws in one insert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>