Jump to content
Sign in to follow this  
dagelf

Packaging of compilable CnC Source Code... and new dev forum?

Recommended Posts

With the release of the sources for most CnC games eg https://github.com/electronicarts/CnC_Generals_Zero_Hour and the instant "archival" of the offical Repos, it looks like there's a vacuum for a place to discuss development until a leading repo emerges.... How about here?

It would of course be immensely beneficial to be able to package the development environment in a compilable state. I know it's possible to create a Windows XP VM that's about 4GB in size... that might be a good starting point to get something compilable so as to be able to remove the now obviously unnecessary dependencies...

My personal goal would be to get it running without "The game has detected a mismatch" ... anywhere, but I think on Linux is probably going to be the most repeatable/stable environment. Maybe under Wine on SteamOS.... that way we get Windows working too. In theory.

Some preliminary research.

Key Points
- The best forum for discussing development seems to be the Generals / Zero Hour forum on CNCNZ.com, with over 9,816 posts indicating active community engagement.
- Dependencies for the project include DirectX SDK, STLport, and others; some are available for download, while others like 3DSMax 4 SDK may require contacting vendors.
- Packaging in a VM with Windows XP is likely the simplest approach, though Docker with a Windows container is possible but complex.
- Improving the Wine version for Linux seems more feasible than a native Linux compilation, potentially taking months to a year based on community effort.
- The state-of-the-art debugger for Linux, winedbg, is suitable for debugging Windows applications via Wine.

Best Forum for Development Discussions - according to Grok 3 :-D
It seems likely that the Generals / Zero Hour forum on CNCNZ.com is the best place for development discussions, given its high activity with over 9,816 posts. This forum is dedicated to the game and may cover related projects, though specific mentions of this GitHub repository were not found.

Dependencies and Packaging
The project requires several dependencies, including DirectX SDK, STLport 4.5.3, and others. Here are some download links where available:
- DirectX SDK 9.0 or higher: Microsoft download center.
- STLport 4.5.3: SourceForge.
- Others like 3DSMax 4 SDK and SafeDisk API may need vendor contact or archived sources, as they are not freely available online.

For packaging, using a Virtual Machine (VM) with Windows XP is likely the easiest, as it supports the game's native environment. Docker is possible with a Windows container, but it's more complex due to the game's age and dependencies.

Time for Linux Compilation or Improved Wine Version
Research suggests improving the Wine version is more feasible than compiling for Linux, given the Windows-specific code. It could take months to a year, depending on community interest and effort, as the game already runs on Wine with some bugs, like online play issues.

State-of-the-Art Debugger for Linux
For debugging on Linux, winedbg is the go-to tool, designed for Windows applications running via Wine. It's suitable for forward and backward stepping, though it may have stability issues with complex applications.

Survey Note: Comprehensive Analysis of CnC Generals Zero Hour Development and Tools
This section provides a detailed examination of the user's query regarding the GitHub project for CnC Generals Zero Hour, focusing on forum activity, dependencies, packaging methods, Linux compatibility, and debugging tools. The analysis is grounded in extensive research into community forums, official documentation, and technical resources, ensuring a thorough understanding for both technical and lay audiences.

Forum Analysis for Development Discussions
The search for the best forum where development of the GitHub project is discussed began with examining the repository itself, which is noted for preservation purposes and does not accept contributions or provide support. Given this, the focus shifted to active community platforms. Several forums were identified, including:

- CNCNZ.com forums, particularly the Generals / Zero Hour section, with 9,816 posts, indicating significant activity. This forum covers various aspects of the game, including mods and technical support, making it a likely candidate for development discussions.
- GameReplays.org has a dedicated CNC Zero Hour section with active ladders and tournaments, but specific mentions of the GitHub project were not found, suggesting it may be more focused on gameplay.
- Other forums like C&C Labs and Neoseeker were considered, but activity levels appeared lower, with older posts dominating.

Given the high post count and relevance, CNCNZ.com's Generals / Zero Hour forum is recommended as the primary venue, though direct references to the GitHub project (e.g., "dagelf" or the repository URL) were not found in initial searches, suggesting discussions may be implicit within broader game topics.

[h4]Dependencies and Their Acquisition[/h4]
The GitHub repository lists several dependencies for rebuilding the source code, as detailed in the project documentation. Below is a table summarizing these dependencies, their versions, and where possible, download links:

Dependency: DirectX SDK
Version: 9.0 or higher
Expected Path: \Code\Libraries\DirectX\
Download Link/Notes: Microsoft download center, end-of-life, use for legacy software.
https://www.microsoft.com/en-us/download/confirmation.aspx?Id=35

Dependency: STLport
Version: 4.5.3
Expected Path: \Code\Libraries\STLport-4.5.3
Download Link/Notes: SourceForge, patch at GitHub repository.
https://sourceforge.net/projects/stlport/files/STLport%20archive/STLport%204/STLport-4.5.3.tar.gz

Dependency: 3DSMax 4 SDK
Version: -
Expected Path: \Code\Libraries\Max4SDK\
Download Link/Notes: Contact Autodesk or search archives, not freely available.

Dependency: NVASM
Version: -
Expected Path: \Code\Tools\NVASM\
Download Link/Notes: Available via Internet Archive or GitHub repository links.
https://archive.org

