Skip to content

Releases

The Forest Android 0.2.3

Choose a tag to compare

@zwaetschge zwaetschge released this 01 Dec 22:04

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 IAudioClient spawned its own pump_thread and called w64_audio_sink_open, overwriting the single global SDL_AudioStream *g_astream so 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 opens g_astream once (guarded by g_audio_mu), sample-accurately sums all active started clients with clamping, keeps each client's WASAPI ring at FMOD's requested 1920 frames (40 ms <= 2 FMOD mixer blocks so FMOD's feeder never overruns into an unmixed block), paces output at 1:1 real-time (240 frames / 5 ms, gentle 480-frame fill up to a 70–100 ms SDL3 cushion), and reports per-client peaks and fill levels every 10 s.

Source-only release — build the APK from your own PC copy via ./build.sh "/path/to/The Forest".

The Forest Android 0.2.2

Choose a tag to compare

@zwaetschge zwaetschge released this 01 Dec 21:47

0.2.2 – Smooth Audio Pipeline (WASAPI, AAudio & Thread Priorities)

  • Zero Synthetic Silence Gaps & Larger Audio Headroom (runtime/src/wasapi.c):
    • Eliminated synthetic 0.0f silence-padding on partial reads in pump_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 (1920 frames) to 80 ms (3840 frames, staying within FMOD's 4096-frame internal ring), increased the SDL3 AudioStream queue headroom from 40 ms to 120 ms (5760 frames) with a 5 ms pump 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).
  • Stable Android AAudio Buffering & Lifecycle (android/native/android_main.c):
    • Disabled SDL_HINT_ANDROID_LOW_LATENCY_AUDIO ("0") and requested 1024-frame device callbacks (SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES="1024") before SDL_OpenAudioDeviceStream, eliminating AAUDIO_PERFORMANCE_MODE_LOW_LATENCY hardware underflows under heavy Unity + DXVK + Mono GC load.
    • Properly pauses & flushes the SDL3 audio stream on SDL_EVENT_WILL_ENTER_BACKGROUND and resumes cleanly on SDL_EVENT_DID_ENTER_FOREGROUND.
  • Real Win32 Thread Priorities & Non-Bursting Waitable Timers (runtime/src/k32_sync.c):
    • Implemented real Linux setpriority(PRIO_PROCESS, tid, nice) in SetThreadPriority_ (previously a no-op), giving FMOD's THREAD_PRIORITY_TIME_CRITICAL mixer/feeder threads nice -16 (ANDROID_PRIORITY_AUDIO), pump_thread nice -16, and wtimer_main nice -12 so audio outranks Unity/DXVK worker threads.
    • Clamped wtimer_main periodic next_due against wall clock to prevent wake-up bursts after pauses.

Source-only release — build the APK from your own PC copy via ./build.sh "/path/to/The Forest".

The Forest Android 0.2.1

Choose a tag to compare

@zwaetschge zwaetschge released this 27 Nov 18:37

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 with 0.12 deadzone, bypassing SDL3's strict SOURCE_JOYSTICK filter 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, async ReadFile / GetOverlappedResult, HidD_GetPreparsedData, HidD_GetProductString, HidP_GetCaps, HidP_GetButtonCaps, HidP_GetData, HidP_MaxDataListLength) so A (Submit), B (Back), Y (Skip Intro), and Start (Pause / Resume) work across all menus without touch taps.
  • Auto-Hiding On-Screen Pad & Touch Polish (PadView.java, android_main.c, user32.c): Automatically hides PadView when a physical controller is detected/used (still toggleable via top-right Pad), 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 → Y intro skip → Start Pause → A Resume, 0 of 1000 blocks short FMOD audio).

The Forest Android 0.2.0

Choose a tag to compare

@zwaetschge zwaetschge released this 27 Nov 16:44

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) in 0.1.0 to 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% -O2 Coverage (APK 79.8 MB → 64 MB): Boehm GC guest stack root scanner frees 0038..0045 to -O2; NGUI/Unity -O0 narrowed to just 4.5 of 619 units (0019..0022 + 0018 cold tail).
  • Lock-Free SYS_futex Semaphores & Mobile Worker Cap: Adaptive-spin futex semaphores + Android default 4 logical CPUs (W64_NCPU overridable) cut ReleaseSemaphore overhead from 19.1% → 3.4% and halve kernel sys CPU.
  • 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 sharp FullRes textures + FXAA + mobile-tuned shadows/physics on first launch (or once on upgrade from 0.1.0) while keeping all OPTIONS → GRAPHICS settings editable, plus a 1-tap reset button in the Launcher.

v0.1.0 — Initial Android arm64 static recompilation

Choose a tag to compare

@zwaetschge zwaetschge released this 27 Nov 06:28

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), and UnityImageNativePlugin.dll (162) into 619 C units (603/619 = 97.4% at -O2 -march=armv8.2-a, 16 units at -O0 in config/o0_host.txt for 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 a Thread.Start(object) compatibility fix for AstarPath / mutantController (0 exceptions on world load).
  • Direct3D 11 → Vulkan 1.1 (DXVK Native 1.9.2b): Android WSI bridge, dxvk-async (2 compiler threads), and persistent Adreno VkPipelineCache (vk_pipeline.cache) + app_process64.dxvk-cache.
  • FMOD Studio Audio (WASAPI → SDL3): Native IAudioClient / IAudioRenderClient bridge to 48 kHz stereo SDL3 output (0 of 1000 blocks short).
  • Controls & Android Launcher: Physical XInput gamepad support, toggleable on-screen PadView with right-half touch-look and menu tap-to-click, resolution toggle (1280×720 default 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, 0 frames ≥ 30 ms steady-state, 1.11 GB PSS).
    • Open-World ForestMain_v08: 7.8 s load + 9.8 s activation (0 exceptions), 14.1–16.3 fps outdoor 3D Forest gameplay (p50 = 68.1–71.7 ms, 2.07 GB PSS), background/resume verified with same PID.