Repository navigation
Releases
Releases · zwaetschge/theforest-android
The Forest Android 0.2.3
0.2.3 – Multi-Client WASAPI Audio Mixer Fix (Eliminates Choppy Audio)
- Root Cause Found & Fixed — Dual WASAPI Clients Interleaving Silence (
runtime/src/wasapi.c,android/native/android_main.c):- The Forest opens two concurrent WASAPI render clients inside the same process: Unity 5.6's built-in FMOD (
TheForest.exe,2 ch 16-bit pcm, outputting pure silence) and FMOD Studio (fmod.dll,2 ch 32-bit float, outputting the entire game soundtrack and SFX). - Previously, each
IAudioClientspawned its ownpump_threadand calledw64_audio_sink_open, overwriting the single globalSDL_AudioStream *g_astreamso both threads pushed alternating 5–10 ms chunks of silence and real game audio sequentially into the same stream (concatenating instead of mixing!). - Replaced per-client pump threads with a single shared WASAPI master mixer engine (
master_pump_thread,nice -16) that opensg_astreamonce (guarded byg_audio_mu), sample-accurately sums all activestartedclients with clamping, keeps each client's WASAPI ring at FMOD's requested1920frames (40 ms <= 2FMOD mixer blocks so FMOD's feeder never overruns into an unmixed block), paces output at1:1real-time (240frames /5 ms, gentle480-frame fill up to a70–100 msSDL3 cushion), and reports per-client peaks and fill levels every 10 s.
- The Forest opens two concurrent WASAPI render clients inside the same process: Unity 5.6's built-in FMOD (
Source-only release — build the APK from your own PC copy via ./build.sh "/path/to/The Forest".
The Forest Android 0.2.2
0.2.2 – Smooth Audio Pipeline (WASAPI, AAudio & Thread Priorities)
- Zero Synthetic Silence Gaps & Larger Audio Headroom (
runtime/src/wasapi.c):- Eliminated synthetic
0.0fsilence-padding on partial reads inpump_thread(previously injected audible silence gaps whenever FMOD's 1024-frame DSP mix / 10 ms waitable timer was out of phase with the pump tick); only real audio frames produced by FMOD are forwarded to SDL3. - Raised the WASAPI ring buffer floor from
40 ms(1920frames) to80 ms(3840frames, staying within FMOD's 4096-frame internal ring), increased the SDL3 AudioStream queue headroom from40 msto120 ms(5760frames) with a5 mspump cadence, and clamped sleep drift across GC/loading stalls to prevent catch-up drain bursts. - Added detailed 10 s telemetry (
empty,sink_low,q=min..max ms).
- Eliminated synthetic
- Stable Android AAudio Buffering & Lifecycle (
android/native/android_main.c):- Disabled
SDL_HINT_ANDROID_LOW_LATENCY_AUDIO("0") and requested1024-frame device callbacks (SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES="1024") beforeSDL_OpenAudioDeviceStream, eliminatingAAUDIO_PERFORMANCE_MODE_LOW_LATENCYhardware underflows under heavy Unity + DXVK + Mono GC load. - Properly pauses & flushes the SDL3 audio stream on
SDL_EVENT_WILL_ENTER_BACKGROUNDand resumes cleanly onSDL_EVENT_DID_ENTER_FOREGROUND.
- Disabled
- Real Win32 Thread Priorities & Non-Bursting Waitable Timers (
runtime/src/k32_sync.c):- Implemented real Linux
setpriority(PRIO_PROCESS, tid, nice)inSetThreadPriority_(previously a no-op), giving FMOD'sTHREAD_PRIORITY_TIME_CRITICALmixer/feeder threadsnice -16(ANDROID_PRIORITY_AUDIO),pump_threadnice -16, andwtimer_mainnice -12so audio outranks Unity/DXVK worker threads. - Clamped
wtimer_mainperiodicnext_dueagainst wall clock to prevent wake-up bursts after pauses.
- Implemented real Linux
Source-only release — build the APK from your own PC copy via ./build.sh "/path/to/The Forest".
The Forest Android 0.2.1
Source-only release (build your own APK from your own PC copy via ./build.sh).
What's New in 0.2.1
- Direct Android Hardware Controller Driver (
ForestActivity.java,android_main.c): Captures physical gamepad keys, D-Pad, dual sticks, and triggers directly into XInput slot 0 with0.12deadzone, bypassing SDL3's strictSOURCE_JOYSTICKfilter and duplicated trigger axis mapping (e.g. AYN Odin 3 built-in Xbox Wireless Controller). - Full Controller-Only NGUI Menu Navigation (
user32.c,k32_file.c,tf_compat.c,xinput.c): Exposes the virtual XInput gamepad (VID_045E&PID_028E&IG_00) via RawInput and implements Unity 5.6's HID button pipeline (CreateFileW, asyncReadFile/GetOverlappedResult,HidD_GetPreparsedData,HidD_GetProductString,HidP_GetCaps,HidP_GetButtonCaps,HidP_GetData,HidP_MaxDataListLength) soA(Submit),B(Back),Y(Skip Intro), andStart(Pause / Resume) work across all menus without touch taps. - Auto-Hiding On-Screen Pad & Touch Polish (
PadView.java,android_main.c,user32.c): Automatically hidesPadViewwhen a physical controller is detected/used (still toggleable via top-rightPad), adds an optional Right-Stick menu cursor ring, and fixes first-tap menu clicks when switching from controller back to touch. - Verified (Samsung Galaxy Tab S8 Ultra): 100% controller-only flow verified end-to-end (Title → Single Player → New Game → Back → Single Player → New Game → Normal →
ForestMain_v08→Yintro skip →StartPause →AResume,0 of 1000 blocks shortFMOD audio).
The Forest Android 0.2.0
Source-only release (build the APK yourself from your own PC copy via ./build.sh; no APK or game assets included).
Highlights
- 3.3×–3.6× Open-World Speedup: Samsung Galaxy Tab S8 Ultra (
1280×800, Snapdragon 8 Gen 1) improves from 9.8 fps (102.1 ms) in0.1.0to 30.9–34.2 fps (p50 = 27.5–32.6 ms) out of the box (2.13× pure-CPU speedup at identical PC Medium settings:9.8 → 19–21 fps). Title screen runs locked at 60.4 fps. - 99.3%
-O2Coverage (APK79.8 MB → 64 MB): Boehm GC guest stack root scanner frees0038..0045to-O2; NGUI/Unity-O0narrowed to just 4.5 of 619 units (0019..0022+0018cold tail). - Lock-Free
SYS_futexSemaphores & Mobile Worker Cap: Adaptive-spin futex semaphores + Android default4logical CPUs (W64_NCPUoverridable) cutReleaseSemaphoreoverhead from19.1% → 3.4%and halve kernelsysCPU. - Native ARM64 NEON & Intrinsic Hot Paths: 4-bone skinned mesh blending, FMOD Vorbis Huffman & 128-bit bitstream decoder, fast TLS
GetGfxDevice(), and native CRT functions. - Crisp Mobile Graphics Preset (
QualityPreset.java): Automatically seeds sharpFullRestextures +FXAA+ mobile-tuned shadows/physics on first launch (or once on upgrade from0.1.0) while keeping allOPTIONS → GRAPHICSsettings editable, plus a 1-tap reset button in the Launcher.
v0.1.0 — Initial Android arm64 static recompilation
First public source release of The Forest – Android port (build it yourself).
No prebuilt APK is attached and no game files are included. Build the APK yourself from your own legally acquired PC copy using
./build.sh "/path/to/The Forest".
Highlights
- 5-Module Static x86-64 → C → ARM64 Recompilation: Lifted 246,400 functions across
TheForest.exe(231,740),fmodstudio.dll(9,321),fmod.dll(4,196),CSteamworks.dll(981), andUnityImageNativePlugin.dll(162) into 619 C units (603/619 = 97.4% at-O2 -march=armv8.2-a, 16 units at-O0inconfig/o0_host.txtfor Unity/NGUI stability; resulting APK ~76.1 MiB / 79.8 MB). - Native ARM64 Unity Mono 4.8 (
unity-5.6-mbe): Cross-compiled Boehm-GC Mono runtime + ARM64 Win64-ABI trampolines and 13 open-source BCL DLLs, including aThread.Start(object)compatibility fix forAstarPath/mutantController(0exceptions on world load). - Direct3D 11 → Vulkan 1.1 (DXVK Native 1.9.2b): Android WSI bridge,
dxvk-async(2 compiler threads), and persistent AdrenoVkPipelineCache(vk_pipeline.cache) +app_process64.dxvk-cache. - FMOD Studio Audio (WASAPI → SDL3): Native
IAudioClient/IAudioRenderClientbridge to 48 kHz stereo SDL3 output (0 of 1000 blocks short). - Controls & Android Launcher: Physical XInput gamepad support, toggleable on-screen
PadViewwith right-half touch-look and menu tap-to-click, resolution toggle (1280×720default or native), SAF folder importer, and automatic ZIP/ZIP64 data-pack extraction. - Verified on AYN Odin 3 (Snapdragon 8 Elite / Adreno 830, Android 15,
1280×720):- 3D Cave Title Screen: 59.7–60.3 fps (
p50 = 16.5–16.8 ms,0frames ≥ 30 ms steady-state,1.11 GBPSS). - Open-World
ForestMain_v08:7.8 sload +9.8 sactivation (0exceptions), 14.1–16.3 fps outdoor 3D Forest gameplay (p50 = 68.1–71.7 ms,2.07 GBPSS), background/resume verified with same PID.
- 3D Cave Title Screen: 59.7–60.3 fps (