DoomとQuakeを生んだ先駆的コーディング技法――John Romeroが語る

The pioneering coding tricks that built Doom and Quake

The Stack Overflow Podcast39分
DoomとQuakeを生んだ先駆的コーディング技法――John Romeroが語る

DoomとQuakeを生んだ先駆的コーディング技法――John Romeroが語る

The Stack Overflow Podcast

0:0039:33

要約

Stack Overflow PodcastでRyan Donovanが、DoomやWADファイルの生みの親John Romeroに話を聞いた回。Wolfenstein 3DやDoomを当時のPCで高速に動かした自己書き換えコード、垂直スパン描画、MOD向きの設計、Quakeの衝突判定の工夫が語られる。後半ではコーディングエージェント時代について、アイデアこそが重要で、コード作成に割く時間が減れば設計や創造に時間を使えるという見方を示している。

この回のポイント

  • ●Romeroは11歳で大学のメインフレームに触れてBASICを学び、1980年代に多数のゲームを作った。Wolfenstein 3Dは約4か月でシェアウェア版を公開したと述べている。
  • ●Wolfenstein 3DではVGAのChain 4モードで画面を垂直方向に1ラインずつ描画し、画面サイズごとに自己書き換えコードを生成して高速化した。
  • ●Doomは線分(linedef)とセクターでマップを定義し、90度壁以外の形状を可能にした。AIにヒント不要で動く設計で、MODを前提に作られた。
  • ●Doomのネットワークはdeterministicなシミュレーションでtickdupeにより低速回線にも対応。Quakeでは3Dポリゴンとライトマップが導入された。
  • ●Quakeの衝突判定は、モンスターのサイズを3〜4種に分けて壁側を押し出し、点の判定1回に置き換える発想で高速化した。Romeroは、こうした新しいアイデアは現在のAIエージェントには出せないと述べている。
  • ●コードに割く時間が減れば設計やユーザー体験に集中でき、制約が減っても創造性は高まるだろうとの見方を示した。

章立て

  1. BASICとの出会いと初期の開発

    1979年、11歳で大学のメインフレームに触れてプログラミングを学び、1980年代に多数のゲームを作った経緯を語る。

  2. 3Dへの移行とWolfenstein誕生

    Hover TankやCatacomb 3Dを経て、横スクロール路線を止めてWolfensteinの3Dリメイクを始めた経緯を話す。

  3. VGAと自己書き換えコード

    EGAからVGAへの切り替え、Chain 4モード、垂直スパン描画と自己書き換えコードによる高速化を説明する。

  4. Doomの設計とMOD文化

    linedefとセクターによるマップ構造、AIの設計、MOD前提のアーキテクチャ、MyHouse.wadなどに触れる。

  5. 決定論的ネットワークとtickdupe

    Doomのdeterministicなシミュレーションと、低速モデム向けのtickdupe、Duangoクライアントの話。

  6. Quakeの制作とツール

    フル3D化、Alias Wavefrontでのモデル制作、ライトマップ、リーク検出用のポイントファイル、新規性のルールを語る。

  7. 衝突判定のアイデアとAIエージェント

    Quakeの衝突判定の工夫を例に、アイデアの重要性とコーディングエージェントの位置づけを論じる。

  8. 創造性と今後のゲーム開発

    制約と創造性、設計の重要性、ジャンルを超えた新しい体験づくりについて語る。

解説記事

ゲーム開発者John Romeroが、Stack Overflow PodcastのRyan Donovanのインタビューに応じた回である。WeAreDevelopers北米大会での収録で、Wolfenstein 3D、Doom、Quakeの技術的な工夫と、AIコーディングエージェント時代のものづくりについて語っている。

メインフレームから高速3Dへ

Romeroは1979年、11歳のときに地元大学のコンピュータ室に通い、BASICを独学したと振り返る。自宅にコンピュータが来たのは3年後で、その間は店頭の機種でプログラミングを続けたという。1980年代にはアセンブリ言語で多くのゲームを作り、1991年にはチームで13本のゲームを作ったと述べている。

その中でJohn Carmackが3Dに関心を持ち、Hover Tank 1、Catacomb 3Dと進んだ。Romeroによれば、ある夜に横スクロール作品の制作をやめ、「Castle Wolfensteinを3Dで作り直そう」と決めたことがWolfenstein 3Dの始まりだった。1992年1月中旬ごろに着手し、5月5日にシェアウェア版を公開した。

自己書き換えコードと垂直スパン描画

当時はAPIもGPUもなく、CPUがVRAMへ直接ピクセルを書き込んでいた。EGAは1ピクセルが複数のビットプレーンに分かれていて扱いにくかったが、VGAは1ピクセル1バイトで扱いやすかったと説明する。発行元Apogeeの助言もあり、Wolfensteinは途中でVGA専用になった。

描画は画面を縦1ラインずつ処理する垂直スパンのブリッティングが基本で、視点を傾けない前提のため計算が大幅に簡略化できた。さらに自己書き換えコードにより、描き始める位置から必要な命令だけをあらかじめ生成して実行する方式をとった。画面サイズを縮めれば処理するスパンも減るため、高速になる。条件分岐を重ねるより速かったと述べている。

