Skip to content

OKJID/GameClient

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2,496 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Platform Renderer C++ Status Online

C&C Generals Online โ€” macOS Port

๐ŸŒ Website: general-online-zh.web.app

Native Apple Silicon macOS port of C&C Generals Zero Hour / Generals Online with a direct Metal renderer.

This is not Wine, not DXVK, not MoltenVK, and not an emulator-based wrapper โ€” it's a full native recompilation of the game engine targeting ARM64 macOS with a custom DirectX 8 โ†’ Metal translation layer.


Current Status

Area Status
Native Apple Silicon (ARM64) build โœ… Working
Direct Metal rendering backend โœ… Working
Singleplayer (Skirmish & Campaign) โœ… Working
Online multiplayer (macOS โ†” macOS) โœ… Working
Online multiplayer (macOS โ†” Windows) ๐Ÿ”„ In Progress
Native macOS audio (AVAudioEngine) โœ… Working
macOS Launcher (SwiftUI) โœ… Working
Replay compatibility (macOS โ†” macOS) โœ… Working
Replay compatibility (from Windows) ๐Ÿ”„ Requires deterministic math

Note: Cross-platform multiplayer (macOS โ†” Windows) requires deterministic math parity between ARM64 and x87 FPU pipelines. This is actively being worked on. See docs/DETERMINISTIC_MATH.md for details.


Videos

๐ŸŽฌ Installation Guide YouTube โ€” How to install C&C Generals on macOS
๐ŸŽฎ Native Metal Demo YouTube โ€” Native macOS Metal gameplay
๐Ÿ”ฅ Stress Test (8 Brutal AIs) YouTube โ€” 8 bot stress test, ~40 FPS stable

How This Differs from GeneralsX

This project is a separate effort with different goals:

This Port GeneralsX
Target platform macOS Apple Silicon (native) Linux, macOS, Windows (cross-platform)
Rendering Custom DX8 โ†’ Metal bridge DXVK (DX8 โ†’ Vulkan โ†’ MoltenVK on macOS)
Windowing Native macOS (Cocoa) SDL3
Audio AVAudioEngine (native macOS) OpenAL
App Size & Overhead ~12 MB (Native APIs, no wrappers) ~78 MB (Bundled DXVK, MoltenVK, SDL3)
Online Generals Online (new multiplayer) No online multiplayer
Simulation Targeting deterministic cross-platform sync Standard simulation
Codebase Fork of Generals Online (GOD Team) Fork of TheSuperHackers

Both projects share the same goal of keeping C&C Generals alive on modern platforms, but differ fundamentally in their architectural philosophy:

  • This Port focuses on a pure, first-class native macOS experience. By writing directly to Metal, Cocoa, and AVAudioEngine, it completely eliminates translation overhead, resulting in an extremely lightweight application (~12 MB) tailored specifically for Apple Silicon.
  • GeneralsX targets broad cross-platform compatibility. It leverages mature, heavy-duty translation layers like DXVK to achieve highly accurate graphics out-of-the-box across operating systems, though this introduces heavier binaries and platform-specific translation edge-cases (such as MoltenVK shadow bugs on macOS).

Quick Start

Prerequisites

  • Apple Silicon Mac (M1/M2/M3/M4)
  • macOS 14+ (Sonoma or later)
  • Xcode Command Line Tools (xcode-select --install)
  • Original C&C Generals Zero Hour game files (Steam)

Build & Run

sh build_run_mac.sh          # Build and launch
sh build_run_mac.sh --clean  # Clean rebuild

For detailed setup, prerequisites, and technical documentation see:


Documentation

Document Description
Platform/MacOS/docs/README.md macOS port architecture overview
Platform/MacOS/docs/SETUP.md Build setup and prerequisites
Platform/MacOS/docs/RENDERING.md DX8 โ†’ Metal rendering pipeline
Platform/MacOS/docs/FILE_SYSTEM.md File system and resource resolution
Platform/MacOS/docs/DEVELOPMENT.md Development guidelines
Platform/MacOS/docs/BUILD_SYSTEM.md CMake build system details
Platform/MacOS/docs/IMPLEMENTATION_STATUS.md Detailed implementation status
docs/MACOS_INSTALL.md Player-facing installation guide
docs/DETERMINISTIC_MATH.md Cross-platform math synchronization
docs/FAQ.md Frequently asked questions

Related Pull Requests

This port is being contributed back to the upstream projects:


Upstream

This fork is based on the Generals Online Development Team codebase. The original community project by TheSuperHackers serves as the foundation for all Generals source code efforts.

Contributing

Contributions are welcome! If you're interested in helping with the macOS port โ€” especially in areas like deterministic math, Metal rendering, or audio โ€” join the discussion in the related PRs above or open an issue.

Please read CONTRIBUTING.md before submitting a pull request.

License & Legal Disclaimer

EA has not endorsed and does not support this product. All trademarks are the property of their respective owners.

This project is licensed under the GPL-3.0 License. See LICENSE.md for details.

About

Native Apple Silicon macOS port of C&C Generals Online with direct Metal renderer and experimental online support.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 95.6%
  • C 2.7%
  • CMake 0.6%
  • Objective-C++ 0.5%
  • Python 0.2%
  • HTML 0.1%
  • Other 0.3%