CnC_Generals_Zero_Hour
Command and Conquer: Generals - Zero Hour
This repository contains the original source code for Command and Conquer: Generals and its expansion pack Zero Hour, released by Electronic Arts. These are real-time strategy games where players command armies and battle opponents across a series of missions and multiplayer matches. The code is written in C++ and dates from the early 2000s.
The main practical reason EA published this code is to enable Steam Workshop support for both games, so players can create and share custom mods through Steam's built-in system. People who want to build new mods or understand how the game engine works can now read the actual code rather than relying on reverse engineering.
Compiling the code yourself is difficult by design. It requires several third-party libraries that are not included, such as an old version of the DirectX SDK, a sound system from a company called RAD, a GameSpy networking library, and others. You have to find or replace all of these before the code will build. The recommended compiler is Microsoft Visual C++ 6.0, which is from 1998. Using a modern version of Visual Studio requires extensive rewrites to the code because the C++ language standards have changed significantly since then.
If you do manage to compile it, you still need to own the game to run the result. EA sells the game on Steam and the EA App as part of the Command and Conquer: The Ultimate Collection.
A few caveats are worth knowing. EA is not accepting pull requests or bug reports for this repository. It exists for preservation and mod-enabling purposes only, and is archived without ongoing support. The code is released under the GPL v3 license with some additional terms, so anyone who builds on it and distributes their version must also share their source code under the same license.