Doomの構造とMOD文化

Doomではライトレベル(明るさの段階)が導入され、使える色の選び方に制約が生まれた。マップは2次元行列ではなく、線分とセクターで構成される。壁には上・中・下のテクスチャがあり、両面線分は隣のセクターを参照する。これにより90度以外の壁も可能になった。ただしメモリや描画速度の制約から、線分数には限界があった。

モンスターのAIは、レベル側にヒントを一切置かなくても動くよう設計されており、Carmackにとって最も難しいコードの一つだったと語っている。その結果、デザイナーは手間なくマップを作れ、MODが広がる土壌になった。Romeroは「MODを前提に作った」と述べ、MyHouse.wadのような後年の作品やDeHackedによる実行ファイルへのパッチにも触れた。

ネットワーク対戦では決定論的なシミュレーションを採用し、入力を他のプレイヤーへ即座に送る方式だった。低速モデム向けには、送信データを減らすtickdupeという仕組みがあったと説明している。

Quakeの工夫とAIエージェント

Quakeでは本格的な3D化に伴い、SGI Indigo上のAlias Wavefrontでモデルを作り、ライトマップで陰影を付けた。ライトマップ生成ツールが、穴のある(閉じていない)レベルを検出すると点の列を出力し、エディタ上で穴の位置を辿れるようにしたデバッグの工夫も紹介された。前作で作れる部屋では不十分という「ルール」を課して、見た目の新しさを保ったという。

AIエージェントの話題では、Quakeの衝突判定が例に挙げられた。キャラクターのサイズを3〜4種に分類し、レベルの形状をそれぞれ押し出したうえでビットパックし、矩形の判定を点の判定1回に置き換えた。Romeroは、このアイデアが前例のないものであり、現在のAIエージェントには思いつけないと述べる。一方で、ビットパックのような実装はエージェントに任せ、人間はアルゴリズムとアーキテクチャを考えればよいという立場だ。

制約と創造性、これからの設計

かつてはプログラミングが開発時間の約9割を占め、設計に割ける時間は限られていたという。コードに割く時間が1割になれば、ユーザー体験や革新的な要素により多くの時間を使えるというのがRomeroの見方だ。「Design is law」が90年代からのモットーだとも語る。

今後の革新については、新ジャンルを無理に発明するのではなく、見たことのない魅力的なものを作ることだと述べた。複数ジャンルの要素を混ぜる場合は、本筋に忠実であるべきだとしている。PS1風の美学を持つホラーゲームの人気も例に挙げ、最新技術に頼る必要はないと述べた。人口統計の分析ばかりでは作り手自身に誠実なものが作れなくなる、という趣旨の発言もあった。

まとめ

本エピソードは、厳しい制約の中で生まれた技術的な工夫を、当事者の言葉で追える内容だ。AIエージェントへの見方も、実装の自動化が進むほどアルゴリズムの発想と設計判断が重要になる、という論点として示されている。日本のエンジニアにとっても、生成AIに任せる部分と人が考えるべき部分を整理する際の参考になるだろう。

文字起こし(英語・自動生成)

Hey, your open finance prototype works. Now, make it production ready with MasterCard APIs. Access permissioned financial data and scale on infrastructure designed to meet the security and reliability standards that financial services demand. Head to developer.mastercard.com. Hello and welcome to the Stack Overflow podcast, a place to talk all things software and technology. I'm your host, Ryan Donovan, and today we're recording live at the We Are Developers North American Congress in San Jose. And the acronym for this is WOD, and we're here with the creators of the WOD file format and creator of Doom, John Romero. So welcome to the show. Hey, how are you doing? I'm good, I'm good. And so, you know, usually we ask how you got into software and technology, but I think that is a lot of what we want to talk about today. Yeah. You got started coding games in a time when it was a very different landscape, right?

Yeah. Yeah, most people didn't have a computer at home. Yeah. We didn't have one either. I knew nobody with a computer at home because it was 1979. And I just was very lucky to be able to discover the local college and the computer lab in the mainframe that was there. Yeah. And started to play games on the terminals connected to the mainframe. And I got to play all the really early Star Trek and Adventure and Poison Cookie and all those little text things. Yeah. And I saw that there were students who were typing something in. It was like, what is that? It's programming. It's basic. And I'm like, I want to do that too. And so I was 11 years old. Yeah. Wow. But I didn't get kicked out. and I just came every day during that summer and just kept on learning and started to make my own little adventure game, learning how basic works and just tons of testing and playing. But, yeah, I learned pretty fast. It was three years before we got a computer at home. So it was three years of me going to stores, TRS-80s and Radio Shack, you name it.

You know, Atari, they all had basic in them. Just camping out and programming. Yeah, just like, don't kick me out of here and type it in stuff from a book, you know. That's amazing. Yeah, so I just worked hard to try to learn on my own until we got a computer in 82, and then I was done going outside. No more childhood. It's all programming all the time. Assembly language, you name it, for a decade. And making tons of games. By 87, I made like 56 games. Wow. Several of them. The one where we got on most people's radar was the Wolfenstein 3D, right? Was that the first person shooter? That was our third shooter at the time. So we started the software informally in 1990, but in 1991, we kind of went into overdrive when we had finished shipping the Commander Keen trilogy, December 14th of 1990. Then we could actually leave our jobs, our day jobs, and just be at the lake house where we had software and just code, you know, all day long. But we were still making games for softest because we bailed out and they had a subscription product.

