Live data from Hacker News

EA Open Sources Command and Conquer: Red Alert, along with other games

github.com

161–170 of 339 posts

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#161

I only glanced at the code in ANIM.CPP but for a C++ program from 1997 it looks kinda nice, right? The methods are all short, with some descriptive comments at the top of each one. Inputs and outputs described. Nice index at the top of the file. I’ve seen worse!

Yeah, I was looking at infantry.cpp, and the quality is actually very good for 90s game code. The documentation is good, it's decently well-formatted, and there are assertions. Nice counterexample to the "all successful games have terrible code" conventional wisdom.

> Nice counterexample to the "all successful games have terrible code" conventional wisdom.

That's a modern wisdom from the last 15-ish years when people started to have good enough internet connections that you can get away with publishing a dozens gigabytes patch on launch day.

In ye olde times, it was prohibitively expensive (or in the case of console ROM cartridges, impossible) to distribute patches, so projects were usually planned with plenty of buffer time and plenty human testers. These days it's rush to not collide with the releases of other AAA studios, and human paid-for testers have been replaced by free (or, sometimes, paying) early-access players.

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#162
post #153

Alas, no red alert 2 (the best, IMO). But still this is such great news. Huge props to EA for this.

I don't know why they're stalling, I wonder if there still any revenues from the game or if it's IP issue.

This stuff is decades old. It's completely legitimate that they may simply have lost the source code during a server migration or whatnot.

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#163
post #81

Earlier quoted context omitted.

This one made me laugh, mostly because the variable names are so dumb // our RNG is basically shit -- horribly nonrandom at the start of the sequence. // get a few values at random to get rid of the dreck. // there's no mathematical basis for this, but empirically, it helps a lot. UnsignedInt silly = GetGameLogicRandomSeed() % 7; for (Int poo = 0; poo { GameLogicRandomValue(0, 1); // ignore result }

I spent some time browing curiosities about old games, and what strikes me is that the code sometimes was quite personal. You could see the joy, the anger, the disappointment, the satisfaction. Nowadays it would never fly to name a variable "poo", you need to stay professional at all times.

Probably depends how indie/small your studio is.

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#164
// Lets discuss how Windows is a flaming pile of poo. I'm now casting the header

     // directly into the structure, because its the one I want, and this is just how
   
  // its done. I hate Windows. - jkmcd
   
  DEV_BROADCAST_VOLUME *vol = (DEV_BROADCAST_VOLUME*) (hdr);

     // @todo - Yikes. This could cause us all kinds of pain. I don't really want 
     // to even think about the stink this could cause us.

     TheFileSystem->unloadMusicFilesFromCD(vol->dbcv_unitmask);
   
  return TRUE;

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#166
post #164

// Lets discuss how Windows is a flaming pile of poo. I'm now casting the header // directly into the structure, because its the one I want, and this is just how // its done. I hate Windows. - jkmcd DEV_BROADCAST_VOLUME *vol = (DEV_BROADCAST_VOLUME*) (hdr); // @todo - Yikes. This could cause us all kinds of pain. I don't really want // to even think about the stink this could cause us. TheFileSystem->unloadMusicFiles…

This is kinda funny too: https://github.com/electronicarts/CnC_Red_Alert/blob/0dc09bb...

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#167

Earlier quoted context omitted.

I don't know why they're stalling, I wonder if there still any revenues from the game or if it's IP issue.

This stuff is decades old. It's completely legitimate that they may simply have lost the source code during a server migration or whatnot.

No, because Red Alert 2 Remaster exists...

Re: EA Open Sources Command and Conquer: Red Alert, along with other games

#170
post #153

Alas, no red alert 2 (the best, IMO). But still this is such great news. Huge props to EA for this.

This is what you're looking for right? https://github.com/electronicarts/CnC_Remastered_Collection/...

That's the original C&C Red Alert: https://en.wikipedia.org/wiki/Command_%26_Conquer:_Red_Alert

But there was a sequel, C&C Red Alert 2: https://en.wikipedia.org/wiki/Command_%26_Conquer:_Red_Alert...

Both were incredible at the time.

Post reply on HN