Dependency: BYTEmark
Version: -
Expected Path: \Code\Libraries\Source\Benchmark
Download Link/Notes: Download from Internet Archive.
https://archive.org/details/BYTEMARK_ZIP

Dependency: RAD Miles Sound System SDK
Version: -
Expected Path: \Code\Libraries\Source\WWVegas\Miles6\
Download Link/Notes: RAD Game Tools, commercial, contact for evaluation.
https://www.radgametools.com/miles.htm

Dependency: RAD Bink SDK
Version: -
Expected Path: \Code\GameEngineDevice\Include\VideoDevice\Bink
Download Link/Notes: RAD Game Tools, commercial, contact for evaluation.
https://www.radgametools.com/bnkdown.htmDependency: ZLib
Version: 1.1.4
Expected Path: \Code\Libraries\Source\Compression\ZLib\
Download Link/Notes: zlib.net.
https://zlib.net/fossils/zlib-1.1.4.tar.gz

Dependency: LZH-Light
Version: 1.0
Expected Path: \Code\Libraries\Source\Compression\LZHCompress\CompLibSource, CompLibHeader
Download Link/Notes: Look for open-source implementations, e.g., lzhl on GitHub.
https://github.com/ryandrake08/lzhl
 

Things to gut/remove:

Dependency: SafeDisk API
Version: -
Expected Path: \Code\GameEngine\Include\Common\SafeDisk, \Code\Tools\Launcher\SafeDisk\
Download Link/Notes: Proprietary, search for documentation or source code online, no direct download.

Dependency: Miles Sound System "Asimp3"
Version: -
Expected Path: \Code\Libraries\WPAudio\Asimp3
Download Link/Notes: Likely a typo for Assimp, download from Assimp website.
https://www.assimp.org

Dependency: GameSpy SDK
Version: -
Expected Path: \Code\Libraries\Source\GameSpy\
Download Link/Notes: No longer supported, use open-source alternatives like UniSpySDK.
https://github.com/GameProgressive/UniSpySDK


Note that some dependencies, such as 3DSMax 4 SDK and SafeDisk API, are not readily available and may require contacting the original vendors or searching archived resources, adding complexity to the setup process.

Packaging Dependencies in Docker or VM
Packaging all dependencies for the project can be approached via a Virtual Machine (VM) or Docker, with considerations for the game's Windows-centric nature.

- VM Approach: Setting up a VM with Windows XP is recommended for simplicity, as it natively supports the game's environment. Install the game and dependencies, ensuring compatibility with patches like GenPatcher for modern Windows versions. This method is well-documented for running old games, as seen in guides like C&C Community's how-to-play guide.

- Docker Approach: Using Docker with a Windows container is possible but more complex, given the need for a Windows base image and the game's age. Research indicates running old Windows games in Docker involves setting up GUI support and sharing resources like sound devices, as discussed in Misha Brukman's blog. However, given the dependency list, ensuring all libraries (e.g., DirectX, STLport) work within a container may require significant customization, making VM the preferred choice for ease.

Given the project's preservation focus and the complexity of Docker for Windows applications, a VM with Windows XP is likely the best method, ensuring all dependencies are encapsulated without compatibility issues.

Time Frame for Linux Compilation or Improved Wine Version
The game, originally released in 2003, is Windows-specific, using DirectX and other Windows APIs. Compiling it natively for Linux would require significant porting efforts, given the source code's Windows dependencies. Conversely, running it via Wine is already possible, with a "Gold" compatibility rating on WineHQ, indicating good functionality but potential bugs, such as online play issues noted in community forums like Revora Forums.

Improving the Wine version seems more feasible, focusing on fixing bugs like graphics glitches or multiplayer crashes. The time frame depends on community effort; given the game's age and niche interest, it could take several months to a year for significant improvements, assuming active development. A native Linux compilation is less likely in the near term, given the effort required, and may not be prioritized by the community.

State-of-the-Art Debugger for Linux
For debugging Windows applications on Linux via Wine, the state-of-the-art tool is winedbg, Wine's integrated debugger. It supports forward and backward stepping, essential for diagnosing issues in applications like CnC Generals Zero Hour. Research highlights winedbg's use for debugging, as seen in Linux Magazine's practical Wine guide, and it's noted for handling Windows DLL issues. While GDB can be used with Wine via proxy modes, winedbg is specifically designed for this purpose, though it may have stability issues with complex applications, as mentioned in Stack Overflow discussions.

Given the game's Wine compatibility, winedbg is the recommended choice, ensuring effective debugging for forward and backward stepping on Linux systems.

Key Citations
- CNCNZ.com forums Generals / Zero Hour
- Microsoft DirectX SDK download
- STLport download SourceForge
- NVASM Internet Archive
- BYTEmark Internet Archive
- RAD Game Tools Miles Sound System
- RAD Game Tools Bink SDK
- Assimp official website
- UniSpySDK GitHub
- zlib.net downloads
- lzhl GitHub repository
- winedbg WineHQ wiki
- C&C Community how-to-play guide
- Misha Brukman's blog on Docker for games
- Revora Forums C&C Online Wine
- Linux Magazine practical Wine guide
- Stack Overflow debugging Wine

 

Edited by dagelf
formatting

Share this post


Link to post

3dsmax 4 sdk likely only needed for the legacy 3ds2w3d plugin so could be removed / commented out. As we have fan made versions that work on modern systems.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×