People signed up for a year. We couldn't dump them like that. So we made a deal with them that we would make them a year's worth of games, which back then was six games. So we made games every two months. Yeah. But we also wanted to make our own games. Right. Right. So we needed to, like, double up. And it ended up that in 1991 we made 13 games. And in May of that year, John Carmack wanted to explore 3D because he was really excited about rendering 3D. Yeah. And this is before texture mapping, but we made a game called Cover Tank 1 in two months. shipped the first 3D game, solid-filled polygon walls. It was not as polished, obviously, as later ones. It was still funny and had digital sound, even. A lot of people now might not realize it, but before sort of graphics cards and any sort of rendering, like these weren't drawing triangles. No, no, this is pixel by pixel. So the screen res, though, was 300 by 200 or 320 by 200, and we had to put every pixel on the screen, every frame.

We're trying to go for as fast as possible. 30 was probably about what we could do back then, just given that everything is CPU-bound and there was no hardware. We were writing to EGA or VGA memory, but it was EGA at the very beginning, but that's just memory. You know, it's just A0000 segment. And so, like, we're just writing into memory. There's no help. There's no APIs. There's no addresses. There's no APIs, yeah, except for BIOS. That was the only API we had. But so we were basically putting every pixel on the screen using tricks like chain four mode eventually when we got to VGA. But there was some EGA tricks that we were using. But, yeah, we were rendering that. And that's after we had done breakthroughs already with hardware with command or key and smooth scrolling and using the port, you know, in and outs to speak to the graphic card and all that stuff. You know, assembly language mania. But we were writing everything to see. But the assembly was just for the stuff that needed to be really fast. You were using the IO ports to move graphics around? That was like for input, to get input. Oh, okay. Yeah. The graphics, though, was straight into memory.

We weren't into Mode X at that time. It was just 13X. But we were blasting into memory using a special mode where you could draw more pixels at once in EGA. Yeah. So the first ones were EGA. And then six months later, we did Catacomb 3D, which was the first texture map 3D shooter. Oh, okay. Before Wolfenstein. Yeah. We actually saw that on our site as a big box game. Finally, we've got it in a box. It was never in a box. Yeah, that one was texture mapped. It's a 3D version of the Capcom 1 and 2 games that we'd made, which were kind of like Gauntlet. So it was like Gauntlet in 3D with just tons of stuff. Remember Wizardry. Wizardry is probably around that, but faster. Well, Wizardry was a turn-based RPG. So that was from 1981, looking in 3D, but you're just sitting there. There's a picture of a thing on the screen. You can say what the commands are. There's no real time. This is a real time. 3D game where you can move anywhere in space, which is the big difference for us back then. Yeah. There was really only one 3D game ever made before Hover Tank that let you move anywhere

in a 3D space, pixel-wise, because every game before that was like a chessboard piece going from square to square, right? Yeah. No matter what the game was, usually they were RPGs. But there was a game in 1982 called Way Out on the Apple II that did that, and all of its coding routines were 4K. That was all it was with 4K. Yeah, Paul Edelstein was a really amazing programmer. Yeah. But we did that in Catacomb 3D, kept you moving around. We got texture mapping. There were a couple little bugs that we needed to figure out later, but we had to ship. It was two months. Yeah. So we had to make our first texture map 3D shooter in two months, get that out. We were doing two games at once while we were making Catacomb 3D. So we were making Keen 6 because it had to go to retail. We had to ship it earlier than Christmas to get it in boxes into the stores. Then we're doing Catacombs, and in the middle of Catacombs, we start Keen 5, which is a shareware release. And we did that one game in one month, and it's probably my favorite Keen out of all of them. It's such a good one.

We got done, say, the end of 1991. All those games are done, shipped and everything, and we're done with our contract with Softus to just help them out. And then we could actually make games on our own timeline, and so we're like, we don't have to do two months anymore. We can spend as much time as we want. And we actually started making another Commander King trilogy side-scrolling in VGA with Parallax. And it was only about two weeks after starting that. It was like one in the morning. We're all working. And I'm just like, guys, we should not make this game. We need to stop. And they're like, what? It's looking really good. I'm like, dudes, this is not the future. We shipped the future back in November. That 3D texture mapping, we need to do that. Stop the side-scrolling. We're done, right? And so, like, yeah, that really makes sense. John's like, I love 3D. So it was only, like, maximum of half an hour. Well, what kind of game should we make? Right. What about, like, escaping a bio lab? There's, like, mutants, all this stuff. It's like, dude, we just, we did that with Hover Tank 1.

