Is there any information available on how WC1 & 2 in space gameplay/graphics were created?

Darkmatter

Rear Admiral
As an "old timer" I have this deep seeded love of the look of WC1 & 2. They followed what looks to be a system similar to SNES games that used that special chip that allowed 2D sprites to be manipulated in game to give the illusion of a 3D world. I guess the first Mario Kart would probably be the most well known example of it, but there were many others.

It may not be worth trying these days from a time investment standpoint to try to replicate the look, but I wanted to ask.

I know the ships were 3d models rendered out as sprite sheets, and then manipulated in game depending on the players position in comparison to the other ships distance & location, but the game engine also was able to know which sprite to use based on which direction the other ship(s) were facing.

I know Howard Day has been working on a 3D with 2D aesthetics project, but I was hoping there would be some info on how it was done in 2D back in the 90s.

Sadly, we don't have free, open access to the source code like they do with FSO, because they've continued to make amazing strides in adding things to that engine. Stuff that wasn't even invented back when the engine was made. I remember one of the small bug bears was the fact that Freespace ships arced at you turned left or right, but I asked them in discord about it and I guess they now know where those variables are held in the files, so they could be changed to 0 to better replicated the WC feel.

Thanks for any info that anyone can provide!
 
I'm not sure what info you're after specifically, but math-wise in broad terms: You know the forward and up normal vectors of each prerendered ship frame, and you know the forward and up normal vectors of the camera. You get the angles between the two and pick the closest prerendered frame, then you extract the rotational component of the difference and apply that to the sprite, scale it for distance and you're done.

Most modern 3D games still use an evolution of this, where they're usually called "imposters" (e.g. in Unreal Engine).

The actual process is honestly more or less the same now as it was for Wing Commander 1; just that the tools/artforms/techniques have advanced. :)
 
Really interesting. I figured it had to be something along those lines, but I had no idea of the specifics.

I'd say that the FSO engine is probably the closest "ready to go" engine out there, which can now do crazy things it couldn't do a decade ago, but sadly it wasn't really made with "moving around the ship and talking to people" in mind. I think someone was working on that, but I'm not sure if it went anywhere.

For the "feel" of it, I think the hardest thing would be trying to come close to matching how the AI acted during dogfights.

One other question. I know people find info on games by using hex editors and such, but I guess a lot of programmers can "decompile" programs, including games. Does that mean that the person would have access to the source code, or simply that compression and grouped objects have been unzipped for lack of a better term? I'm assuming it's closer to the 2nd. If the 1st was possible, I think it would have been done by now.

Thanks
 
More often than not, code from very "high-level" languages like Java and C# can be decompiled back to reasonable source code relatively easily - which is the main reason why code-heavy mods for some games like classic Minecraft (Java) and Valheim (C#/.NET) are so prolific and extensive, despite the lack of any intentional mod support. These languages being used commonly for commercial games is a newer phenomenon though - increasing over the last 10-15 years or thereabouts - and even then it's only a small selection of (usually smaller/indie) games.

Anything written in a low-level language like C or C++ (like Wing Commander etc.) which gets compiled to native machine code can only barely be decompiled, and the code you get out is extremely rough (and can almost never be recompiled; not even close) - even from very expensive professional tools. Generally all you get "for free" is a general overview of the program flow, i.e. the different loops and branches the code takes as it executes - which certainly helps, but even that can be wrong/misleading, especially for more complex or optimised programs (which games often are). Still, having said that, reverse engineering low-level code is absolutely possible given enough time and expertise.

Thankfully though, it's usually possible to reverse engineer data formats without ever looking at the original code; identifying things gradually like "these values looks like a width and height", or "these look like offsets within the file". There are some tools out there to help identify which compression algorithms may have been used, or identify patterns in the data, but it's mostly a lot of trial-and-error iteration and experimentation.
 
