Gamasutra - How id built Wolfenstein 3D using Commander Keen tech

The following excerpt is a chapter of "Game Engine Black Book: [1]Wolfenstein 3D", an in-depth examination of the history, code, and development of id Software's influential Nazi-killing first-person shooter. [2]

This chapter reflects on the game's origins and how it was built atop the success and tech of id's Commander Keenitself created out of the bones of a failed attempt to sell Nintendo on a Mario 3 PC port.

Created by author and programmer Fabien Sanglard, the full book is now available in both physical and digital editions[3].

In 1990 a small company based in Shreveport, Louisiana was doing well in the shareware market.

As a video game subscription service, Softdisk produced and mailed new games every month to its members. Business was good but some of its employees had other ambitions.

They thought they had the skills to make it big and they wanted to prove it. They had created a new way to program side scrolling. They called the technology "adaptive tile refresh" and it enabled hardware scrolling on a PC capable of rivaling a NES. In early 1990 they worked non-stop over a weekend to reimplement Super Mario 3 on a PC and demonstrate their skills to Nintendo.

The team was successful in building a clone of Mario, but unfortunately "Ideas from the Deep" as they called themselves failed to convince Nintendo to give them a contract. As impressed as they were, the Japanese firm wanted the Mario series to remain exclusive to Nintendo consoles.

“We sent this demo to Nintendo of America, they in turn sent it to Kyoto to the mothership office, and the execs there saw the demo and were really im pressed. However, they didn’t want their intellectual property on anything but their own hardware, so they told us Good Job and You Can’t Do This."

- John Romero, programmer​

This episode was enough to convince them they had not only the talent to feed their ambitions, but also the teamwork and work ethic to potentially go all the way. In February 1991 four Softdisk employees took the leap of faith and founded their own company: "id Software".

(For ample details, read "Masters of Doom[4]" by David Kushner).

They immediately used the technology developed for "Mario 3 PC" to release their own titles and build their own intellectual property. Wasting no time, the team shipped no less than three titles annually.

Commander Keen Episode 1, 2, and 3: Invasion of the Vorticons (December 14th,
1990)
Commander Keen Episode 4, 5, and 6: Good Bye Galaxy (December 15th, 1991)
Commander Keen standalone game: Aliens Ate My Baby Sitter (December 1991)

The games, published by FormGen, were instant successes and sold very well. They also kept on writing games for Softdisk to publish, most of which featured adaptive tile refresh:

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)

During Spring of 1991 the next generation of id Software technology started to surface. Hovertank 3D placed the player inside a tank. There was no texture mapping yet and the pace was quite slow. Catacomb 3D marked the introduction of textures and took immersion one step further by placing the player in control of a magician in first person view.

In November 1991, the team was free from any obligations to SoftDisk. Their next game was going to feature the 3D technology they were building and would be called Wolfenstein 3D. Given the magnitude and ambition of the title, four more people were added to the team for a total of eight.

"Jason was part of id at the start, but we parted ways during Wolf development."

- John Carmack, programmer

Organization

In September 1991, following Tom and Jason’s high-school memories of the area, the team relocated from Shreveport, LA to Madison, WI. They established their office in a two story brick building at The Pines apartment complex, 2622 High Ridge Trail. They all lived in walking distance of the office except for John Carmack who, since he did not care, inhabited the second floor of the apartment.

The development of Wolfenstein 3D started in January 1992. As temperatures fell and snow dumped from the sky, the team kept itself increasingly busy and barely left the office. Development lasted four months and Wolfenstein 3D was released in May 1992.

During these four months, the organization of the team was pretty much standard for a game studio of this era: four guys crammed in one room, dictating a fast pace and strong sense of camaraderie (and a lot of noise disturbance given John Romero and Tom Hall’s type of interaction).

On the map (below) you can see on the upper floor the SNES where countless games of F-Zero were played and the Dungeons & Dragons area extensively mentioned in "Masters of Doom". To have a team member (John Carmack) with his apartment directly above the studio was not out of the ordinary.

"We started with floppy data transfer, but we had a Novell network on coax Ethernet by the end*. We didn’t have a version control system. Surprisingly, we went all the way to Quake 3 without one, then we started using Visual Source Safe."

- John Carmack, programmer

* Comment from John Romero: "We bought a $7000 Novell Netware 3.11 system while in Madison, WI in November 1991. This included the file server, cables, and network cards.

 

Everybody was working with the best PC money could buy, a high end 386-DX 33MHz with 4MiB of RAM.

Programming

Development was done with Borland C++ 3.1 (but the language used was C) which by default ran in VGA mode 3 offering a screen 80 characters wide and 25 characters tall.

John Carmack took care of the runtime code. John Romero programmed many of the tools (TED5 map editor, IGRAB asset packer, MUSE sound packer). Jason Blochowiak wrote important subsystems of the game (Input manager, Page manager, Sound manager, User manager).

Borland’s solution was an all-in-one package. The IDE, BC.EXE, despite some instabilities allowed crude multi-windows code editing with pleasant syntax highlights. The compiler and linker were also part of the package under BCC.EXE and TLINK.EXE.

There was no need to enter command-line mode however. The IDE allowed to create a project, build, run and debug.

To compensate for the tiny CRT display, some of the developers used two screens. (Note from John Romero: "Both John and I had small 12' amber monochrome monitors we used with Turbo Debugger").

Graphic Assets

All graphic assets were produced by Adrian Carmack (Kevin Cloud did a few textures and also worked on the design and layout of the Wolfenstein 3D hint book). All of the work was done with Deluxe Paint (by Brent Iverson, Electronic Arts) and saved in ILBM (InterLeaved BitMap) files (Deluxe Paint proprietary format).