You know, we can do it better. It's like, hmm, what if we just remade Castle Wolfenstein in 3D? Right. And they're all like, oh, my God, yes. because we were huge fans of Silas Warner's Castle Wolfenstein and Beyond Castle Wolfenstein. We all knew exactly what the game would look like instantly. Like, we all knew. We knew what it was going to turn out to be. Right. I was like, all right, let's start. So the next day, old game wiped out. We started working on Wolfenstein. Yeah. So we started, say, mid-January, and we uploaded the shareware on May 5th. So, like, less than four months to get a shareware episode out, and then we popped out, like, 50 more levels in the next one month. You know, dev teams talk about pressure in the games industry now, right? There's only four of us. So, I'm curious about, like, when you started on that one, what were the sort of programming innovations that you guys put in that? So, with Wolf of Science 3D, it was interesting. We started working on the game in EGA mode, because we'd made all of our games in EGA up until that point. No VGA, which actually was better for programming-wise.

Oh, really? To do VGA graphics, it's a byte for pixel. instead of EGA, which was bit-planed, one bit per plane, four planes stacked for every pixel. Horrible. That seems wasteful. Yeah, it's just the architecture. That's like No Wonder Games were so slow back then, you know? Yeah. So the architecture of VGA was much easier. We were doing EGA until our publisher Apogee like Scott Miller said dude forget the EGA This game is going to be so big It needs to be VGA Everybody buying VGA cards I mean if you doing the future right I know It like you know what You right We're done with EGA. We're not even going to include it. We're not wasting our time on the graphics. Because our previous game, the Commander King games, came in CGA and EGA. Oh, CGA. Yeah, we shipped smooth-scrolling CGA. Wow. So we did CGA support. And I was used to doing a lot of CGA at softest because it wouldn't make anything that had graphics if it wasn't CGA first because their users were so early 80s, you know? I heard you got a lot of graphics list by

having the fuzziness of the CRT screen. Yeah, for the graphics, they make stuff look better, you know? And everybody relied on that all the way from the early 80s. You know, CRT art was just like its own craft, you know? Especially on things like the Apple II where white was just two bits next to each other. Like, in a bit pattern, two bits next to each other was white. It was just kind of crazy. But on the PC, it looked really good. VGA graphics, we get to define the palette. We got the Phoenix BIOS book, which was really important because it had in detail everything about setting palette registers and all that stuff, right? Like we're going to set the palette. We're going to load up each RGB value for each palette entry so we can define a custom palette for our game. Right, because you only got a certain number of colors. 256, which is like insane compared to the 16 that we had. Yeah. So we went, woo, this is nuts. And for us, like Wolf Design had a good amount of colors, but they're all bright. Like we didn't have any light levels or anything in that game.

So we could use like full 256 palette, lots of colors, no shading. Like we did do some darker versions of some colors so we could have some good looking art that was detailed. But technically there was no light levels in the level design. Lighting and shading is a different animal. Yeah, especially back then where you're just looking at a buffer of bites, right? Right, yeah, yeah. That's all manual stuff. So we switched the Wolf to VGA. John was really happy about it, the new techniques in Chain 4 mode. And our rasterization was based off of a vertical span blitter. So instead of going in linear order the way that VGA memory goes across the screen, we went in Chain 4 mode, and we blast our screen vertical pixels. So everything in all of our games, Doom, everything was vertical span building. So we did a vertical line at a time. And that's because of the way that the screen space in 3D, some lines are going to be closer,

and we were not rotating, tilting the view. And that means all of the calculations are way faster. There's lots of stuff we don't need to have in our calculations because we can depend on no tilting. And it works great for span building. It's always straight. Right. So we had self-modifying code. So it was right in self-modifying code to do this. Early. Yeah. And that was, if you remember in Wolfenstein, you could resize the screen area because, like solar computers, you need to shrink it down. That just means less vertical spans, right? Yeah. So we had a function per vertical line, which really is 320 maximum if it's full screen. You have 320 of these self-modifying code loops. Right. But if you shrink the screen down, you have way less. It could be down to 160 or whatever. So it's going really fast. And vertically, it doesn't have to draw that much stuff, right? Yeah. So, yeah, and the thing is self-modifying code, 80s. Like, we did everything in the 80s. We had unwound loops, you name it. Was there sort of a weight that added, like, for that speed?

Was there an extra overhead to have the self-modifying code in there? It was faster to have that than to just try and do it through logic. You have these statements and stuff everywhere. It's like, should we draw here? Right. You know, there's a lot of techniques when you're doing graphics where you're like, here's a graphic and we're drawing it in the top right hand corner of a bit buffer. And it's like, OK, so we need to be able to start at the beginning of the shape that stop it. So many pixels in because it's at the edge. We have to go down into the shape a certain number. Right. There's all that. But if you do self-minephysic coding, you know where you're starting and you just blast out all the code from that point. You know, so it's like it's already kind of pre-calculated and you blast it and you just execute it. And so we just had buffers that we wrote this code into. That obviously was a pretty big success. I remember I had Wolfenstein 3D, and I don't know how it got there. Yeah, everyone had it. Yeah, yeah. I've been working on my talk for today, and there's a Wolfenstein part. And I have, like, a media folder from 92, color copies of all the magazine articles and stuff that don't exist on the Internet anymore.

