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

37 Upvotes

28 comments sorted by

3

u/haydar_ai 6d ago

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

15

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

16

u/whatsnewdan 6d ago

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

1

u/MisterHole123 5d ago

Please please mac

1

u/telegumis 4d ago

We could make a RA2 in RA3 engine

4

u/masterfu678 5d 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.

1

u/Nyerguds The world is at my fingertips. 3d ago

Having the source code basically opens up the game for doing fixes that fall outside the scope of what the engine allows with normal modding.

In other words, it both allows making patches to fix or upgrade the game engine, and more advanced modding.

7

u/MisterHole123 5d ago

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

4

u/mlquanter 4d ago

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

1

u/LordToastALot 4d 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.

4

u/darth3pio 4d ago

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

5

u/DaLexy 6d ago

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

4

u/MargeLenders 6d 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 5d 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 6d ago

Awesome stuff

2

u/cpressland 5d 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 6d ago

Will it work on android just like general ?

4

u/DaLexy 6d 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 5d 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 5d 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] 4d 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 4d 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/nomorejervis0 3d ago

We will have a mod for RA3 that will be 1:1 Uprising, check out Revival

1

u/SSJ3Metaridley 3d ago

revival is not 1:1, i was never a fan of the extra fancy stuff got added in, i prefered upheavel for being a Uprising MP replacement but it wasnt perfect because of the limited RA3 codebase and the extra code that was in uprising.

1

u/nomorejervis0 3d ago

Future version will have a button for pure Uprising experience

1

u/nomorejervis0 3d ago

Wish you luck! I'm decompiling RA3 uprising the same way

1

u/Sure_Biscotti_2083 5d ago

I think the most important mod would be an FPS unlock

Beautiful game but 30 fps is unplayable

3

u/Sauvent 5d ago

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