We take for granted that C is performant now, but that wasn’t obvious until optimizing compilers got good and someone tried.
Rollercoaster Tycoon (1999) is the last notable title that used ASM. It’s impressive in many ways, but it wasn’t as much of a standout as it seems now. Six years earlier to its release, that was just how games were done.
It’s notable that the only port of Rollercoaster Tycoon was the original Xbox, which was also x86. Nobody wants to rewrite it for anything else.
You couldn’t pay me to write a game in C today. Our expectations of what games have to be are sky high today. You cant get away with the productivity lost writing in c, maybe c++ since its supported by a number of engines. But, im personally not aware of a single engine that uses C. I tried my hand at writing a game without an engine, and it was a hot mess. Writing low level code to make a button with text, no thanks…been there done that, in my game, you could bump into trees and get stuck…not very fun in my opinion, and thats after a few months of writing code.
Animal Well was written in C without an engine and it was a decent hit (for an indie). Although that’s definitely an exception, perhaps very similar to the RollerCoaster Tycoon example
I used those as examples but I claim that most everything was C by the early 90’s. The statement that C compilers got fast which allowed it isn’t true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years.
C compilers didn’t need much optimization because there wasn’t much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU’s weren’t the superscalar multi core monsters they are today. A compiler couldn’t take advantage of reordering instructions to use multiple adders because there was only one.
Mainstream application programmers switched to C in the early 80’s. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code–despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.
Wolfenstein 3D is a lot less impressive than Doom. Doom was faster and more complex than other games, where as Wolfenstein had a strong and appealing gimmick but was slower and less complex as a trade-off. In-line with the expectations around compiled languages.
Eventually it sort-of got a rewrite to create RollerCoaster Tycoon Classic, initially for iOS and Android, later for Windows, macOS, and Nintendo Switch. It largely is a rewrite of RollerCoaster Tycoon 2, with the goal of bringing the game to more modern platforms, and the save files for parks and rides are compatible. In this interview with Atari Club, Sawyer says the rewrite was in C++ but even with a team of people still took longer to write in C++ than it took him to write the original in x86 assembly.
If anyone previously paid attention to RCT Classic, it’s been seeing some development work again and is working on Android again. They also made RCT Classic+ on Apple Arcade (basically just the game and all the expansions included) and also updated the regular versions of RCT Classic so they run correctly again (RCT Classic stopped working on macOS when Apple dropped support for 32-bit applications and Atari didn’t release a recompiled game until recently).
He was an analyst at Microsoft who was tasked with finding out how many computers ran Windows to determine market share. Part of the question involved asking what other software was installed and the only software used more than Windows was Doom. This made GabeN realize the market potential of games and he left Microsoft shortly afterward.
See, I’ve heard that story, that he basically ran … well, arguably, a worm that did network analysis on what was installed on every computer in the MSFT internal network, realized more people had DOOM installed… than Windows…
… and I have also heard that he actually ported DOOM to… either MS DOS, or Win95… ?
I genuienly do not know which is true, if they’re all true, if they’re all false… I can’t remember the source for each of these, but I know I’ve heard or read all these semi-close variants from somewhere, over the years.
Just saw this article recently. Gabe was part of a team trying to convince developers that they would be better off writing their games with more abstracted code/libraries instead of writing their own interfaces (some of which were written by people convinced they were being really efficient but were actually terrible). One thing they did to prove their point was going to id and offering to have Microsoft port Doom to Windows for free. But the experience and seeing the success id was having distributing their own game led Gabe to launch Valve.
Mainstream application programmers switched to C in the early 80’s. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code–despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.
That’s not true. The original Doom has assembly. They replaced it for the Linux source release. But by that time PC hardware was much faster ( remember back in the 90’s performance doubled every 2 years) so it wasn’t needed.
Performance is very much still a significant factor. At the end of the day, games are expected to run at certain FPS on certain machines. The machines have gotten better to the extent that unoptimized code can be used sometimes, but when competing for graphics, badly optimized games will have to sacrifice fidelity to hit performance targets, where well-optimized games can get squeeze out better graphics and hit those same targets.
There’s plenty of tricks these days but optimized code will always have an edge.
Rollercoaster Tycoon was the last of an era, not a sudden burst of genius.
Before Doom (1993), almost all games were assembly. Doom was a shock to the industry. You could now write a high performance, multiplatform, sophisticated game in a compiled language ©. When I say multiplatform, I don’t just mean how it was ported to everything later. It was developed on NextStations first. DOS was the first port. So it proved all of the above immediately on release.
We take for granted that C is performant now, but that wasn’t obvious until optimizing compilers got good and someone tried.
Rollercoaster Tycoon (1999) is the last notable title that used ASM. It’s impressive in many ways, but it wasn’t as much of a standout as it seems now. Six years earlier to its release, that was just how games were done.
It’s notable that the only port of Rollercoaster Tycoon was the original Xbox, which was also x86. Nobody wants to rewrite it for anything else.
You couldn’t pay me to write a game in C today. Our expectations of what games have to be are sky high today. You cant get away with the productivity lost writing in c, maybe c++ since its supported by a number of engines. But, im personally not aware of a single engine that uses C. I tried my hand at writing a game without an engine, and it was a hot mess. Writing low level code to make a button with text, no thanks…been there done that, in my game, you could bump into trees and get stuck…not very fun in my opinion, and thats after a few months of writing code.
Animal Well was written in C without an engine and it was a decent hit (for an indie). Although that’s definitely an exception, perhaps very similar to the RollerCoaster Tycoon example
Wikipedia says cpp
Animal Well was the shit.
Carmack wrote Wolfenstein 3d in C. Star Control and Dune 2 were C.
> almost
I used those as examples but I claim that most everything was C by the early 90’s. The statement that C compilers got fast which allowed it isn’t true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years.
C compilers didn’t need much optimization because there wasn’t much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU’s weren’t the superscalar multi core monsters they are today. A compiler couldn’t take advantage of reordering instructions to use multiple adders because there was only one.
Those games didn’t have the splash that Doom did for this sort of thing.
https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm
I would say that Wolf3d would certainly count as proof of concept.
Wolfenstein 3D is a lot less impressive than Doom. Doom was faster and more complex than other games, where as Wolfenstein had a strong and appealing gimmick but was slower and less complex as a trade-off. In-line with the expectations around compiled languages.
Eventually it sort-of got a rewrite to create RollerCoaster Tycoon Classic, initially for iOS and Android, later for Windows, macOS, and Nintendo Switch. It largely is a rewrite of RollerCoaster Tycoon 2, with the goal of bringing the game to more modern platforms, and the save files for parks and rides are compatible. In this interview with Atari Club, Sawyer says the rewrite was in C++ but even with a team of people still took longer to write in C++ than it took him to write the original in x86 assembly.
If anyone previously paid attention to RCT Classic, it’s been seeing some development work again and is working on Android again. They also made RCT Classic+ on Apple Arcade (basically just the game and all the expansions included) and also updated the regular versions of RCT Classic so they run correctly again (RCT Classic stopped working on macOS when Apple dropped support for 32-bit applications and Atari didn’t release a recompiled game until recently).
Just to throw on more factoids:
Wasn’t Gabe Newell either the first, or among the first, to port Doom to Win 95?
He was an analyst at Microsoft who was tasked with finding out how many computers ran Windows to determine market share. Part of the question involved asking what other software was installed and the only software used more than Windows was Doom. This made GabeN realize the market potential of games and he left Microsoft shortly afterward.
See, I’ve heard that story, that he basically ran … well, arguably, a worm that did network analysis on what was installed on every computer in the MSFT internal network, realized more people had DOOM installed… than Windows…
… and I have also heard that he actually ported DOOM to… either MS DOS, or Win95… ?
I genuienly do not know which is true, if they’re all true, if they’re all false… I can’t remember the source for each of these, but I know I’ve heard or read all these semi-close variants from somewhere, over the years.
Just saw this article recently. Gabe was part of a team trying to convince developers that they would be better off writing their games with more abstracted code/libraries instead of writing their own interfaces (some of which were written by people convinced they were being really efficient but were actually terrible). One thing they did to prove their point was going to id and offering to have Microsoft port Doom to Windows for free. But the experience and seeing the success id was having distributing their own game led Gabe to launch Valve.
No? Not even close? Why is it people get away with saying such stupid things on the internet?
Because it’s true. Here’s an article from Tim Sweeney from 2001:
https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm
That’s not true. The original Doom has assembly. They replaced it for the Linux source release. But by that time PC hardware was much faster ( remember back in the 90’s performance doubled every 2 years) so it wasn’t needed.
“Planar.asm”
https://doom.fandom.com/wiki/Doom_source_code_files
Focus on performance, wow, well the industry has certainly changed a bit.
Performance is very much still a significant factor. At the end of the day, games are expected to run at certain FPS on certain machines. The machines have gotten better to the extent that unoptimized code can be used sometimes, but when competing for graphics, badly optimized games will have to sacrifice fidelity to hit performance targets, where well-optimized games can get squeeze out better graphics and hit those same targets.
There’s plenty of tricks these days but optimized code will always have an edge.