They weren't ever on the Internet, right? and so it's cool to go through those things and just like it blew up everything. Yeah, it was in every magazine. It was drop-dead gorgeous is some of the things that people were saying about Wolfenstein because no one had seen that before. They never saw that speed. They never saw that violence. They never saw VGA looking so good. It was just like, wow, what's going on? Right, it showed capabilities, right? Yeah, show what your business computer can do with a bitmap buffer that everybody had, right? I want to sort of jump to Doom because I think it's almost become a joke where it's like, this is the testing thing for any computing device. Can't it run Doom? You run Doom on a pregnancy test. You run Doom on a series of crafts. It's not Wolfenstein, it's Doom. It's Doom. Yeah. So I feel like Doom had a lot of clever tricks to make it fast and look really good in that speed. Yeah, it was doing the spam blitter, that technique again. We wanted light levels, so now our color choices are much more restricted

depending on how many gradient levels of light per color. Yeah. So I think we went with eight, because Doom was more colorful than Quake, which had 16. So you have even less colors when you're going to have a full gradient of a color, right? Right. And also, like, we had to have some reserved colors that were, like, in Doom, we would have some lights that would never dim, no matter how far away they are, the Fulbright, and they'd be part of a graphic that is dim, but, like, just these colors, they'd never get, you know, looked up in a table. And it was just a table lookup, So it wasn't like it had to go if this. It's like it already knew that don't try and look up a gradient for it. So it had lots of, you know, optimizations. It was the first time that I think the world was in polar coordinates, which was kind of weird. But John decided on that. I think it was a 2D map, right? It was an overhead 2D, but it was like in Wolfenstein's world was a 2D matrix. Dooms was not. Dooms was line depths and sector depths. So there's lines and things called sectors that define the textures that were going to be on the wall. And each wall had a top, a middle, and a bottom.

So the middle could be gone, and we have a window. Yeah. Right? And so the height of the room, the sector height is in that sector depth. So there's a height, the light level, and the textures for those three things. The line segments had fronts and backs on them. And if it was a two-sided line, it could look up into another sector. So if you had a window on one side of this line, it's called a two-sided line. You got the texture information, height information, the light level information. On the back of the line, it references another sector, which is really just a certain height for the window. And it just has a top texture, bottom texture, light level. It only needs a limited amount of information. All the sectors are the same, though, so it just doesn't need all the other stuff. You don't fill it in. So the whole world was made out of that. Lines can be, you know, you put a dot down anywhere in that space, right, the pixel space, and just have a line go over here and go this way and that way and this way and just do whatever. Right. And there was no game on the planet that had ever had a world that didn't look like 90-degree walls.

Right. It was the first one with a compact angle. With anything. If we wanted to, we could have round walls. It's just that we were limited by the refresh and the memory that we're using. Right. The number of line depths was limited. So we still had constraints, and we're doing as much as we could. If I wanted to have a really smooth curved wall, I would make it so you would only see it within a certain amount of, in a little hallway, and then you'd leave it. And then it would be like, wow, we did have some curved halls. I imagine there were some hard tests you ran against that. Did you find that any map things broke, those tests? We were pushing the edge when we were doing the maps. And we had the game, the renderer would basically go too many line defs. It just blows up. It's like, damn. I know where I was looking because the way that we coded back then, and this was mainly John Carmack writing the engine, the less work the designers had to do, the better that they could get maps made. And you, in code, can control the way that certain things worked.

And you can improve in code, and the designers don't have to hint so much like they do nowadays. Right. So it's like AI nodes and all that, nothing like that. Yeah, yeah. The AI figured it out based off of just the data and the level. So there was no hinting from us that creatures need to kind of go towards this node to get through a tough place that's convex or whatever, because they would just go bam and then come back up and do this crazy seeking algorithm. We didn't do anything like that. No hints, no nothing. There's zero information in the levels. And John wrote, he said that was one of the hardest pieces of code to write was the AI, because it had to be so smart that we didn't need to put anything extra except drop an imp in here, drop a cacodemon, game's going to figure out, you know, how to get to you no matter what weird level design crap you put in there. I'm sure that Doom was one of the first that I know of that got a lot of mods. And it sounds like that sort of thought process made it very easy to drop in a new map. It was made to mod. Before that, we did not make anything to be modded

because we never seen a game that was allowed to be modded Right other than say the Eamon Adventures of the early 80s which were on the Apple II And it was like an adventure game skeleton and people could fill it in with their rooms and descriptions and stuff, and then copy them to their friend. And really, like in the 70s, everything was a mod, because everybody could just change basic and copy it and give it to another university. That's how... Yeah, you were just running raw code, right? Yeah, you're just writing basic, and that's how Fossil Cave is a mod. You know, it was actually a caver simulation that Will Crowther had written and Don Woods founded on the Stanford University, and they turned it into a game. I saw a couple years ago a mod called MyHouse.Wod that people were like, this sort of subtly did, you know, multiple levels where that was thought to be not possible. MyHouse depends on Jeezy Doom. Jeezy Doom is a source port of Doom. It's, I guess, not such a source port as a remake of Doom. Oh, okay. And it can interpret all the data, make the game run exactly like it would, but all the code's different on the interior, so you can do anything you want with it, right?

