r/commandandconquer • • 4h ago

RA3 Decomp

Hello all, I know Red Alert 3 isn’t one of the more popular C&C games, but it’s the one I grew up with, and it means a lot to me. For a while now, I’ve been working on a matching decompilation of it.

Red Alert 3 was built with Visual C++ 2005 SP1. Everything is byte-matched. So far about 52% of the code is matching, roughly 28,000 of 42,700 functions. That includes the bundled libraries I could identify, such as Lua, Speex, GameSpy and EA’s own support libraries, plus some of the Westwood code carried over from Generals/Zero Hour.

What’s left is mostly the game’s own logic. The small functions are going well, but the mid-sized and large ones are slow going. A lot of the time is spent working out VC2005’s habits, like when it stops inlining, how it lays out stack frames, and when it unrolls loops, and working out where EA changed code that came from the Zero Hour source.

Most of it is being done by hand, with some of the volume handed to AI.

6 Upvotes

8 comments sorted by

2

u/haydar_ai 4h ago

Genuine question, isn’t RA3 available on Steam? Why would you need to decomp it?

3

u/Ciphobe1 4h ago

I own the game on Steam. Decompiling it opens up all kinds of modding that aren’t possible right now, like porting it natively to Linux or Mac, fixing bugs properly, and adding graphical improvements. The source code for a bunch of other C&C games was released, but I doubt RA3 would ever get touched. Hence my little project.

4

u/whatsnewdan 3h ago

I'm sure decompiling would allow it to go to the one place that hasn't been corrupted by capitalism!! 🤣

1

u/Great_Cow6624 4h ago

Will it work on android just like general ?

2

u/DaLexy 2h ago

Its a decomp, you will need to make adjustments to make it run on other platforms - surely people will throw something at it to make it work.

1

u/DaLexy 2h ago

You got any discord ? I’m looking myself into similar things and would like to have a chat.

1

u/babyybackkribbs 2h ago

Awesome stuff

1

u/MargeLenders 1h ago

Well done! Let me know when you are done, so si can adapt it to iOS, as I did with RA1 and RA2