For those who didn’t know a remaster of the original Command and Conquer games is out on June 5th and they’ve done some interesting work on putting it all together. There are other people out there who have done this before of course but EA seem to have decided it’s worth giving it official support. What they’ve done though which completely took me by surprise is they’ve posted up the entire source code of both Tiberium Dawn and Red Alert in C#.
For anyone who is at all interested in how RTS games especially the older variety were made be sure to check this out, I’m even thinking about having a look at how they’ve done their AI. This will be invaluable for me like when I found the Age of Empires 2 skirmish computer code, I recommend checking it out.
/* $Header: F:\projects\c&c\vcs\code\aircraft.cpv 2.12 19 Jun 1995 09:27:22 JOE_BOSTIC $ */
/***********************************************************************************************
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
***********************************************************************************************
* *
* Project Name : Command & Conquer *
* *
* File Name : AIRCRAFT.CPP *
* *
* Programmer : Joe L. Bostic *
* *
* Start Date : July 22, 1994 *
* *
* Last Update : August 13, 1995 [JLB] *
* *
*---------------------------------------------------------------------------------------------*
From what I recall from their discussions on the matter, this is basically the code from the game rewritten so it’s functional without the third party middleware like bink video and the like with minimal cleanup.
Anyway, this is a good historical artifact of sorts. Stuff from there can’t be borrowed into another game, though, due to GPL. But it could be fun to dive in.
Edit: In this section they even have the building placement code which is fantastic, this is going to be very useful for me. Also this explains so much of how they do it, they use zones on the terrain and run checks to see what’s in there. This is fantastic, I can easily see this being transferable to C# using modern colliders and so on.
LOL I mean don’t get me wrong, it’s messy, but at the same time it’s fascinating because there are concepts I wouldn’t have thought of like the build zone strength and how they check how many of a certain type of building is being built before moving onto the next in the construction queues.