So MyHouse, depending on that, did a ton of scripting to do those tricks, right? There are a lot of tricks you can do with Doom's map data, but the stuff that they're doing in there are beyond that. So they're script-based. You don't need de-hacked, which was something that people did because there was no way to change the code, so you would hack values into the executable. and so de-hacked was, you would have a de-hacked table in your wad and it would basically apply a patch to the executable before running the level because it depended on, we have a new monster, Cacodemons are gone and now there's some giant thing and it shoots ten times as fast and so it like hacks the code and it's just a patch being applied. The modding scene got really crazy for years. And so my house did a lot of scripting to do all of its really cool stuff and it was basically a Doom version of House of Leagues if you ever read that book. The other thing I think Doom brought was Deathmatch, which you're the coiner of that. What I found interesting, and I've talked to other folks who have worked on first-person shooter engines,

and Doom was a deterministic simulation. You weren't tracking things across. There was no, like, fledging of bullets. No, there was no prediction or anything. It was straight movement vectors from, like, what key did I press to go forward and send that to all the other players immediately, you know? So it needed to try and stay in time. And that was pretty cool to be deterministic that early. Yeah, for sure. Because we did start predicting later with client-server architectures and trying to keep things going fast. We did do, even with Doom, if it had a slow modem connection, you could do a thing that was called tick dupe, which is to allow you to send less data but over the same amount of time so you don't lose the connection. and so you're still going to be at the correct destination that you should have been if you had a smooth connection. Duango was a client that I'd written just like after Doom 2 came out. I put in with Heretic that came out in December. Doom 2's release was October and I found out about Duango right at the launch of Doom 2.

And so I rewrote the whole client and worked with the guy at the company to rewrite the server to use packets and everything. and so we had this tick dupe variable that we could change and we let the users change it too so they could change it on their own and not just have an under the hood solution hopefully it would work. It's like so you tick dupe to 3 or 2 or 1 or something like that. You had such much slower connections back then. Oh yeah. It was crazy. It was usually like what was it 24k or something like that. Yeah it was just phone lines mom picks up the phone. It just ruins your game. So when was the first actual 3D where you're rendering objects? Yeah, that was Quake. Everything else before Quake is still a 3D game. You're still rendering 3D. You were making so many games, and I was like, did I miss one? Yeah. We did do Doom, and then we did Doom 2 right after. It took like eight months for us to do that. We're making Heretic at the same time.

Raven was making it, but I was working on Heretic. And then because of Doom 2, when it got released, That opened up the doors to a whole bunch of other stuff. But Heretic shipped just two months after Doom 2, and I got them started on Hexen right after that. And we were starting to work on Quake already. And I'm having to write the editor for Quake to do 3D levels and the full 3D. Didn't have that much time. Like, couldn't make an alias wave front or make a Maya or something. There's no time to do that, right? And this is just in-house tools. It did make it very painful to make the levels. I'm sure, because, like you said, you don't have the Maya or the model creation program. Yeah. How are you making models? We bought an Indigo, an SGI Indigo, and Alias Wavefront to make Quakes models on that machine, which is like $36,000 or something. It's really expensive. You know, the Alias people were always in our office making sure that we're doing this the first time. Like, no one had done this before, so they were real excited about it. There's a 3D model, and we need to unwrap those UVs

onto a 2D surface so an artist can draw what should be on the model, because we didn't have the capability to actually draw on the 3D model. That would have been really nice, but they didn't do that back then. So you had to put it into a 2D space, and sometimes the unwrapping looks really wacky. It's not representative of the character, but for us, those characters look just like the character on the model. We didn't have sides. They were pinched on the sides, so the front looks exact. right if there was any space here it streaked but when you look at the skin it looks good you know front and back and so you could do like range of the character paint him in and it would wrap it back up so like what dave taylor's job at the very beginning there was to unwrap and to rewrap the texture back in on the 3d model so that pipeline kevin cloud is learning how to make 3d characters yeah adrian stuck with the 2d because he's defining the palette and all the light levels and how many light levels does a single pick color, like brown?

Yeah. Quick as brown. Was that a sort of function of a limitation of the tech? It was a limitation of the VGA palette because our colors were defined by that palette, and we could use any of the pixels within the range. It would just get a little bit darker or whatever, so it could still look really nice. So just without lighting on it, it already kind of looks nice, but then the light maps are applied to it. we're using light mapping, and so that light program would generate light maps on every surface. And if it's projecting, if the light mapper is coming out from a point source, a light source, and it hits something, then it's going to be generating shadows. So it's like, yeah, you're not going to get light out in the world. So it looked really cool, and we had a really nice little piece of debug where, because we're doing full 3D levels, if we have a corner brush, we call it the brush. The brush was a 3D rectangle that we could actually then cut in any way that we want and really chop it up if we needed to to fit a space or something. Most of the time it was just make a block, and then they merge together.

They go through each other. It doesn't matter. It looks really good. It's fine. All the pixels line up and everything. T-junctions were a thing that we had to worry about in full 3D. But if we had a space that was open, like a microscopic pixel or whatever, that would leak the light. the whole level would go slow because it's not fully enclosed. Oh. Right? And so the light program, knowing that it exceeded the bounds of the space, would create a point file as it was calculating arrays. It would draw points, and if it errored, it would leave those there. So when you load up the editor, you can just follow this line all the way through the pixel that was open. It made it so much faster when we were debugging without that. To find all the holes in the level. Yeah, where's the hole in it? Because it was really horrible. I was like, dude, we need a trace to get out of here. I need to find this out. This is already long enough trying to make a level in the editor because we didn't have 3D views. We had a top-down view only for all of the levels because we're like, you know what? We're not going to be going vertical like crazy.

