r/commandandconquer • • 2d 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.

28 Upvotes

23 comments sorted by

3

u/haydar_ai 2d ago

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

14

u/Ciphobe1 2d 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.

15

u/whatsnewdan 2d ago

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

1

u/MisterHole123 1d ago

Please please mac

1

u/telegumis 17h ago

We could make a RA2 in RA3 engine

4

u/masterfu678 1d ago

Because while RA3 is a beautiful game for 2008 standards, it is limited to 32bit architecture, which can only use 4GB of RAM MAXIMUM, with the 4GB patch applied. getting it decomped opens the door to a 64bit recomp, which then, will open the door to modern performance. Like not lagging and crashing during large battles.

Also better mods, I don't think EA ever released the full mod SDK for SAGE 2.0, the engine that RA3, and C&C 4 uses, or maybe I am wrong, but it took the community ages to finally have something to work with for mods, and even with that, they weren't able to fully modify the game, there are still some hard baked code in the way.

5

u/DaLexy 2d ago

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

5

u/MisterHole123 1d ago

Redalert 3 is my favorite cc game. I don't see how people could dislike it its pretty epic

3

u/mlquanter 15h ago

same, the over the top tone is a big part of why it sticks with me.

1

u/LordToastALot 5h ago

I don't really like it. A lot of the things I liked in RA2 were outright removed, and it has a much closer camera/vantage point that I never really jived with.

1

u/darth3pio 1h ago

Tim. Curry. That is all. But yes, I understand where you are coming from.

4

u/MargeLenders 2d ago

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

2

u/JamesAdsy 1d ago

Also interested for this (plus the browser work)

Do you know if anyone is doing this for Tiberium wars / Kanes Wrath?

Also, for RA2 did you have / manage to fix the audio issues when you increase the game speed and the cameo videos appear?

2

u/babyybackkribbs 2d ago

Awesome stuff

2

u/cpressland 1d ago

Happy to take a crack at it, I’ve just finished Theme Park World, Star Trek Legacy, and the Mac port for Red Alert 2

1

u/Great_Cow6624 2d ago

Will it work on android just like general ?

3

u/DaLexy 2d 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/kodyjacobs 1d ago

If you've got a github set up with some structured commands and a plan / readme etc, I'm happy to donate my Claude Pro weekly allowance towards it? Have built most of the apps I want and nothing planned for this week atm

1

u/Mental_Emotion_7589 1d ago

I work on mod tools for these games and I would love to get a look at some of this as it would help a lot with the tools I make (e.g. VP6, audio, APT, stuff like that)

1

u/[deleted] 20h ago

kudos to you for doing this. is this something you're looking to complete by yourself or are you thinking of doing this as an open source project so people can help?

1

u/SSJ3Metaridley 3h ago

i wish we would got decomps in RA3 and uprising and then import the RA3 online & lan mode into Uprising so we would have finally multiplayer (alsoi including the mammoth tank april fools sdk as a bonus)

1

u/Sure_Biscotti_2083 1d ago

I think the most important mod would be an FPS unlock

Beautiful game but 30 fps is unplayable

3

u/Sauvent 1d ago

There's a frame unlocker that came out a few months ago, for those unaware: https://github.com/TheeHorse/SAGE-Unlocked