Since the VGA is palette-based (colors were not specified via 24-bit RGB but via indices pointing to a 256-color table) the creative process was difficult. Adrian had to first make the key decision of which colors would go in the palette (some games like Monkey Island used multiple palettes depending on the section of the game; id Software went for a simpler solution with one palette for the whole game), then draw everything with only those colors.

The palette coordinates run 0x00 to 0x0F horizontally and 0x00 to 0xF0 vertically. The horizontal blue gradient at the bottom starts at 0xF0 and ends at 0xFE. 0xFF (represented in pink) is a special color deemed transparent by the engine and always skipped during rendering.

All assets were hand drawn with a mouse. Since the VGA stretched the framebuffer when displaying it on the screen, Adrian had to be careful to draw at the same resolution as the game would run (320x200).

"Adrian and Kevin both worked directly in Deluxe Paint, we didn’t have any scanning tools at the time." 

- John Carmack, programmer

Graphic assets are divided in two categories:

  • 2D Menu items shipping with the game in VGAGRAPH, VGAHEAD, and VGADICT
  • 3D Action phase items (walls and sprites) shipping in the VSWAP archive

Assets Workflow

After the graphic assets were generated, a tool (IGRAB) packed all ILBMs together in an archive and generated a C header file with asset IDs. The engine references an asset directly by using these IDs.

Trivia: This system led to issues when the source code was released. The .h header files provided did not match the asset files from the shareware or early versions of Wolfenstein 3D. The headers released were from Spear of Destiny. You can see the kind of graphic mess this led to in the article "Let’s compile like it’s 1992" on fabiensanglard.net.

"The Official Hint Manual for Wolfenstein 3D[5]" published in 1992 explains the creative process. It contains many drawings from Tom Hall and shows many behind the scene sketches made by Tom Hall and pixelarted by the graphic team.

"When Id’s Creative Director, Tom Hall gets an idea for a screen, he provides a sketch for Adrian Carmack. Below are some of Tom’s early designs for the title screen. The third sketch was chosen." - Official Hint Manual for Wolfenstein 3D

The hint manual also contains several photos of the team back in the day; it is worth a read for context. 

[The manual was designed on a NeXT ColorStation. It was the only usage of Steve Jobs’s machine for Wolfenstein 3D even though id purchased it in December 1991. NeXT’s series of workstations later became a key element of the production pipeline for Doom in 1993.]

References

  1. ^ Game Engine Black Book: (fabiensanglard.net)
  2. ^ Wolfenstein 3D (fabiensanglard.net)
  3. ^ physical and digital editions (fabiensanglard.net)
  4. ^ Masters of Doom (www.davidkushner.com)
  5. ^ The Official Hint Manual for Wolfenstein 3D (www.amazon.com)
keywords game development, game developer, game programming, game programmer, videogame, artificial intelligence, 3D animation, game design, 3D modeling, game business, game jobs, game directory, game development software, game technology, 3D technology, game producer, game audio, game animation, virtual reality, digital entertainment, PC game, Xbox game, game news, new game, arcade development, Nintendo development, Playstation development, Playstation 2, PS2, Dreamcast development, Game Developer magazine, Computer Game Developers Conference, Game Developers Conference, Independent Game Developers Conference, CMP Game Media Group, game industry research, online game development, digital assets, free textures, free 3D models, free shaders, Gamasutra Exchange, 3D Studio Max textures

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Items in articles
Satellite imagery shows Northern California kelp forests have collapsed | Hacker News Satellite Imagery Shows Northern California Kelp Forests Have Collapsed | Smart News | Smithsonian Magazine I Just Hit $100k/yr On GitHub Sponsors! 🎉❤️ (How I Did It) | Caleb Porzio Daniel Sada Caraveo – How to sleep at night having a cloud service: common Architecture Do's – Software, Notes & Quantum Open Worlds — Real Life The Brains of the Voyager Spacecraft: Command, Data, and Attitude Control Computers - News Ex-CIA Officer Reveals How Eateries Are Key To Spycraft : The Salt : NPR Benefits of a daily diary and topic journals | Derek Sivers Australia's 4G network is faster than 5G: study Australia is the only country with a 4G network that is faster than the 5G network, as shown in a new report. How is it like to be a dev in Iran | Shahin Sorkh’s Blog Gamasutra - How id built Wolfenstein 3D using Commander Keen tech My beautiful Linux development environment - DEV Community 👩‍💻👨‍💻 Welcome to My New Office Prince Of Persia Code Review Part 1 Want to Make a Lie Seem True? Say It Again. And Again. And Again | WIRED How to Create Beautiful SVG Animations Easily - DEV Community 👩‍💻👨‍💻 How To Ask Questions The Smart Way Turning Frustration into a $35k/mo Product that Helps Teachers Excel - Indie Hackers People Like You More Than You Know - Scientific American Blog Network What is ActivityPub, and how will it change the internet? – Jeremy Dormitzer How a shampoo bottle is saving young lives - Health care unquantified - nomasters Pushing My Side Project Forward in the Face of Real-Life Obstacles - Indie Hackers John Carmack: My Steve Jobs Stories (facebook.com) [Journey] My Shopify Dropshipping Journey to $1000/day The murder that shook Iceland How Schopenhauer’s thought can illuminate a midlife crisis | Aeon Ideas The User Experience of Lootboxes – Prototypr 1. The Things We Carry – Kipple Field Notes Fallible Ideas – Taking Children Seriously Inside the fake Facebook profile industry | Radio-Canada.ca
Search Linx
Search Linx by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
You drown not by falling in the river, but by staying submerged.
Unknown
Random CSS Property

<integer>

The <integer> CSS data type is a special type of <number> that represents a whole number, whether positive or negative. Integers can be used in numerous CSS properties, such as column-count, counter-increment, grid-column, grid-row, and z-index.
<integer> css reference