Last edited:
I'd say that the FSO engine is probably the closest "ready to go" engine out there, which can now do crazy things it couldn't do a decade ago, but sadly it wasn't really made with "moving around the ship and talking to people" in mind. I think someone was working on that, but I'm not sure if it went anywhere.

Wing Commander I (and most games of a similar vintage) didn't really do that in engine the way games today do. It was a little more like building an extra room on your house or adding an appendix to a book or decorating a cake or coming up with too many analogies but still putting them all together in one sentence: the conversations and game flow (the part between missions) were a separate system called Origin FX.

For the "feel" of it, I think the hardest thing would be trying to come close to matching how the AI acted during dogfights.

If you're looking to recreate the Wing Commander I AI then you don't even really need to take apart the game... the routines are essentially published in the Wing Commander I & II Ultimate Strategy Guide!
 
Wing Commander I (and most games of a similar vintage) didn't really do that in engine the way games today do. It was a little more like building an extra room on your house or adding an appendix to a book or decorating a cake or coming up with too many analogies but still putting them all together in one sentence: the conversations and game flow (the part between missions) were a separate system called Origin FX.



If you're looking to recreate the Wing Commander I AI then you don't even really need to take apart the game... the routines are essentially published in the Wing Commander I & II Ultimate Strategy Guide!
Ahh ya I have that, but I figured that actual code was more complicated then that. Apparently not! lol

For knowledge of decompiling/recompiling I bet you have the most knowledge on that. Were you able to do decompile WC1 or 2 completely for modification and then recompiling? Or if not, do you know the language used and the zip algorithm used?

How is your stuff coming along LOAF?

Also, does anyone know the link to the mod that was done that doubled the resolution of objects/ships, etc, in WC1? Was it also done for WC2 or WCP?

More often than not, code from very "high-level" languages like Java and C# can be decompiled back to reasonable source code relatively easily - which is the main reason why code-heavy mods for some games like classic Minecraft (Java) and Valheim (C#/.NET) are so prolific and extensive, despite the lack of any intentional mod support. These languages being used commonly for commercial games is a newer phenomenon though - increasing over the last 10-15 years or thereabouts - and even then it's only a small selection of (usually smaller/indie) games.

Anything written in a low-level language like C or C++ (like Wing Commander etc.) which gets compiled to native machine code can only barely be decompiled, and the code you get out is extremely rough (and can almost never be recompiled; not even close) - even from very expensive professional tools. Generally all you get "for free" is a general overview of the program flow, i.e. the different loops and branches the code takes as it executes - which certainly helps, but even that can be wrong/misleading, especially for more complex or optimised programs (which games often are). Still, having said that, reverse engineering low-level code is absolutely possible given enough time and expertise.

Thankfully though, it's usually possible to reverse engineer data formats without ever looking at the original code; identifying things gradually like "these values looks like a width and height", or "these look like offsets within the file". There are some tools out there to help identify which compression algorithms may have been used, or identify patterns in the data, but it's mostly a lot of trial-and-error iteration and experimentation.

Thanks for the info!

Also, does anyone know the link to the mod that was done that doubled the resolution of objects/ships, etc, in WC1? Was it also done for WC2 or WCP?
 
Which one are you talking about?
I'm not entirely sure. Someone was doubling the res of WC1 ships as an experiment. They found that double the res was the best the engine would manage without breaking the game due to it increasing the size of the objects. I think there was also a hard coded limit for file size, or it may have been info in active memory. Not sure.
 
For knowledge of decompiling/recompiling I bet you have the most knowledge on that. Were you able to do decompile WC1 or 2 completely for modification and then recompiling? Or if not, do you know the language used and the zip algorithm used?
That's not necessary, the CIC has private copies of the source for both 1 & 2 (though apparently parts of it are incomplete)
 
Odd. I thought someone here CIC said that no source code exists for... at least 1. I can't remember if they said 2 as well.

That said, I thought they had been given it to hold onto for safe keeping. Tightly guarded of course.
 
do you know the language used and the zip algorithm used?
WC1/2 were written in C and assembly; the containers use LZWX for compression.

