How id Software created Wolfenstein 3D based on technology from Commander Keen
- Transfer
This article is a fragment of the Game Engine Black Book: Wolfenstein 3D , a detailed study of the history, code, and development that had a huge impact on the gaming industry in first-person shooter on the destruction of the Nazis.
This chapter reveals the origins of the game and how it was built on the foundation of the success and technology of Commander Keen , which itself was built from the remains of an unsuccessful attempt to sell the Nintendo Mario 3 port for PC.
The complete book, written by the author and programmer Fabien Sanglar, can be purchased in paper or digital form .
In 1990, the small company Softdisk from Shreveport (Louisiana) successfully conducted business in the shareware market.
By providing subscription-based video game distribution services, Softdisk created and sent out new games by mail to its subscribers every month. The business was doing well, but some of the firm's employees were more ambitious.
They thought they had enough skills to scale up and they wanted to prove it. They created a new way to program side-scrolling and called this technology an adaptive tile refresh. It allowed you to perform hardware scrolling (scrolling the screen) on the PC, so that the computer could compete with NES. In the early 1990s, they worked non-stop on weekends to recreate Super Mario 3on PC to demonstrate your Nintendo skills.
The Ideas from the Deep team, as they called themselves, was able to make a clone of Mario , but, unfortunately, she was not able to convince Nintendo to give them a contract. No matter how impressed the Japanese company, it wanted the Mario series to remain only on Nintendo consoles.
“We sent the demo to Nintendo of America, and she in turn sent it to the head office in Kyoto. Top management watched the demo and was very impressed. However, they did not want their intellectual property to be on any devices other than their equipment, so they simply praised us and said that it was impossible. ” - John Romero, programmer
Mario on the PC. The acronym IFD stands for Ideas from the Deep.
This episode turned out to be enough for them to convince themselves that they not only have talent that matches their ambitions, but also a well-coordinated team with work ethics that could potentially open up great opportunities for them. In February 1991, four Softdisk employees took a leap of faith and founded their own id Software company.
Founders of id Software.
(You can read more about this in David Kushner’s Masters of Doom .)
They immediately took advantage of the technology developed for the PC version of Mario 3 to start releasing their own games and building intellectual property. Without wasting time, the team released at least three games in a year.
- Commander Keen Episode 1, 2, and 3: Invasion of the Vorticons (December 14, 1990)
- Commander Keen Episode 4, 5, and 6: Good Bye Galaxy (December 15, 1991)
- Separate game Commander Keen : Aliens Ate My Baby Sitter (December 1991)
These games, published by FormGen, were instantly successful and sold very well. The team also continued to write games for Softdisk, most of which used adaptive tile updates:
- Commander Keen in Keen Dreams (1991)
- Dangerous Dave in the Haunted Mansion (1991)
- Rescue Rover (1991)
- Rescue Rover 2 (1991)
- Shadow Knights (1991)
- Hovertank 3D (April 1991).
- Catacomb 3D: A New Dimension (November 1991)
In the spring of 1991, a new generation of id Software technology began to emerge. In the game Hovertank 3D, the player was inside the tank. So far, it has not yet had texture mapping, and the pace of the game has remained rather slow. Catacomb 3D marked the emergence of textures and increased immersion in the game: the player now controlled the wizard in a first-person view.
In November 1991, the team ended all obligations to SoftDisk. Her next game will use the 3D technology created by the guys and will be released under the name Wolfenstein 3D . Due to the scale and ambitiousness of the game, four more people joined the team and now it had eight employees.
"Jason (Jason Blochowiak) was part of the id from the very beginning, but in the process of developing Wulf, our paths diverged." - John Carmack, programmer.
Photo of the Easter Egg team at Spear of Destiny. The inscription below: "we are without pants."
In fact, the pants are still on them.
Organization
In September 1991, guided by the school memories of Tom and Jason, the team moved from Shreveport to Madison (Wisconsin). The guys settled their office in the two-story brick building of The Pines residential complex on High Ridge Trail, 2622. They all lived within walking distance to the office, with the exception of Carmack, who did not care about the inconvenience: he settled right on the second floor of the office.
The development of Wolfenstein 3D began in January 1992. The temperature dropped and snow fell from the sky, so the team was completely immersed in work and rarely left the office. Development lasted four months. Wolfenstein 3D was released in May 1992.
Over the course of these four months, the organization of team work was fairly standard for game studios of that era: four guys sitting in the same room, support for a fast pace of development and a strong sense of camaraderie (and a lot of noise due to the communication style of John Romero and Tom Hall).
The map below shows the angle with SNES, where countless F-Zero games were played , and the Dungeons & Dragons zone, often referred to in Masters of Doom. The fact that one of the team members (John Carmack) lived right above the studio was quite an ordinary state.
“We started by transferring data on floppy disks, but in the end we created a Novell network based on coaxial Ethernet *. We did not have a version control system. Surprisingly, we didn’t have it until Quake 3, during the development of which we started using Visual Source Safe. ” - John Carmack, programmer.
* Commentary by John Romero: “Living in Madison, in November 1991, we bought a Novell Netware 3.11 system for $ 7,000. It included a file server, cables, and network cards. ”
Everyone worked on the best PCs that could be bought for money: the most powerful 386-DX 33MHz with 4MB of RAM.
Programming
The development was carried out in the environment of Borland C ++ 3.1 (but in the C language), which by default worked in VGA mode 3: a text screen measuring 80 by 25 characters.
John Carmack dealt with the runtime code. John Romero programmed many tools (TED5 map editor, IGRAB resource packer, MUSE music packer). Jason Blohovyak wrote important game subsystems (input manager, page manager, sound manager, user manager).
The Borland solution was an all-in-one system. An IDE called BC.EXE, despite some instability, provided awkward multi-window code editing with nice syntax highlighting. The compiler and linker were also part of the system and had the names BCC.EXE and TLINK.EXE.
However, switching to command line mode was not required. The IDE allowed you to create, assemble, execute, and debug a project.
To compensate for the small size of the CRT screen, some developers used two monitors. (John Romero note: “Both John Carmack and I worked with Turbo Debugger on small 12-inch amber-screen monochrome monitors.”)
Game Graphic Resources
All graphic resources were created by Adrian Carmack (Kevin Cloud created several textures, and also worked on the design and structure of the Wolfenstein 3D manual booklet ). All work was done in Deluxe Paint (written by Brent Iverson from Electronic Arts) and saved in ILBM (InterLeaved BitMap) files (proprietary Deluxe Paint format).
Since the VGA mode is based on the use of palettes (colors were set not by 24-bit RGB values, but by indices pointing to a 256-color table), the creation process was complicated. First of all, Adrian had to make a key decision - which colors would fall into the palette (in some games, for example, Monkey Island used several palettes that changed depending on the part of the game. Id Software chose a simpler solution and used one palette for the whole game), and then paint everything with just these colors.
Wolfenstein 3D palette. Everything in the game was drawn using these 256 colors.
The coordinates of the palette vary from 0x00 to 0x0F horizontally and from 0x00 to 0xF0 vertically. The horizontal blue gradient below starts at 0xF0 and ends at 0xFE. 0xFF (marked in pink) is a special color that is considered transparent by the engine and is always skipped when rendering.
All resources were drawn manually with the mouse. Since when displaying the frame buffer on the screen, the VGA mode stretched it, Adrian had to be careful and draw everything in the resolution in which the game was supposed to work (320x200).
"Adrian and Kevin worked directly at Deluxe Paint, at that time we had no scanning tools." - John Carmack, programmer.
Graphic resources are divided into two categories:
- 2D Menu Items Supplied with the Game in VGAGRAPH, VGAHEAD, and VGADICT Files
- 3D mode elements (walls and sprites) supplied in the VSWAP archive
Resource production process
After generating the graphic resources, the IGRAB tool packed all ILBMs into one archive and generated a C header file with resource identifiers. The engine refers to the resource directly using these IDs.
Resource creation pipeline for a 2D menu.
In the engine code, the use of resources was strictly prescribed in the enumeration. This enum is the offset in the HEAD table, from which the offset in the DATA archive is taken. Thanks to this layer of indirect links, resources could be regenerated and reordered without modifying the source code.
Interesting fact: such a system led to problems after publishing the source code. The .h header in its bundle did not match the resource files from the shareware version or earlier versions of Wolfenstein 3D . Published headlines were taken from Spear of Destiny. You can look at what graphic chaos this led to in the article “We compile, as if in the yard 1992” on the site fabiensanglard.net [ translation of the article on Habré].
INThe Wolfenstein 3D official guide , published in 1992, explains the creative process. It contains many drawings by Tom Hall and shows a bunch of sketches made by Tom and translated into pixels by a team of artists.
“When Id creative director Tom Hall came up with the idea of the screen, he gave a sketch to Adrian Carmack. The following are examples of some sketches of the splash screen design by Tom. I chose the third draft for the game. ” - “The Official Wolfenstein 3D Guide”
The manual also contains several photographs of the team of those times; I advise you to read it to understand the context.
[Guide design created at NeXT ColorStation. This was the only case of using Steve Jobs's machine to create Wolfenstein 3D , despite the fact that id bought it in December 1991. Later, in 1993, the NeXT series of workstations became a key element in the Doom production conveyor .]