We're going to go out wide. We'll have nice stuff on the ceiling. There's always a rule when making the environment to make it look better than the previous game and not fall into like, well, this is what I know. So it's like if you could have made a room in Doom, if you could have made that in Wolfenstein, you failed. You need to do something better in that room, right? Height, make some height, do lighting, all this stuff that you couldn't do in Wolfenstein, you need to do it in every single room. And then with Quake, likewise, if this could have been made in Doom, you're not done yet. You know, like, look up. Is there a sky that's open? Do you have 3D stuff coming down? Do you have shadows being cast? Do you have floors that you can go under or something can go under? Do you have jumping? Because you can jump in Doom. Do we have jumping in there? That was huge. Yeah. You can jump now. I know. So it was like all of these rules to make sure that Quake was new when people saw it. Everything that they looked at was something that you couldn't see in Doom. Yeah. And so rules were really important.

And we could swim in water. That was massive. That was huge. The water was always an interesting one because some people now do like fluid stimulation and reflections and all this stuff. Oh, yeah. Did you touch any of that? No, it was too expensive already. You know, like we had the surface of the water moving in a sinusoidal way. That was cool. Inside the water, I think the view also moved because you were underwater, so it could like move around like you're there. But we were pretty limited. It's still the shadows and everything. The movement mostly was a physics thing and a full screen effect. But we knew, like, we were working with NVIDIA, we were working with Matrox, Millennium, and all the other graphic card companies knowing they coming and here the way that we want to talk to you So we defining the API Right Like the display list and everything I mean, you were the first one, so you get to sort of figure out how the hardware's built. This is exactly how we want to talk to it. And so they're like, all right, this is great. And we get everybody to agree on this. I mean, really nice. You know, a lot of the sort of stuff we're talking about today is like very like innovative stuff that hadn't been done,

stuff you had to figure out on the fly. In today's sort of programming environment, almost everybody's using coding agents. Yeah. Do you think there's going to be something lost by using coding agents, by not doing everything by hand? I don't think so because the idea is the most important thing that you got. And an agent can execute that idea. But if you don't have the idea, it's not going to have the idea at all, right? That's what's really important. Like, as an example, in Quake, it's a client-server model. You have characters moving through the world. You have NPC, monsters. They need to know where to go. They need to collide with the walls to know that they're hitting a wall to go this way, right? Right, right. So all of these collision checks, they're full 3D checks, which is really expensive normally. Yeah, that's right. And so to come up with a way to make those collision checks instantaneous almost, you have to really know everything about your data. And so for us, our data was here are the monsters. They can be grouped in three sizes.

right there's little ones and there's shambler and then there's like the player and most of the monsters in the middle we got fish and dogs and stuff that are in the smaller one right it's like we like three maybe four boxes something like that when you have a rectangular collision check with the walls you're checking all the bounds of a rectangle to see if it hits any part of the wall doing a bunch of math right you're doing a bunch of math right so if we can reduce this check to a single point check. If this point collides with anything, then you've hit a wall. If not, you're fine. If we make it one check, then success. And that's what we did. And the way that we take a whole rectangle and make it a point is by taking everything fits inside these, say, three or four sizes. And so we take all the 3D geometry of the level and we extrude it by half in one direction, half of the rectangle this way, half from the top and the bottom, from the ceilings, everything. So there's a collision hole

and it's packed into bits. It's bit packed. And so we take this collision hole, we bit pack it, we do the whole level four times. One for each lookup, for each character. So the Shamblers is going to have the most extrusion from the walls and then the little stuff will have the least. And so we just do a point check against whichever collision hole you're at and if you've hit something, then yeah, you'd collide with the wall. That's it. One dot. And so with Agentic, you would have that idea and then you would have it code all of the tools to extrude all of the sides, right? You'd have to figure out the idea and the algorithm to solve the problem. That idea had never been done before. There's no way any AI agent right now would have been able to do that. So the ideas are really important and especially like being a senior programmer, you would know that it's executing it properly for the architecture. You have a data architecture as well, so you have to

really mine the amount of memory and you can tell it. You've got to make sure that this isn't this much memory. And then it's like, hopefully, it knows the BitPack. And if not, you tell it to do that. And it's like, that kind of work? No one wants to write that code. Let the agent write the code, but you can come up with the algorithm. It's a good bank. It speeds you up. As long as you have a really great idea, you can make those things go faster. I mean, you said you started out doing assembly code for a lot of things, and nobody's written assembly code for 30, 40 years. No one needs to, really. The other thing I think is interesting with the creative solutions is the limitations. Yeah. And we are at a time of greater constraints. But now we're less constraints. Do you think people are going to be less creative, or they're just going to try to fill the space? I think they're going to be more creative. Like one of the things that we found out in the 80s was that back in the 80s, because it was so early in the industry, it was one person doing everything. So I have to do the design of the game.

