Skip to content

Epic: Android multiplayer — status, options, and roadmap #14

Description

@fadi-labib

Summary

Can you play the Android port online / with friends? Today the answer is single-player skirmish vs AI only. This epic captures the full analysis of networked play on Android — what exists, what's blocked, and the realistic paths forward — and tracks the workstreams that could get us to remote human-vs-human play.

TL;DR: The full GameSpy client stack compiles and ships in the APK, but (a) it has never run on Android, (b) the original GameSpy master servers were shut down industry-wide in 2014, and (c) the elephant in the room is lockstep float-determinism, which means an Android build can only stay in sync with bit-identical Android builds. That single constraint collapses every option into the same reachable target: Android-vs-Android. Given that, LAN-over-VPN is dramatically less work than reviving a matchmaking server, so it's the recommended first path.

What exists today

  • Full shared netcode under Core/GameEngine/Source/GameNetwork/: LANAPI.cpp, Transport.cpp, udp.cpp, NAT.cpp, ConnectionManager.cpp, FrameData*, plus the GameSpy matchmaking/chat stack under Core/GameEngine/Source/GameNetwork/GameSpy/ (Chat.cpp, PeerDefs.cpp, GSConfig.cpp, Thread/…) and GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy*.
  • libgamespy.so is built (build/android-vulkan/libgamespy.so) and is bundled in the APK (android/app/jniLibs/arm64-v8a/libgamespy.so).
  • LAN discovery is UDP limited-broadcast based — LANAPI.cpp:84 m_broadcastAddr = INADDR_BROADCAST;, :104/:1279 allowBroadcasts(true), :203 queueSend(m_broadcastAddr, lobbyPort, …).

Documented status (not a guess)

  • docs/FAQ.md"Does multiplayer work? Untested. The GameSpy-era networking code compiles but online play hasn't been attempted on Android. Skirmish vs AI is the tested mode."
  • docs/WORKDIR/planning/ANDROID_PORT_FINDINGS_2026-07-06.md:30"Online … GameSpy SDK; cross-platform MP broken (float determinism…)."
  • docs/WORKDIR/archive/reports/SESSION_31_STATUS.md:17"GeneralsOnlineDevelopmentTeam maintains opensource GameSpy server — compatibility is MANDATORY for future integration."
  • docs/WORKDIR/archive/sessions/SESSION23_HANDOFF.md:144"Preserve infrastructure for potential community servers."

The determinism wall (why every option is Android-only)

Generals/ZH multiplayer is lockstep: every machine runs the identical simulation and exchanges only player inputs, not state. If two machines compute even one floating-point op differently, they desync within seconds. A different CPU/ABI/compiler/math-lib (arm64 + bionic + NDK clang vs x86 + MSVC on Windows) will not reproduce bit-identical results. So:

  • Android ↔ Windows GeneralsOnline players → desync, regardless of how good the matchmaking is.
  • Android ↔ Android (identical binary) → the only combination with a fighting chance of staying in sync.

Everything below is therefore scoped to Android-vs-Android until/unless determinism is explicitly solved (see the determinism sub-issue).

Workstreams (sub-issues)

Suggested order: #16#15 (validate base LAN + sync on real Wi-Fi) → #17 (add the VPN tunnel) → #18 (only if browsable matchmaking is wanted).

Recommendation

Do LAN foundation → LAN-over-VPN first. It needs zero server integration and, as a bonus, validates the netcode + determinism on Android — which is a prerequisite for the community-server path anyway. Only pursue the community server if we want discovery/matchmaking beyond a manually-shared virtual LAN.

Related: #12 (campaign / Challenge / video verification).


🤖 Analysis generated with Claude Code; filed for tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-readyEnough context for an AI agent to work autonomouslyenhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions