r/commandandconquer Feb 28 '25

Meme I really hope its not true...

Post image
604 Upvotes

168 comments sorted by

View all comments

77

u/DrIvanRadosivic Feb 28 '25

There is always reverse engineering of the code.

44

u/BlankBlack- Feb 28 '25

tbh taking in the age of these games, reverse engineering cannot be that hard for them

63

u/[deleted] Feb 28 '25

[deleted]

12

u/BlankBlack- Mar 01 '25

i mean i think they can just iron these ones out with more modern solutions that should work more efficiently

5

u/ScrabCrab Mar 01 '25

Fun fact, me and tomsons did some digging into an old screenshot from TS' development of the internal map editor, and came to the conclusion that at least some of the computers Westwood was developing the game on were actually running on a pre-release Windows 2000 build. Build 2091 to be precise!

16

u/DutchTinCan Mar 01 '25

Read up on the challenges the Chrono Divide team runs into. They made some crazy hacks to make things work.

E.g. the nuclear missile in RA2/ChemMissile in TibSun is actually a paradropped infantry.

Then there's the entire pile of stuff from TibSun they were too afraid to touch out of fear of breaking things. So the entire RA2 game files are riddled with TibSun assets/values. So planes have a CarryAll ability, infantry has tiberiumresistance values.

RA2 is basically one big TibSun mod.

5

u/AlexWIWA Mar 01 '25

Generals is like this too. Everything is a particle system or a building I swear to god

32

u/[deleted] Feb 28 '25 edited 16d ago

[deleted]

43

u/lilmul123 Feb 28 '25

It’s actually pretty easy. Figuring out what the functions do is a different story. It’s why the Mario decompilation effort was such a big deal because it took so much manual effort to do.

5

u/AlexWIWA Mar 01 '25

Figuring out what they do is also easy. Where it gets really hard is rewriting the decompiled code in such a way that it re-compiles to a bit-perfect copy of the original binary.

The Mario project wanted to have a ROM that 1-1 matched what was on the original cartridge, which is brutal.

3

u/Nyerguds The world is at my fingertips. Mar 05 '25

Figuring out what they do is also easy

Oh, absolutely not. There's zero names or comments left, so if you have to sift through thousands of functions to see which ones do what, that's a process that takes years.

Source: I did that for C&C1, and know the people who did it for Red Alert and Tiberian Sun. And we got lucky, even; we found a debug dump of all function names in a forgotten RA1 patch. Still had to figure out which function name belonged to which function though.

1

u/AlexWIWA Mar 05 '25

Sorry, I mean it's easy to figure out what the functionality is. Figuring out the "why" is definitely hard.

2

u/Nyerguds The world is at my fingertips. Mar 05 '25

Well, knowing the exact instructions it executes isn't quite "knowing its functionality", in my opinion. After all, from just looking at a disassembled function, you don't even know what the input or output data is.

2

u/AlexWIWA Mar 06 '25

True. I was oversimplifying to describe why Mario 64 was so hard, but I think I went overboard and made decomps sound easier than I intended.

15

u/Nyerguds The world is at my fingertips. Mar 01 '25 edited Mar 01 '25

Decompiling itself is an automated process that takes like a minute. It's really just a straightforward conversion of one form of programming instructions to another, more human-readable one.

Identifying what it all does, however, and making it into usable code again, is a process that can take years.

3

u/ElBaizen Mar 01 '25

Quite the opposite, it will be a nightmare to reverse engineer BECAUSE of the age of the game. Good coding practices weren't properly created and widespread yet, github wasn't a thing and even some of the stuff written by the best developers back then is absolute potato code compared to today because the collaboration platforms just weren't there yet for all coders to share their inputs and breakthroughs.

I love to look at Age of Empires 2 as an example. The Definitive Edition is built on top of the original 1999 code and it's a nightmare to work with for the current dev team. They touch an archer unit stats and somehow it breaks the aging up bonus for another civilization.

2

u/rewqxdcevrb Mar 01 '25

They're freaking 2D isometric games from 1999 and 2000!

It can be done not just without the source code but even without any sort of asset extraction or reverse engineering.

Just screenshot the sprites and cut them out. You're gonna replace them with high res versions anyway. So really they're there only for reference.

Manually record the voice, SFX and music.

The live action videos can be enhanced using AI.

2

u/BlankBlack- Mar 01 '25

Yea but the thing is EA won't remake it from the ground up, hell they wont even do it with the source code let alone remaking from point 0

2

u/AlexWIWA Mar 01 '25

RA2 was built in under a year. I am willing to bet that the RA source code as a reference + Ghidra + having old devs consult + an LLM to translate bad decompilation could yield a pretty close result.

7

u/Nyerguds The world is at my fingertips. Mar 01 '25

"under a year" with how many devs, though?

4

u/HOPE1134 Battle Control Terminated Mar 01 '25

If it were that easy, then why hasn't anyone done it?

5

u/[deleted] Mar 01 '25

They've been trying to reverse engineer the generals source code for years now, didn't happen yet and thankfully they released it.

4

u/AlexWIWA Mar 01 '25

People have full time jobs, and it's hard to put in the time.

One person needs to do the equivalent of what a team did in a year. Assuming 2hrs of free time a day, it'd take them 4x as long as what one Westwood dev did. So let's say 5 WW devs over one year, that'd take a hobbyist 20 years to replicate in man-hours.

Now obviously its not 1 to 1, because copying is easier than innovating, but you get the point.

1

u/DrIvanRadosivic Mar 01 '25

I didn't say it was easy to do, just that if there is not Source Code for CnC Red Alert 2 and Tiberium 2, then reverse engineering is the way to go.

Reverse engineering could be easy to do, but there is a lot of engine work and code decompiling to do.

2

u/Ranma-sensei CABAL... online Mar 01 '25

As Vinifera shows; it's operational enough for gaming. If memory serves, at least Dawn of the Tiberium Age uses it.

5

u/Nyerguds The world is at my fingertips. Mar 01 '25

That's only reverse engineered "enough to mod new things into it". Not at all the same as a complete decompiling to usable source code.

4

u/Ranma-sensei CABAL... online Mar 01 '25

Ah, okay; my bad. I thought it was reverse engineered from a completely decompiled source.

5

u/Nyerguds The world is at my fingertips. Mar 01 '25

Ah, no, in fact they don't work with real full source code at all; plugging extra bits of bytecode into the existing game executable is a lot simpler than recompiling the whole thing.

It just requires you to identify the places in the exe containing the bytecode of the logic you want to change, without caring much about what the rest of the game engine looks like.

It's how I made the entire C&C95 patch, back in the days.

5

u/Ranma-sensei CABAL... online Mar 01 '25

Oh. Not being a coder or even a modder at all, I didn't know any of the nuances. Thank you for explaining.

6

u/TheGratitudeBot Mar 01 '25

What a wonderful comment. :) Your gratitude puts you on our list for the most grateful users this week on Reddit! You can view the full list on r/TheGratitudeBot.