I have to write all the code. I have to draw the graphics. I got to do all the sound. And then like marketing probably as well. Like I did all that too. But like you have to do all of that. When your brain is focused on all of these things, there's less time for some of it or maybe all of it. so you give yourself a certain amount of time that you can make a game and you go and do all this stuff as fast as you can you know there are goals like i want to learn new things so i want to try some new stuff but you know some people who spent more time on the game design are the people who made the best games back then you know even if they had to do everything they took a year or more years to make a game it became one of the best games of the era right but if you're going as fast as you can, and it's just you. You have less time to innovate, and you have less time to, like, do stuff. And back then, programming was the thing. A lot of times, the success of the game was how well it was programmed, because the designs were a lot copied from the arcade. They were, you know, we were all...

They were just doing ports. Yeah, doing ports and stuff or whatever, but it wasn't as exciting as, like, seeing a brand new thing, like Lode Runner, Chop Lifter, Caretaker, that kind of stuff. Those are the games that took a long time. But stuff that you were just copying from the arcade, it was like, oh, technically, how good can I get this out? And there were a lot of Pac-Man clones out there, and there were some that were the best. But still, it was an idea someone else made. What you find out is because you're focused on technique and making it look good and all that stuff, that's your programming taking up almost 90% of your time. It was code back then, which means the game design had such a limited amount of time. Now, if you flip it and you say 10% of your time is dealing with code, the rest of the time is dealing with the design of the application. Right, and you get the game experience better. Yeah, no matter what it is. Tools, right? Like anything. Like if you can design it and just let the agents run wild and get it done, you can think more about the user experience,

what you're trying to do that's innovative in that space, play with it more than be in the trenches coding constantly where you're thinking now all the time of debugging and not the thing that you should really be on, which is why teams are better. We have a person completely dedicated to that, right? But sometimes it's taking too long to code and we have a timeline. And guess what? All that code blew our time budget. All the cool creative stuff we can't execute now. We have to ship, right? So the more time you have to think about the creative part, which is my motto since the 90s has been design is law. That is everything. Why am I watching a movie? It's not because of the film that it's on. It's the idea of that movie and the story. There's 25, 30 years since Quake stuff. Yeah. And I know you haven't just done first-person shooters. Yeah. What do you feel like are the innovations to be done now? It's making something that people haven't seen before that's really engaging without trying to be super genre-specific.

You know, like exploring elements of things working together in a way that feels good and is true to whatever you think your main thing is that you're making that has these other cool elements. Like if you're making a shooter that has some RPG elements in it, like make sure you're true to the shooter because that's why people are coming. But if you have an RPG that has shooter elements, make sure it's mostly RPG and that the shooter stuff feels good. You know, it's like surprisingly good for this thing, but it's not like a major component of why you're playing it, just because the audience and what you're advertising it as. It's not specifically like, oh, invent a new genre or do whatever. Like, make something that people haven't seen before that's really cool. It doesn't need to be like the latest technology because really, you know, like old retro pixel art graphics are like horror games, live on that right now. You know, like horror games are so PS1 aesthetic, you know, and super successful because people love it. It's just like more disturbing when it's, you know, like broken down like that.

But I think that there's a lot of design language that has evolved for decades, since the early days, 40-something, 50 years. And it just keeps on evolving. So, like, pay attention to that. It's going somewhere. Where is it going? Because you could be the one to make it go there, right? and so think about that and think about incorporating that into something that is really cool that you're excited about because everybody makes stuff for them in hopes that everybody else likes it because the more that you're just studying demographics and what they might want, the less that you're making something that's true to... Data's the killer, right? Yeah. Well, thanks for listening, everyone. I've been Ryan Donovan. I edit the blog, host the podcast here at Stack Overflow. If you have comments, questions, topics to cover, email me at podcast at stackoverflow.com. And if you want to reach out to me directly, you can find me on LinkedIn. I'm John Romero, Game Director at Romero Games in Galway, Ireland, and you can check out our awesome merch at romero.com. Alright, thanks for listening everyone, and we'll talk to you next time.

Thank you.

番組の概要欄(原文)

Ryan chats with John Romero, creator of the WAD file and the video game Doom, about the self-modifying code and blitting techniques that made Wolfenstein run so fast on early PCs, the mod-friendly architecture that turned Doom into a cultural phenomenon, and why the raw creative problem-solving of Quake proves that human ideas will always beat AI coding agents.Episode notes:This episode was recorded at the WeAreDevelopers 2026 North American World Congress as part of their global event series for software engineers, tech leaders, and AI builders.Romero Games is an independent game development studio based in Galway, Ireland, where John Romero serves as game director.Learn more about John’s legendary game work at his website rome.ro. See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.

出典・この記事について

番組
The Stack Overflow Podcast(The Stack Overflow Podcast)
元の回
The pioneering coding tricks that built Doom and Quake
配信日
要約作成日
公式サイト
art19.com/shows/the-stack-overflow-podcast

この要約・解説記事は、元の音声を文字起こしした内容をもとに AI(Claude)が日本語で作成したものです。 固有名詞や数値に誤りを含む場合があるため、正確な内容は元の音声でご確認ください。制作方法について

X でシェア

関連エピソード