Also, does anyone know the link to the mod that was done that doubled the resolution of objects/ships, etc, in WC1? Was it also done for WC2 or WCP?

I linked the end result in the other thread where you asked... anyway here it is again; threads here and here - no further progress was made (at least as far as has been posted here).

Odd. I thought someone here CIC said that no source code exists for... at least 1. I can't remember if they said 2 as well.

That said, I thought they had been given it to hold onto for safe keeping. Tightly guarded of course.

They have the WC1 source sans memory routines apparently, not sure about WC2 (pretty sure no). It's purely for preservation as you say, which is frustrating but better than it not being preserved of course.
 
Thanks. I must have missed the 1 link.

And I 100% agree regarding the archived code. EA and words like, kindness, or, forgiving, don't seem to go together very well.

That does make me wonder, just out of curiosity, if EA even knows about the site or ever quietly take a peek at what's going on. I'm sure that they did know about the site many years ago, but as dev's came and left, who knows what EA knows these days. Still, probably best to not wave a huge red flag at them saying, "Please notice us!" lol
 
That does make me wonder, just out of curiosity, if EA even knows about the site or ever quietly take a peek at what's going on. I'm sure that they did know about the site many years ago, but as dev's came and left, who knows what EA knows these days. Still, probably best to not wave a huge red flag at them saying, "Please notice us!" lol
How are you defining EA in this context? How would the Electronic Arts corporation peek at what's going on? FWIW, we have current senior EA folks who are part of the CIC's discord chat right now (who happen to be very supportive of things like mods and fan projects).
 
How are you defining EA in this context? How would the Electronic Arts corporation peek at what's going on? FWIW, we have current senior EA folks who are part of the CIC's discord chat right now (who happen to be very supportive of things like mods and fan projects).

Really? OK, I didn't entirely expect that, but I'm also... not surprised. I was thinking corporate, like, the higher ups, their legal team, things like that. I wasn't saying that towards devs, who are just gamers who love to also make games.
 
I would say I field one or two requests for information from folks at EA each year, which ranges from 'do you have any source code' to specific questions about the lore or how the games were released. It's rarely the SAME people year to year but it's still pretty interesting.
 
I would say I field one or two requests for information from folks at EA each year, which ranges from 'do you have any source code' to specific questions about the lore or how the games were released. It's rarely the SAME people year to year but it's still pretty interesting.
That's really interesting! I hope they talk about WC in EA meetings. :)

The fact that people are getting in touch with you out of curiosity is great!
 
EA is sitting on a gold mine, hopefully some of those interested employees can get them to look at the IP again
 
So I had to go digging through a three year old discord discussion to find this one, but this conference video goes into some very good detail about what was involved in programming the graphics used in very early games. The presenter worked at Origin when Chris Roberts was starting there, and I believe he watched him single-handedly develop the transformation system used to rotate and scale the sprites to simulate 3D space.

I think the Origin segment starts about 11 minutes in.

 
So I had to go digging through a three year old discord discussion to find this one, but this conference video goes into some very good detail about what was involved in programming the graphics used in very early games. The presenter worked at Origin when Chris Roberts was starting there, and I believe he watched him single-handedly develop the transformation system used to rotate and scale the sprites to simulate 3D space.

I think the Origin segment starts about 11 minutes in.
EA is sitting on a gold mine, hopefully some of those interested employees can get them to look at the IP again


That would require EA to actually listen to people. Low chance of success. :(

@Chronocidal Guy thanks for digging that up! I can't wait to watch it. :)
 
EA is sitting on a gold mine, hopefully some of those interested employees can get them to look at the IP again
Ah, if only that were true!

There is, unfortunately, a very good reason why people at EA seem to continually toy with the idea of bringing back Wing Commander, but never end up actually doing it. That reason is that Wing Commander is, sadly, not a gold mine. From the mass market perspective, WC is basically a dead franchise, which would require substantial costs and risks to resurrect, with no guarantee of success.
 
Back
Top