Wookash Podcast - 肖恩·巴雷特 | 传奇软件渲染时代 封面

肖恩·巴雷特 | 传奇软件渲染时代

Sean Barrett | Legendary Software Rendering Era

本集简介

传奇图形程序员Sean Barrett分享了他的非凡历程——从早期游戏开发起步,在Looking Glass Studios突破图形技术边界,到后来打造标志性的STB库。我们将探索从PostScript打印机到门户引擎,再到开创性独立游戏开发的全过程。本期节目深入剖析游戏史上最具影响力的图形作品背后的技术工艺与创意思维。欢迎收听! 网站:https://nothings.org/ 《神偷》引擎文章:https://nothings.org/gamedev/thief_rendering.html Github:https://github.com/nothings Bluesky:https://bsky.app/profile/nothings.bsky.social X:https://x.com/nothings Youtube:https://www.youtube.com/user/silverspaceship/videos Wookash播客 节目链接:https://podcasters.spotify.com/pod/show/lukasz-sciga Spotify:https://open.spotify.com/show/7tExkDJcI6vvmpCguX8Ygd Apple播客:https://podcasts.apple.com/us/podcast/wookash-podcast/id1683109481 Youtube:https://www.youtube.com/channel/UC9J9u3apteD0EuFjzRpt71w RSS:https://anchor.fm/s/dd7643a4/podcast/rss X:https://x.com/wookash_podcast 00:00 开场 00:41 早期编程与MUD游戏 08:50 最疯狂的打印机软件 39:32 加入Looking Glass 57:31 《Terra Nova》渲染技巧 01:18:41 《神偷》图形引擎诞生 01:36:44 门户与单元技术 02:51:30 透视投影映射 03:05:56 《神偷》图形引擎完结篇 03:16:08 首届独立游戏开发大会 03:42:57 传奇STB库诞生记 04:59:44 尾声

双语字幕

仅展示文本字幕,不包含中文音频;想边听边看,请使用 Bayt 播客 App。

Speaker 0

如果你允许它们具有一定的子像素精度,并在解释时应用这种精度,那么在绘制这条线时,实际点亮的像素就会发生变化。

If you allow them to actually have a little bit of subpixel precision and apply that while interpreting it, it'll actually change which pixels light up when you draw that line.

Speaker 0

因此,他会沿着边缘插值颜色亮度并将其降低,但这并不等同于在四边形上实际插值颜色。

So he would interpolate that color brightness along the edge and push it down, but that didn't correspond to actually interpolating a color across quads.

Speaker 0

他只是将它们向下插值,这实际上毫无意义,但当时也还能接受。

It just interpolated them downwards, which didn't actually make any sense, but it was fine.

Speaker 0

效果看起来很棒。

It looked great.

Speaker 0

在《神偷》中,我们当时说,好吧。

And in Thief, we, like, said, okay.

Speaker 0

这是声源。

Here's the sound source.

Speaker 0

声音可以从哪里发出?

Where can the the sound can come from?

Speaker 0

这两个不同的方向。

These two different directions.

Speaker 0

但这个方向更短,所以我们让它从这个方向传来。

But this one's the shorter direction, so we'll have it come from that.

Speaker 0

在软件渲染时代,我们想深入多少技术细节来讲解纹理映射?

How much technical detail did we want to go into about texture mapping in the software rendered days?

Speaker 1

我觉得要讲很多。

A lot, I would say.

Speaker 0

好的。

Okay.

Speaker 0

太好了。

Great.

Speaker 1

带我回到你刚开始学编程的时候吧。

Take me back to the time where you were starting to learn how to program.

Speaker 1

那时候是什么样子的?

How did it look like back then?

Speaker 1

计算机世界,当时整体是什么样的?

Computers world, like how did it all look like?

Speaker 0

是的,没错,我是个年纪比较大的人。

Yeah, so yeah, I'm a pretty old person.

Speaker 0

我快六十岁了。

I'm in my late fifties.

Speaker 0

所以,不像一些从小就开始编程的年轻人,我直到十二三岁才开始编程。

So unlike some younger people who like started programming really young, I didn't start programming until I was 12 or 13.

Speaker 0

于是我上了一所私立高中,那里有一台小型计算机和许多终端。

So, I went to a private high school where we had a mini computer with a bunch of terminals.

Speaker 0

所谓小型计算机,其实就是小型化的大型机。

So a mini computer was basically a mainframe, but small.

Speaker 0

它是一台共享计算机,多人可以像使用大型机一样使用它。

So it was a shared computer that multiple people could use the way a mainframe was.

Speaker 0

如果你了解那个时代,那就是大型机的样子。

If you know anything about that era, like that's what mainframes were like.

Speaker 0

但我还是补充一点背景信息。

But I'll just add some context for this.

Speaker 0

所以这是1980年的事。

So this is talking 1980.

Speaker 0

我哥哥上的是完全不同的学校。

My brother went to a totally different school.

Speaker 0

他比我大几岁。

He was a couple years older than me.

Speaker 0

而他那个古怪的旧电脑,他用打孔卡片编写Fortran程序。

And he, the weirdo, old computer that they had, he was programming Fortran using punch cards.

Speaker 0

那并不是当时最新的技术,但高中能有什么呢?

That wasn't the current technology exactly, but what do high schools have?

Speaker 0

他们只有些旧的淘汰设备。

They have some old hand me down stuff.

Speaker 0

所以他并没有在编程上获得好的体验。

So he did not have a good experience with computer programming.

Speaker 0

我七年级时在高中接触的系统是一台HP迷你电脑,奇怪的是它叫Timeshared BASIC。

The system that I started with in high school in seventh grade was an HP mini computer that weirdly was called Timeshared BASIC.

Speaker 0

因此,它的主要界面是BASIC编程语言,这在大型机和许多计算机中非常罕见。

So the main interface to it was the BASIC programming language, which was very unusual for mainframes in many computers.

Speaker 0

所以,是的,我在七年级时开始在学校学习BASIC。

So, yeah, I started learning BASIC at school and in seventh grade.

Speaker 0

然后,我父亲突然想买一台个人电脑。

And then my family, my father got an itch to get a personal computer.

Speaker 0

我不记得为什么了。

I don't remember why.

Speaker 0

于是我们买了一台Atari八位电脑,家里其他人都没用它做过别的事,只用来玩电脑游戏,而我则开始用它编程。

And so we bought an Atari eight bit computer, which nobody else in the family ever used for anything other than playing computer games, and which then I started programming.

Speaker 0

而且

And

Speaker 1

是先有游戏,还是先有编程?

Was it was it first the games or was it first programming?

Speaker 0

什么?

What's what?

Speaker 1

你最先试的是游戏吗?

Was first you first try games?

Speaker 0

天哪。

Gosh.

Speaker 0

我想我上学时就已经开始编程了。

I think I had already started programming at school.

Speaker 0

所以当我们买下这台电脑时,我肯定立刻坐下来玩游戏了,因为最初真的是游戏。

So I think when we got the computer, I'm sure I immediately sat down and played the game because like, literally first was games.

Speaker 0

但我认为,玩编程和玩游戏很可能几乎是同时进行的。

But I think, you know, the playing with the programming it probably was pretty much in parallel.

Speaker 1

BASIC,我没试过BASIC。

Basic, I didn't try basic.

Speaker 1

但我听说,这在学习编程方面是一次不可思议的体验,因为它的反馈几乎是即时的。

But I've heard that this was an incredible experience in terms of learning the program because it was pretty much instant feedback.

Speaker 1

你做点什么,屏幕上就会立刻显示出来,你会惊讶于自己能这么快就做出东西来。

You did something, something showed up on the screen and then you kind of like got amazed how how quickly you can do stuff.

Speaker 1

而且,

And,

Speaker 0

你知道,这实际上贯穿了我的职业生涯,那就是做任何与图形相关的事情都特别棒,因为你能立即获得图形反馈。

you know, that's actually throughout my career been a thing, which is that doing anything with graphics is particularly nice, because you get graphical feedback immediately.

Speaker 0

这比编写编译器要美妙得多——虽然编译器也很棒,但你知道,即时反馈就没那么即时了。

And there's just something so much nicer about that than writing a compiler that then you, you know I mean, which is great, but you know, it's just like the immediate feedback isn't quite as immediate.

Speaker 0

不过没错,BASIC是一种解释型语言,所以就像拥有一个Python顶层环境之类的。

But yeah, BASIC was, you know, it's an interpreted language, so you just, you know, it's like having a Python top level or something.

Speaker 0

你可以写代码,也可以直接输入指令来执行。

You can write code, but you can just type in a thing to execute as well.

Speaker 0

所以,我的意思是,关于那些机器的编程方式有一整套故事,但我不确定那是否特别有趣。

So, I mean, yeah, there's a whole thing about what programming those machines was like, but I don't know if that's particularly interesting.

Speaker 0

在那个时代,有些人,你知道的,是爱好者,他们大概18、17岁就开始卖游戏了。

There were people in that era who were, know, hobbyists, hobbyists, they were 18 years old or 17 years old and selling games.

Speaker 0

他们在制作并销售游戏,而我十几岁时从未深入到那种程度。

They were making games and selling games, and I never got anywhere that far into it in my teens.

Speaker 0

我被教导要制作可发布的高质量游戏。

I was taught like making shippable quality games.

Speaker 0

那时候可发布的游戏仍然相当粗糙。

The games back then that were shippable were still pretty janky.

Speaker 1

所以这是在高中,然后你上了大学?

So this was high school then, and then you went to university?

Speaker 0

在大学里,我不想主修计算机科学,因为当我进入大学时,我已经编程六年了,所以我很快决定自己已经差不多懂所有东西了。

So in university, I didn't want to major in computer science because by the time I got because I'd been programming for six years, And so I pretty quickly decided that I already kind of knew everything.

Speaker 0

我的意思是,你得去学一堆基础性的东西,虽然我可以免修一部分,但显然从中学到的东西并不多,因为我已经非常擅长了。

Like, I mean, you'd have to go through all this intranespery stuff and I could place out some of it, but it just wasn't clear there was that much I was going to learn from it, because I was really good at it already.

Speaker 0

当然,我还有很多要学的,但我可以通过实践来学习。

And look, obviously I had more to learn, but I could learn by doing.

Speaker 0

所以在第一年,像很多大学,尤其是美国的大学,都有通识教育要求,就是你必须选修各种不同的课程来拓宽知识面。

And so I, you know, in the first year, like a lot of universities, a lot of American universities, they have a liberal arts requirement, which is that you have to take a bunch of different subjects just to learn about stuff.

Speaker 0

你必须修读一系列入门级别的课程。

You have to take intro level on a bunch of stuff.

Speaker 0

所以我做了一些,然后又做了更多,因为我觉得,你总得选一个除了计算机科学之外的专业。

So I did some of that, and then I did more of that because I was like, well, you should pick something to major in other than computer science.

Speaker 0

于是,我开始朝哲学学位的方向努力。

And so, I started working towards a philosophy degree.

Speaker 0

到我大学毕业时,我已经满足了哲学学位的所有要求。

And by the time I was done in college, I had met all the requirements for the philosophy degree.

Speaker 0

但我同时也满足了计算机科学学位的所有要求,因为我又回去了。

But I also met all the requirements for the comp sci degree, because I went back to it.

Speaker 0

我当时计划获得所谓的双学位,也就是同时获得两个学位。

And I was planning on getting what's called a double degree, where I would actually get a degree in both.

Speaker 0

在美国大学里,双主修是同时修两个专业的传统做法。

It's like a double major is the traditional thing in American universities when you do two majors at once.

Speaker 0

但双学位有点不同,因为它会授予你两个独立的学位,你需要完成更多的学分才能获得。

But a double degree is a little different in that they actually give you two separate degrees, and you have to do more work to get it.

Speaker 0

但我当时还没有足够的学分来同时获得两个学位。

But I didn't quite have enough credits to get both degrees.

Speaker 0

所以我本可以转成双专业,拿到两个学位。

And so I probably could have switched to a double major and gotten both.

Speaker 0

但到那时,我已经对哲学感到厌倦了。

But by that time, I was burned out on philosophy.

Speaker 0

我觉得它全都糟糕透顶,毫无价值。

I thought it was all terrible and not worthwhile.

Speaker 0

于是我只拿了计算机科学学位就离开了。

So I just took the Cop Sci degree and left.

Speaker 1

好的。

Okay.

Speaker 1

你最喜欢哪些哲学家?

Which one philosophers did you like?

Speaker 0

所以最能引起我共鸣的哲学家被称为逻辑实证主义者。

So the philosophers that spoke to me the most were called the logical positivists.

Speaker 0

他们认为形而上学,大多数被写就的形而上学,纯粹是诗歌。

And they thought that metaphysics, most metaphysics as practiced, the most written metaphysics was sheer poetry.

Speaker 0

就像,它毫无意义。

Like, it was meaningless.

Speaker 0

哲学在形而上学上的整个努力都是愚蠢的。

That the entire effort of philosophy in metaphysics was silly.

Speaker 0

他们在二十世纪二十年代左右,你知道的,最终失败了。

And, you know, they were in the twenties or something, the 1920s, and, you know, they eventually failed.

Speaker 0

人们后来放弃了这种观点。

People moved on from that idea.

Speaker 0

但就是这个观点让我觉得:哦,对,这对我来说很合适。

But that was the one that I was like, Oh, that's, yeah, that's working for me.

Speaker 1

好的。

Okay.

Speaker 1

好的。

Okay.

Speaker 1

尽管你原本没打算主修计算机科学,但你还是顺利完成了大学学业,拿到了计算机科学学位。

Then you got through university, even though you didn't plan on getting the computer science major, actually got the computer science degree.

Speaker 0

你知道吗,大概进了三四年吧,因为我读了六年。

You know, like three or four years into it because I went for six years.

Speaker 0

所以进了三四年的时候,我就想,算了,我还是去学计算相关的部分吧。

So like three or four years into it, I was like, oh, let me just do the calc side.

Speaker 1

然后

And

Speaker 0

我从中学到了一些东西。

there were some things that I learned from that.

Speaker 0

比如,我选了一门计算机硬件课程,学到了一些计算机硬件的知识,如果没有上这门课,我可能很久都不会接触到这些。

Like, you know, I took a computer hardware course and learned some stuff about computer hardware that I probably wouldn't have learned for a long time without having done that.

Speaker 0

我还选了一门关于空间数据结构的课,学到了一些关于空间数据结构的知识,这花了一些时间。

And I took a class with spatial data structures and learned some stuff about spatial data structures, and it would have taken me a little bit.

Speaker 0

你知道的,要真正掌握这些内容可能会更难一些。

You know, would have been probably harder to get as good at grounding on it.

Speaker 0

像BSP这样的东西,后来就变得很重要了。

It's like things like BSPs then became important later.

Speaker 0

对这类知识有一点基础确实有帮助。

Having a little bit of grounding in that kind of helped.

Speaker 1

好的。

Okay.

Speaker 1

我读到你大学毕业后加入了两个人,一起开发打印机软件。

I read that you joined two people to work on printer software right after university.

Speaker 0

是的。

Yeah.

Speaker 0

所以,回头说一下,当我还是青少年时,玩电脑上的电子游戏之类的东西,我特别喜欢的是文字冒险游戏。

So yeah, to rewind, when I was a teenager, playing the video games on the computer and stuff, the thing that I kind of enjoyed a lot were the text adventures.

Speaker 0

在美国,最著名的是Infocom公司做的游戏,也就是制作《Zork》的那群人。

In The US, the big ones were by Infocom, the people who made Zork.

Speaker 0

我非常喜欢这些游戏,甚至到了我想亲自做这类游戏的地步。

And I really enjoyed those to a point of like, I wanna do this.

Speaker 0

我当时的心态就是:这就是我长大后想从事的职业。

This is what I wanna be when I grow up, was sort of the attitude I had.

Speaker 0

我玩了很多这类游戏,还和我妈妈一起玩。

And I play a whole bunch of those and play them with my mother.

Speaker 0

然后那家公司倒闭了。

And then that company went out of business.

Speaker 0

Infocom 是制作这类游戏的公司。

Infocom was the company that made sort.

Speaker 0

我当时想,哦,看来文字冒险游戏已经不再流行了,因为图形游戏已经取而代之。

And I was like, oh, I guess like, yeah, text adventures just aren't a thing as much anymore because the graphical games are taken off.

Speaker 0

于是我就不怎么认真考虑当游戏开发者这件事了。

And so I just kind of stopped taking seriously the idea of being a game developer.

Speaker 0

那是在高中毕业的时候。

And that's at the end of high school.

Speaker 0

那时,我其实已经不太玩图形游戏了。

And at that point, I wasn't really playing graphical games.

Speaker 0

大学头几年,我有一台没有图形功能的 IBM PC。

For the first couple years of college, I had an IBM PC that didn't have graphics.

Speaker 0

那只是一个纯文本界面,不是什么Chrome屏幕之类的。

It was just a text only, I'm not a Chrome screen or whatever.

Speaker 0

所以我当时根本没接触游戏世界。

And so I wasn't really in the game world at all.

Speaker 0

于是上大学时,我开始玩一些在线文字冒险多人游戏,叫做MUD。

So then in college, I was playing I started playing these text adventure online multi user things called MUDs.

Speaker 0

MUD有两种类型。

And there were two kinds of MUDs.

Speaker 0

一种是社交型MUD,你主要就是闲逛聊天。

There were social MUDs where you basically hang out and chat.

Speaker 0

这有点像IRC,天啊。

It's kind of like IRC or gosh.

Speaker 0

IRC的现代等价物是什么?Discord?

What's the modern equivalent of IRC Discord?

Speaker 0

还有一种是战斗型MUD,更偏向于那种类似《龙与地下城》的砍杀体验,就像CRPG那样,但仍然是纯文本形式。

And and then there were combat mods, which were a little more, like, devoted to the hack and slash kind of D and D inspired experience that, CRPGs kind of had, but they were text based still.

Speaker 0

我加入了,你继续。

And I was on board go ahead.

Speaker 1

那么,如果它是基于文本的,各种属性又是怎么运作的呢?

Who how did it work then, if it was text based, and you have all sorts of stats?

Speaker 0

是的,好吧,这说明我其实从来没玩过《魔兽世界》,但你还是能在《魔兽世界》里看到一点点影子。

Yeah, well, so it kind of shows you can kind of see that I haven't ever played World of Warcraft, but it's you kind of see a little bit of it in World of Warcraft.

Speaker 0

比如你只要说‘击打这个东西’,你就会每三秒自动挥击攻击,因为你在网络上,所以不能让你的攻击速度受网络延迟影响。

Would like just say, flump this thing, and you would just every three seconds automatically swing and attack that because you were over the network and so it didn't make sense to like, have you be suffered by like what your network connection was.

Speaker 0

你也不想只是尽可能快地点击。

And you didn't want to just be able to tap as fast as possible.

Speaker 0

所以,是类似这样的机制。

So yeah, it was just something kind of like that.

Speaker 0

所以我同时玩这两种类型的游戏。

So, so I was playing both of those kinds of things.

Speaker 0

我玩的那个战斗型MUD叫Wintermute,得说一下,虽然这根本不重要,但它是由两个ID分别为My Rex和Fred的人运营的。

One of the, and the, the combat mod that I ended up playing on was called Wintermute, which gotta say this even though it doesn't matter at all, was run by two people whose handles were My Rex and Fred.

Speaker 0

这是一个LP MUD,其中LP代表Lars和Shear,大概是这样。

And it was an LP MUD, which LP stood for Lars and Shear, something like that.

Speaker 0

我不知道正确的发音是什么,但那是制作它的人的名字。

I don't know how it's pronounced correctly, but that was just the name of the guy who made it.

Speaker 0

它有一个非常奇怪的缺陷,是个糟糕的游戏设计:你升级到一定等级,当达到20级时,你就成为巫师。

And it had this very weird quirk, terrible game design idea, which is that you ranked up levels, and when you got to level 20, you became a wizard.

Speaker 0

而巫师可以在游戏中创建自己的领域。

And a wizard was able to create their own realm in the game.

Speaker 0

问题是,擅长战斗并升到20级,并不能证明你有资格成为编程制作游戏关卡的程序员。

So the problem is that being good at the combat and ranking up to level 20 doesn't qualify you to be a programmer making levels in the game.

Speaker 0

当然,你也不一定具备成为积极玩家的正确心态,你知道,在在线游戏中,总会遇到一些讨厌的人。

And certainly, you didn't necessarily have the right mental space to be a player positive, to, you know, you know, that one of the things that happens in online games is you get jerks.

Speaker 0

现在,一个讨厌的人变成了巫师。

And now you have a jerk becoming a wizard.

Speaker 0

这肯定不是什么好的体验。

It's not necessarily a great experience.

Speaker 0

总之,我当时正要在这个叫Wintermute的地方成为巫师。

Anyway, so I was just on the verge of becoming a wizard on this place, Wintermute.

Speaker 0

我结识了两个朋友,他们在游戏里的昵称是Raistlin和Lucifer。

And these two guys that I had befriended, nicknames on there were Raistlin and Lucifer.

Speaker 0

我敢肯定,其中一个叫Lucifer。

I'm pretty sure it was Lucifer.

Speaker 0

他们已经成了巫师,而我当时快到第十九级了。

Decided that we wanted they had they had become a wizard, I was like nineteenth level or something.

Speaker 0

我们决定自己创建一个LP MUD,而不是继续用那个,因为我们希望更以玩家为中心,把玩家放在第一位。

And we wanted to run our own LP MUD rather than be on that one because we wanted to be like a more player friend like put the player first more.

Speaker 0

于是我们创建了自己的LP MUD。

So we started our own LP MUD.

Speaker 0

天啊,这故事真够长的。

Gosh, this is such a long story.

Speaker 0

但快说到重点了

But it is getting to

Speaker 1

你的太棒了。

your It's awesome.

Speaker 0

我们创建了自己的LP MUD。

We started our own LP MUD.

Speaker 0

他们两个人都是德克萨斯A&M大学的学生,那是德克萨斯州的一所大学。

The two of them were both students at Texas A and M University, which is just a university in Texas.

Speaker 0

它位于一个偏远小镇上。

It's in a small town in the middle of nowhere.

Speaker 0

你知道,德克萨斯州有很多这样的地方,这无关紧要。

You know, like Texas has these it doesn't matter.

Speaker 0

于是我们搭建了这个LP MUD。

And so we set up this LP MUD.

Speaker 0

约翰,抱歉,约翰·普赖斯是拉斯特林,而我,我不是另一个我稍后会提到的约翰,我是路西法,我们俩在运营它。

John sorry, John Price was Racelin, and I, and there's nothing I Lucifer, who's not the other John that was going to bring up in a second, were running it.

Speaker 0

我们把之前为Wintermute制作的内容和关卡都导入进来了。

And, you know, we imported the work we had done, the levels we had created for that other, for Wintermute, we imported them.

Speaker 0

我们问了两位管理员之一的弗雷德,看他是否愿意加入我们,担任超级管理员之类的角色。

And we asked one of the two administrators, Fred, if he would come along and join us as a, you know, a super administrator or whatever.

Speaker 0

他偶尔会来,就像一位受喜爱的叔叔。

He kind of came along occasionally as like a favorite uncle.

Speaker 0

他并没有真正署名,但总会时不时出现一下,有他在那里、他对此表示认可,感觉挺好的。

Didn't really put his name And he always showed up once in a while, but it was like kind of nice to have him there, to have him sort of approving of it.

Speaker 0

因为我们喜欢他做的东西、他创建的场景,他也同意让我们把它们作为我们初始内容的一部分。

Because we liked the stuff he had done, the spaces he had created, and he agreed to let us have that as part of our starting.

Speaker 0

因为当你创建一个新的LP MUD时,会有一个起始区域,但几乎所有的区域都是由达到20级的人创建的。

Cause when you create a new LP MUD, there's a starting area, but almost all of the areas is stuff that's been created by the people who've gotten to level 20.

Speaker 0

所以当你启动一个新的LP MUD时,它会非常空旷。

So when you start a new LP MUD, it's very empty.

Speaker 0

因此,我们希望一开始就能有一些丰富的内容。

And so we wanted to have a bunch of stuff to start it.

Speaker 0

那么,让我们看看。

So, let's see.

Speaker 0

我们现在讲到哪里了?

Where are we in the story?

Speaker 0

好的。

Okay.

Speaker 0

对。

Right.

Speaker 0

于是我们开始运营这个MUD,它取得了成功。

So, we started running this MUD, and it was a success.

Speaker 0

它还不错。

It was fine.

Speaker 0

我不记得顺序了。

And I don't remember the order.

Speaker 0

那里还有个家伙,他的昵称是Kastra,后来成了巫师,我和他的友谊甚至超过了我和一起运营这个项目的人的友谊。

And there was this other guy on there whose handle was Kastra, who eventually became a wizard, who I was I'd become better friends with than we're friends with than even the guys I was running the thing with.

Speaker 0

于是他去德克萨斯州一家打印机公司工作,那地方在得克萨斯A&M大学所在的小镇外。

And so he got a job working at this printer company in Texas outside, you know, in the town where Texas A and M was.

Speaker 0

然后他招募了Raistlin、John Price和其他管理员加入这家公司,但他们仍然需要更多程序员。

And then he recruited Raistlin, John Price, the other administrator onto that company, and they still wanted more programmers.

Speaker 0

于是他招募了我。

So so then he recruited me.

Speaker 0

我还得补充一个小细节:在C语言中,你使用Mallikin free作为内存分配策略。

And I should one more little detail is that, you know, in C, you have Mallikin free as the memory allocation strategy.

Speaker 0

你熟悉这个吗?

Familiar with that?

Speaker 0

LP MUD使用了自定义的Mallikin free。

LP MUD used a custom Mallikin free.

Speaker 0

我不知道为什么,但它确实使用了自定义的malloc和free。

I don't know why, but It did have a custom malloc and free.

Speaker 0

你要记住,这是80年代末、90年代初。

You got to remember, this is the late 80s, early 90s.

Speaker 0

那时候我们还没有后来人们开发出的那些优秀的malloc实现。

We didn't have a lot of the good mallocs that people came up with later.

Speaker 0

所以,它有一个自定义的 malloc,而且非常糟糕。

So, it had a custom malloc, and it was terrible.

Speaker 0

它会突然停止,本质上相当于进行垃圾回收,但这并不是真正的垃圾回收,只是偶尔会停顿五分钟,因为它要遍历并处理空闲列表,合并空闲空间之类的操作。

It would stop and basically effectively garbage collect, but it wasn't a garbage collection, but it just would stop for five minutes once in a while because it was like going through and processing its free lists and merging empty space or something.

Speaker 0

于是我为 LB Mud 写了一个 Amalek 来替代它,因为我觉得这实在太糟糕了。

So I went and I wrote Amalek just for LB Mud to replace that for us, because I was like, this is terrible.

Speaker 0

让我来写一个 Amalek。

Let me write Amalek.

Speaker 0

所以,这就是我在大学期间做的其中一件事——我写 Amalek。

So this is one of the kinds of things I was doing while I was in college is I would write Amalek.

Speaker 0

就像,好吧,我来写个 Amalek,因为这太差劲了,而我知道 Amalek 完全不必这么烂。

Like, it was just like, Okay, I'll write Amalek because like, this is terrible and I know Amaleks don't need to be this bad.

Speaker 0

我想我们确实把那个分享给了其他人。

And I think we did actually share that out with other people.

Speaker 0

但重点是,因为我做过这类事情,和我一起工作的人都知道我是个优秀的程序员。

But the point is, is that like, because I had done stuff like that, the guys I was working with knew I was a good programmer.

Speaker 0

所以这就是为什么,尽管他们都来自德州农工大学,当他为这家打印机公司招聘时,他招的是自己在当地的熟人。

And so that was why, even though they were all in Texas A and M, and when he was like recruiting for the printer company, he was recruiting people he knew in the area.

Speaker 0

他联系了我,说:嘿,你愿意来和我们一起工作吗?

He reached out to me and said, hey, do you wanna come work with us?

Speaker 0

于是我去了。

So I did.

Speaker 0

我去了德州两年,在这家打印机公司工作。

I went to Texas for two years and I worked at this printer company.

Speaker 0

所以我们并不制造打印机。

So we didn't make printers.

Speaker 0

我们为打印机开发软件,特别是为高端打印机开发软件。

We made software for printers and we made software for high end printers.

Speaker 0

这些设备通常是胶片记录仪,如果你听说过打印机的300dpi这个数字,那我们的是3000dpi。

They were typically like film recorders, which means instead of 300 dots per inch, if you've heard that number for for printers, it was 3,000 dots per inch.

Speaker 0

我们并不是在编写打印机驱动程序。

And we weren't writing printer driver software.

Speaker 0

我们编写的是运行在打印机内部的软件,这种软件主要做两件事:处理PostScript。

We were writing the software that goes in the printer that, effectively, there were two things that this software did, is it processed postscript.

Speaker 0

因此,PC上的应用程序会告诉你它是一个PostScript打印机,然后生成PostScript代码,这是一种描述打印任务的通用语言。

So the application on the PC would you would tell it's a postscript printer and it would then generate postscript for the thing, which is just a universal language for describing print jobs.

Speaker 0

而且它是一种完整的、功能齐全的语言。

And then but it's a full it's also a full language.

Speaker 0

然后我们会接收这些PostScript代码,进行处理,并生成图形指令。

And then so we would absorb that, process it, and generate graphics commands.

Speaker 0

这些图形指令最终会被传输到打印介质上——无论是纸张、胶片还是其他材料。

And so the and and then the graphics commands would somehow get onto the print, onto the paper or the film or whatever.

Speaker 0

关于这些内容,我还有很多可以讲的。

So there's all this stuff about that that I can talk about.

Speaker 0

但算了,不说了。

But it's like No.

Speaker 1

这真是个精彩的故事。

Of all, this was a great story.

Speaker 1

在那个年代,这些家伙会跨越整个美国联系某人,说:嘿,我们其实没见过面,但我看过你为我们母亲写的程序。

And the idea idea that these guys in these times, because now remote jobs are kind of more popular, but they will reach out to the person across United States to get you like, Hey, we didn't really meet in real life, but I've seen you program the stuff for our mother.

Speaker 1

你能过来为我们工作吗?

Can you come over and work for us?

Speaker 1

对我来说,这简直太疯狂了。

To me is quite, quite crazy.

Speaker 0

说实话,情况比这稍微复杂一点。

To be honest, it was a little more complicated than that.

Speaker 0

我决定略过一些细节。

I decided to gloss over the details.

Speaker 0

他们飞我过去面谈,然后说:嗯,我们对这个很满意。

Flew me down to interview and then they were like, yeah, we're happy with that.

Speaker 0

但我回去完成了我的学位。

But I went back to finish my degree.

Speaker 0

但在完成学位期间,他们让我写了一个程序。

But while I was finishing my degree, they had me write a thing.

Speaker 0

我认为这发生在三十多年前。

And I think it, this is more than thirty years ago.

Speaker 0

所以我觉得这更像是一个延长的面试。

So I think it was sort of an extended interview.

Speaker 0

有点像是一次测试,某种程度上。

Like it was a test, kind of.

Speaker 0

但我不是很确定。

But I'm not positive.

Speaker 0

也许他们只是想让我写一下。

It might have just been that they wanted me to write it.

Speaker 0

我在那里做的工作是实现PostScript中称为描边路径的功能,描边就是当你有一条线,想把它画成一条宽线。

And so the job that I had there was implementing something that in PostScript is called stroke path, which is just stroke is when you have a line and you want to draw it as a wide line.

Speaker 1

好的。

Okay.

Speaker 0

而我们当时所用的实现方式是,将一小段线段转换为一个旋转的填充矩形,以表示路径的形状。

And the way that's implemented in our in the stuff that we had is that you turn like a little line segment into a filled rectangle that's rotated to represent the shape of the lawn.

Speaker 0

但你还需要处理曲线,要做很多这样的事情。

But then you have to go around curves and you have to do all this stuff.

Speaker 0

在PostScript中,你可以定义一条路径,比如一段弧线、一条直线等等,路径在末端会自动闭合,也可以显式闭合。

And one of the things that you could do in Postscript, so you could put in Postscript, you would describe a path and then, you know, so the path is just, you know, an arc and a line and whatever, and would be implicitly closed at the end or explicitly closed or whatever.

Speaker 0

但你可以描述一条路径,然后说“填充”,系统就会填充这条路径。

But you could describe a path and say fill, and they would fill in the path.

Speaker 0

或者你可以描述一条路径,然后说“描边”,它就会在路径周围画出轮廓。

Or you could describe the path and say stroke, and it would draw an outline around the thing.

Speaker 0

你可以在……中做一件奇怪的事情。

The weird thing you could do in, in.

Speaker 0

在PostScript中,你可以使用“描边路径”命令。

Postscript is you could say stroke path.

Speaker 0

它的作用是生成一条新的路径。

And what that did is it generated a new path.

Speaker 0

让我用更简单的说法解释一下。

So let me put it in simpler terms.

Speaker 0

还记得我说过,我们实现描边的方式是通过填充许多小形状吗?

Remember I said that the way we implement the stroke is by filling a bunch of little shapes.

Speaker 0

所以,描边路径的意思是生成所有这些小形状,但不要填充它们。

So stroke path said generate all those little shapes, but don't fill them.

Speaker 0

现在把这些小形状变成一条路径。

Just turn those into a path now.

Speaker 0

于是你先说描边路径,然后说填充,就能得到和直接描边完全相同的效果。

And so you say stroke path, and then you say fill, and you get the exact same thing as you would from getting stroke.

Speaker 0

这只是一个你可以做的操作。

It's just a thing you could do.

Speaker 0

但奇怪的是,你还可以先说描边路径,然后再说描边,这意味着生成所有那些小方框的轮廓,然后把它们作为轮廓画出来,以便调试。

But weirdly, could say stroke path and then stroke, which meant make all the little box outlines and then or your box shapes and then draw them as outlines so that I can debug.

Speaker 0

我可以观察你的随机打印机,弄清楚你是怎么做的。

I can look at your random printer and figure out how you do it.

Speaker 0

所以我们可以坐在那里,比如输入描边路径描边,来看看别人是怎么做的。

So we could sit there and like, say stroke path stroke and see how other people do it.

Speaker 0

所以总的来说,我写的这个描边功能其实就是他们旧系统的做法,它把东西给拆开了。

So anyway, the whole thing is that the stroke that I wrote was what their old system did is it broke the thing.

Speaker 0

当你有一个曲线时,你会用一系列小线段来近似这条曲线。

When you have a curve, you approximate the curve, it's a bunch of little lines.

Speaker 0

然后它会用每个小线段自己的小四边形来填充整个区域。

And it would approximate each of the little lines with its own little quad to fill the thing.

Speaker 0

但接着你必须处理它们之间出现的缝隙,得做些额外的工作。

But then you have to deal with, you'll get gaps between them, you have to do stuff.

Speaker 0

我不记得旧系统是怎么处理的了。

Don't remember what they did in the old one.

Speaker 0

而我新系统想要做的,是生成一个大的、连续的填充形状,而不是一堆小方块。

And the whole thing that I was trying to do in my new one is generate one big continuous filled shape, not lots of little boxes.

Speaker 0

所以去掉所有多余的中间线,只画出轮廓。

So leave out all the extra intervening lines and just draw the outlines.

Speaker 0

有些边缘情况会有点棘手,可能会有轻微的重叠之类的。

And there were some edge cases where it's a little tricky, it'll overlap a little bit or whatever.

Speaker 0

总之,重点是他们让我去做这件事。

Anyway, so the point was, they asked me to do that.

Speaker 0

我不记得为什么了。

I don't know, remember why.

Speaker 0

我确实做了。

I did do it.

Speaker 0

这样做的最终结果是,这条路径中的线段数量大大减少了。

The end result of what you get from that is that you have a lot fewer line segments in that path.

Speaker 0

因此,当你填充时,速度会更快,因为你不需要处理那些多余的线段。

And so the fill operates faster when you're, because you don't have all these extra line segments that are on s two.

Speaker 0

所以填充速度大概快了一倍左右。

So it's like twice as fast to fill or something like that.

Speaker 1

好的。

Okay.

Speaker 1

这一切都是用C语言实现的。

And this was this was all in C programming language.

Speaker 0

没错。

That's correct.

Speaker 0

这全是用C写的。

This is all in C.

Speaker 0

我当时确实在那家公司开始写C++了。

I did start doing some C plus plus at that company.

Speaker 0

但不管怎样,好吧。

But anyway, alright.

Speaker 0

所以在那次面试中,他们做了描边。

So as that interview, they did the stroke.

Speaker 0

然后我去得克萨斯,在那里工作了两年。

And then I went to Texas, and for two years, I worked there.

Speaker 0

我们当时在做,它的原理是,PostScript是一种第四代语言。

We were making So the way it works was, Postscript is a fourth like language.

Speaker 0

它是一种基于栈的语言。

It's a stack based language.

Speaker 0

所以我不确定你是否遇到过Fourth。

So I don't know if you've ever encountered fourth.

Speaker 0

这是一种语言,你给出一系列指令,这些指令是将东西压入栈、再压入一个东西,然后执行一个从栈中消费数据的操作。

It's a language where you give a sequence of instructions, and the instructions are push a thing on the stack, push a thing on the stack, and then an operation that consumes things from the stack.

Speaker 0

所以它不是说‘操作,然后给出参数’,而是‘参数,然后是对它们执行的操作’。

So rather than saying operation and here are the parameters for it, it's parameters and here's the operation on it.

Speaker 0

这是有人尝试过的一种东西。

It's a thing that somebody tried.

Speaker 0

Fourth在小型机器上非常成功,因为人们发现可以以非常简洁的方式编写代码。

Fourth was a big success for very small machines because it turned out there were ways to code it so they could make everything very concise.

Speaker 0

所以这家公司的天才们——有点讽刺的是,他们都是德克萨斯A&M大学的前研究生,也是公司的管理者——决定将Fourth作为PostScript解释器的编程语言。

So the geniuses at this company, slightly sarcastic, who were all grads, former grad students of Texas A and M, the guys who ran the company, had decided to use Fourth as their programming language for the postscript interpreter.

Speaker 0

所以,你知道,他们处理的是这种基于栈的PostScript,于是想到:嘿,我们已经有Fourth的栈了,这简直完美契合。

So, you know, they consume this postscript that's a stack based language, they figure out, Hey, we've got a stack in fourth, that'll just work really well.

Speaker 0

当然,这是个糟糕的主意,因为你有一个PostScript栈,而你其实希望这个PostScript栈与你的计算栈完全分开。

And of course, it's a terrible idea because you have your PostScript stack, and you'd really like your PostScript stack to just be separate from your computation stack.

Speaker 0

但事实上,它们全都混在一起了。

But instead, it's all intermingled.

Speaker 0

我认为,这是一个糟糕的主意。

It was, I think, a terrible idea.

Speaker 0

于是,他们赢得了这家公司。

And so, they had won this company.

Speaker 0

主要有两个人。

There were the two main guys.

Speaker 0

其中一个是专门负责第四语言的软件工程师。

One of them was this dedicated software engineer doing the fourth thing.

Speaker 0

他们自己打造了一个定制环境。

They made their own custom environment.

Speaker 0

是的,这部分就不多说了。

Yeah, won't talk about that part too much.

Speaker 0

这种语言被称为FIFT,当然了。

The language was called FIFT because of course.

Speaker 0

然后他们有一个底层高手,他用大约六万八千行汇编语言编写了图形库。

And then they had their low level wizard, and he wrote the graphics library in, I think, sixty eight thousand Assembly.

Speaker 0

然后,这第四种语言大概是在六万八千零四行代码时编写的。

And then that fourth language was written probably in sixty eight thousand and four.

Speaker 0

但同时,他还设计了一块自定义硬件,因为整个系统需要运行在极高的分辨率下。

But then, but also, he made a custom piece of hardware because the whole thing was we were running at these really high resolutions.

Speaker 0

而你实际上在传输的数据中并没有那么多细节。

And you don't actually have that much detail in the stuff you're pushing down.

Speaker 0

比如你主要只是在打印字符,对吧?

Like you're mostly printing characters, you know?

Speaker 0

所以在那种分辨率下,一个字符大约有50像素宽,或者类似的情况。

And so the character at that resolution is, you know, 50 pixels wide or something like that.

Speaker 0

你不需要一个每个像素都单独开关的位图。

You don't need a bitmap with every single pixel on and off.

Speaker 0

因此我们使用了行程长度压缩来存储这些连续的像素段。

So we used run length compression to store the runs.

Speaker 0

因此,图形库会生成行程长度。

And so the graphics library would generate run lengths.

Speaker 0

图形方面,如果你的输出显示设备的话,我想他可能限制在32,000或64,000。

The graph like, if your output display was well, think probably he had a limit of 32,000 or 64,000.

Speaker 0

所以如果你的图像是60K x 60K,你实际上需要存储60,000个行程长度来表示这张图像。

So if your image was 60 ks x 60 ks, you would actually have 60,000 spans of brun lengths to store that image.

Speaker 0

但随后,硬件会以非常高的速率接收这些行程段。

But then again, hardware that would, at a very high rate, take in the spans.

Speaker 0

因为这是用于胶印,也就是使用三种颜色点、点以不同模式排列的印刷方式。

So the thing is that this is for offset printing, which is the printing where they have three colors with dots, and the dots are in different patterns.

Speaker 0

这是一种已被大部分取代的旧技术。

This is old tech that has been supplanted most of mostly now.

Speaker 0

但你仍然能看到一些这样的应用。

But there are still, you still see some of this.

Speaker 0

它的原理就是绘制更大或更小的点。

So the way that works is just that you draw a larger or smaller dot.

Speaker 0

点的间距是固定的,你根据所需的墨量和颜色的亮度来调整点的大小。

Like the dot spacing is fixed and you make the dots larger or smaller depending on how much ink, how bright you want that colour to be.

Speaker 0

因此,硬件中有一个圆形表格,当输入一个色块和对应的深浅度时,它会查表并根据点的形状决定是否实际绘制。

And so, the hardware had a table of a circle and like, it got fed a span and a darkness for that colour, and looked up in that table and decided whether it actually needed to draw it based on the dot shape.

Speaker 0

所以整个过程需要处理两组运行长度流。

So the whole thing was it took two streams of runs.

Speaker 0

一组是图形数据,另一组是字符数据,因为这样可以避免图形库去合并它们,从而节省大量工作。

One stream was graphics and one stream was characters because it saved a lot of work for the graphics library to not have to merge those.

Speaker 0

如果图形库需要处理图形和字符重叠的情况,并试图管理这些色块,那将会非常繁琐。

So if the graphics library had to, when you had overlapping graphics and characters, the graphics library trying to manage these spans, it just would have been a lot of work.

Speaker 0

他们觉得,不如就让它们保持分离。

They were like, let's just have them be separate.

Speaker 0

当你输入混合的图形和文本色块时,硬件会合并这些列表,因为它们是已排序的,合并起来很简单,甚至轻而易举,然后按其思路执行处理。

So you'll come in with these mix of graphics and text spans, and the hardware would merge those lists because they're sorted, so it's straightforward to merge, trivial to merge, and then go through his thought process to do the thing.

Speaker 0

好的。

Okay.

Speaker 0

所以,硬件高手。

So, hardware wizard.

Speaker 0

Pockets的那个人说过,他讨厌软件。

One of the things in Pockets' guy, he was like, Oh, I hate software.

Speaker 0

对于硬件,我只需要把它连到逻辑分析仪或示波器上,就能清楚地看到它在做什么。

With hardware, I can just hook it up to a logic analyzer or an oscilloscope, and I can see exactly what it's doing.

Speaker 0

而软件,我从来都不知道它在干什么。

And software, I never have any idea.

Speaker 0

他是个年轻人。

He was a young guy.

Speaker 0

他大概28岁左右,不是那种老资历的人。

He was like 28 or whatever, not like an old promotion.

Speaker 0

而我们这些搞软件的,都觉得他完全疯了。

Whereas we, as software guys, were like, you're totally nuts.

Speaker 0

硬件嘛,如果你电压搞错了,它就会直接坏掉。

Hardware, it's like, oh, if you get the voltage wrong, it just breaks.

Speaker 0

而软件是纯粹的,全是数字的,总是能正常工作。

Whereas software is pure, it's all digital, it always works.

Speaker 0

所以和那个家伙一起,波尔特尔的这段经历还挺有趣的。

So it was a fun clutch of Poulter's a little bit with that guy.

Speaker 0

但他非常聪明,而且是个优秀的程序员,因为我说过,他写了图形界面的第一个版本。

But he was super brilliant and he was a good coder because like I said, he wrote the graphics, the first version of the graphics.

Speaker 0

所以我们进来的时候,他们需要更多人手,因为他们开始接手其他项目,而且需要放弃68000架构,因为他们实际上正在生产68000插件板,也就是能插入ISA插槽(或当时x86 CPU的相应插槽)的卡片,以便运行他们的68000代码,因为当时他们只有这一种选择。

So we came in, they needed more people because they were starting to get these other projects and they needed to get off the 68,000 because they actually were shipping 68,000 plug in boards, plug in cards that plugged into the ISA slots or whatever the slots were then of x86 CPU so that they could run their 68,000 code because that was all they had.

Speaker 0

所以,我到那里时,他们正在做的第一个项目是……

So, the first job that they were working on when I got there.

Speaker 0

然后他们招了几个年轻员工,比如我、约翰和约翰。

So then they got these younger guys, us, me, John, and John.

Speaker 0

我们做的第一件事之一就是用MIPS语言编写了一个图形加速器。

And we were one of the first things we did was write a graphic slayer in MIPS.

Speaker 0

然后我们做的另一件事是把第四字节码编译成某种机器码。

And then the other thing we did was take the fourth byte code and compile it to see or something.

Speaker 0

天啊,我都记不清了。

God, I don't even remember.

Speaker 0

但当时有一个移植步骤,让我们能在68,000之外的平台上运行第四版Postscript解释器。

But there was some population step so that we could run the fourth Postscript interpreter on something other than the 68,000.

Speaker 0

所以那是一个编译器相关的项目,我真记不太清了。

So it was some compiler thing that I don't really remember.

Speaker 0

不管怎样,我待在那家公司期间,它一直财务困难。

Anyway, the company was financially struggling the whole time that I was there.

Speaker 0

就是从来没能卖出足够多的产品来抵消它的开销。

Just wasn't quite ever selling enough to make up for the costs it had.

Speaker 0

我知道我想去哪,但我在想是不是还有一件事我先想做。

And I know where I wanted to go, but I'm trying to think if there was some other step I wanted first.

Speaker 0

财务困难。

Financially struggling.

Speaker 0

说他们财务困难有什么意义呢?

What was the point of saying they were financially struggling?

展开剩余字幕(还有 480 条)
Speaker 0

哦,所以最终发生的是,PostScript 是 Adobe 创建的。

Oh, so what ended up happening was, Postscript Adobe Adobe is the creators of Postscript.

Speaker 0

Adobe 推出了一个名为 PostScript Level 2 的新版本,增加了很多新功能,图形子系统也不同了,我们显然需要迁移到它,但我们当时正忙于完成各种合同,因为我们正在尝试移植到 MIPS,接着又疯狂地尝试移植到 NEXT 设备,用于一个极其疯狂的激光打印项目。

So Adobe had come out with a new version of Postscript called Postscript Level two that added a whole bunch of new stuff, and the graphics subsystem was different, And we obviously needed to move on to it, but we were very busy just trying to satisfy the contracts that we had for these various things, because we were trying to port to the MIPS, and then we were trying to port to NEXT boxes for a crazy, crazy laser thing.

Speaker 0

我们实际上还做过一些 Objective-C,因为我觉得 NEXT 系统才是 Objective-C 的发源地,而不是 Mac,我想是这样的。

Like we did some Objective C actually, because I think that's what the NEXT actually, I think that's where Objective C started was on the Next, not on the Mac, I think.

Speaker 0

但 NEXT 是史蒂夫·乔布斯离开苹果后创立的公司,如果我没记错的话。总之,回到正题,其他人继续做那些事,而把我安排到了 Level 2 项目上。

But it was Next with the company that Steve Jobs had started, if I remember correctly, while he was kicked out of Apple Anyway, back in the so what happened was everybody else kept doing that, and they put me onto the level two project.

Speaker 0

所以我是 Level 2 项目上唯一的人。

So I was the only person on the level two project.

Speaker 0

我得编写 PostScript 解释器,我想我还写了图形后端。

I had to write PostScript interpreter, And I think I wrote the graphics back end.

Speaker 0

我的意思是,没来得及完成,因为公司就倒闭了。

I mean, didn't finish it because we went under.

Speaker 0

但我当时确实在做这个项目,而且我是唯一一个在做的人,全部用 C++ 编写的,我正在开发一个 PostScript 解释器,还有我认为的图形引擎,它可能仍然是基于光栅的。

But I was working on it, and I was the only person working on it, and it was all in C plus plus So I was writing a Postscript interpreter, and I believe the graphics engine for it, which still probably was spam based.

Speaker 0

我现在不记得细节了。

I don't remember the details now.

Speaker 0

好的。

Okay.

Speaker 0

When

Speaker 1

你回顾这份工作时,你喜欢它吗?

you look back on this job, did you like it?

Speaker 0

天啊,我刚想起来另一件我做过的事。

Oh gosh, I just remembered to tell the other thing different thing I worked on.

Speaker 0

但我还是得跟你说说这个故事,就因为这个。

But I got to tell you this story just because.

Speaker 1

好的。

Okay.

Speaker 1

好的。

Okay.

Speaker 0

我想其中一个原因是他们想要钱,所以会接受任何合同。

One of the I think probably just because they wanted money so they would accept random contracts.

Speaker 0

所以我们接到的一个随机合同是为某人设计的处理器编写一个模拟器。

So a random contract we got was a process I ended writing a simulator for a processor that somebody was designing.

Speaker 0

我想那会儿Java字节码还挺流行的。

I think this was an era where Java bytecode was a thing.

Speaker 0

所以我觉得这个芯片最终被重新用于尝试运行Java。

And so I think that the chip ended up getting repurposed to try to run Java.

Speaker 0

但当时我做这个项目时,它有点像是第四代架构之类的。

But at the time I was working on it, it was sort of fourth directed or something.

Speaker 0

总之,这是一个疯狂的处理器,每次会读取四个字节,而这四个字节就相当于四条指令。

Anyway, it was this crazy processor that would consume four bytes at a time, and then the four bytes would be like fourth like instructions.

Speaker 0

我记得我说过第四代很紧凑吗?

Remember I said fourth was compact?

Speaker 0

所以你可以用一个字节的指令完成有意义的工作,而那个时代的大多数微处理器,一条指令之后还需要从指令流中再读取一到两个字节,来指定操作的寄存器或其他信息。

So you could have one byte instructions do meaningful work in a way that most microprocessors of that era, you would have an instruction, then it would read another byte or two out of the instruction stream to tell it which registers to operate on, or some other information.

Speaker 0

就像X86现在还是那样。

Like the X86 is still like that.

Speaker 0

有些指令只需要一个字节,因为它们不需要额外信息。

And there are some instructions that only take one byte because they don't need any extra information.

Speaker 0

但是,这种语言被设计成基于Forth的,因为这样所有东西都在栈上,你就不需要指定寄存器了。

But, so this was a language that was designed to be flirt based because that way, since everything's already on the stack, you don't have to specify registers.

Speaker 0

所以,再次因为内存速度之类的权衡,这是某个家伙试图设计出一个能快速运行Forth之类东西的疯狂架构。

So it was, again, because of the trade offs of memory speed and stuff like that, this was some guy who was trying to get a crazy design that could run forth stuff fast or whatever.

Speaker 0

所以不知为何,最终我成了负责为这个写模拟器的人。

So for some reason, I ended up being the person writing a simulator for this.

Speaker 0

这是一种非常奇怪的语言,每次处理四个字节——可能它有一条32位总线,我不确定——然后分别执行每个字节,如果其中一个需要数据,就会在接下来的四个字节中获取。

It was a very weird language, so it was large four bytes at a time maybe it had a 32 bit bus, I don't know and then execute each of those bytes separately, and then if one of them did need some data, it would be in the next four bytes.

Speaker 0

疯狂,疯狂的设计。

Crazy, crazy design.

Speaker 0

就像我说的,我认为它确实最终投入使用了。

Like I said, I think it did actually go on.

Speaker 0

你可以去谷歌搜索一下。

You can Google for it.

Speaker 0

它叫Shboom处理器,s-h-b-o-o-m。

It was called the Shboom processor, s h b o o m.

Speaker 0

我觉得它后来确实被用于某种Java应用。

I think it did go on and get used for Java something.

Speaker 0

但不管怎样,我做过很多奇怪的事情,比如为一个古怪的处理器写过模拟器。

But anyway, so that was just, yes, it's another crazy weird thing that I did is I wrote a simulator for a weird processor.

Speaker 0

我只是做过很多奇怪的事情。

Like I just have done a lot of strange things.

Speaker 0

这看起来像是可以随意删掉的内容。

This seems Feel like free cut any a free to of these out.

Speaker 0

如果你删掉这些,我也不会介意。

I will not feel bothered if you cut

Speaker 1

随便删掉任何一个都没关系。

any of these out.

Speaker 1

不,我觉得这些都很棒,因为首先,如果你第一份工作就能做这么多随机但技术性很强的事情,你会学到很多东西。

No, I think these these are great because first of all, this seems to me like first, if you can get your first job to do so much random but technical stuff, you learn so much.

Speaker 0

然后你就准备好了。

And then you're ready

Speaker 1

去干吧。

to go.

Speaker 1

对我来说,我们当前的很多困境在于找不到一个能做真正有趣、底层工作的场所,这非常困难。

To me, like a lot of our current struggle is to find a place of work where you actually do stuff that is like interesting, low level, you know, it's very difficult.

Speaker 1

而你却说,在大学毕业后的两年里,你做了这么多疯狂的事情。

And here you're saying this, like, in the span of two years, you've done so many crazy stuff right after university.

Speaker 1

是的。

Yeah.

Speaker 1

没错。

It was Yeah.

Speaker 1

非常吓人。

Very scary.

Speaker 0

问题是,这有趣吗?或者其他什么?

Question was, was it fun or whatever?

Speaker 0

是的。

Yeah.

Speaker 0

答案绝对是有趣的。

And the answer is absolutely it was fun.

Speaker 0

你知道,我学到了很多东西,也犯了一些错误。

You know, and I did learn a lot of things, and I made some mistakes.

Speaker 0

我犯了一些很糟糕的错误,但我也做了一些不错的工作。

I made some really bad mistakes, but I also did some good work.

Speaker 0

当我。

The when I.

Speaker 0

基本上我第一天上班时,他们遇到了问题,因为一切都有点乱,他们的整个设计并不完全完善。

Basically the first day I started, they were having a problem because everything was a little janky, like their whole design wasn't a 100%.

Speaker 0

所以结果是,还记得我之前说他们可以合并图形和文本流吗?也就是说,当你绘制时,如果你先放图形,通常的情况是你先画一个框,然后在上面加文字,类似这样。

So it turns out, remember I said that they could merge graphics and text streams, you know, so they could, so when you drew, if you put down graphics, because normally what would happen is you draw a box and then you put text over it, something like that.

Speaker 0

因此,如果文本跨度不需要担心其背后的框体颜色,整体就会清晰得多。

And so it was just way cleaner if the text spans just didn't have to worry about what color the box was behind it.

Speaker 0

通常框体只会是一种颜色,所以无关紧要,但你也可以使用渐变色。

Usually the box would just be one color and it wouldn't matter, but you could have out the gradient.

Speaker 0

你也可以使用图像,比如画一个形状。

You could have an image like you could have drawn a shape.

Speaker 0

所以这是可能的。

So it's possible.

Speaker 0

所以这样很好。

So it was nice.

Speaker 0

但系统并没有像Z缓冲那样的机制。

But the system didn't have like a Z buffer.

Speaker 0

因此它只能将文本显示在图形前面。

So all it could do was text in front of graphics.

Speaker 0

硬件输出系统。

The hardware, hardware output system.

Speaker 0

它只知道有两个图层可以交错、合并,并且会将一个图层叠加在另一个之上。

All it understood was there were two layers that it could interleave, that it could merge and it would merge one on top of the other.

Speaker 0

它只能做到这些,因为这是一套非常简单的硬件。

That was all it could be because it was a very simple piece of hardware.

Speaker 0

所以后来他们又回来了。

So what happened is they got back.

Speaker 0

我不知道他们为什么没解决这个问题,但为他们制作软件的那家客户——无论是做奇怪的胶片记录仪还是别的什么——回来反映说:‘我的客户遇到了这个问题。’

I don't know why they hadn't addressed this, but they, you know, the person who they were making the software for their weird film recorder or whatever it was, came back and said, Oh, my customer has this problem.

Speaker 0

这东西打印不出来正确的结果。

This thing doesn't print correctly.

Speaker 0

答案是:他们先放了文字,然后用图形完全覆盖了它。

And the answer is, Oh, they put down some text and then totally covered it with graphics.

Speaker 0

因为他们不需要它,或者别的什么原因。

And because they didn't need it or whatever.

Speaker 0

但他们没有删除文字,只是用图形覆盖了上去。

But rather than deleting the text, they had just covered it over.

Speaker 0

软件只是继续在上面绘制了文本。

And the software just went ahead and drew the text on top of the thing.

Speaker 0

我不明白他们怎么会以这种粗糙的方式发布产品。

How they had shipped this with that kind of jankiness, I don't understand.

Speaker 0

但他们说,好吧,显然我们需要做的是,当我们绘制图形时,必须检查是否覆盖了文本。

But they were like, Okay, clearly what we need to do is, when we draw graphics, we need to go through and find out if it's covering over text.

Speaker 0

如果确实覆盖了,我们就必须把文本转换成图形。

If it is, we have to turn the text into graphics.

Speaker 0

这完全是可解决的。

Which is totally tractable.

Speaker 0

他们只需要合并文本图层即可。

Like they could just merge the text layer.

Speaker 0

他们不需要知道何时必须这样做,也不需要频繁地执行。

They didn't need to know if they needed to do it and do it as rarely as possible.

Speaker 0

所以他们认为,归根结底,这是一个矩形相交的问题。

So they were like, well, what it boils down to is that we have a rectangle intersection problem.

Speaker 0

我们希望在任何时候,只要图形矩形或文本矩形发生重叠,都能检测到——不过人们通常不会这么做,你可以理解,如果你在制作宣传册之类的东西时,通常不会把文本叠在文本上面。

We want to know anytime a graphics rectangle or even a text rectangle, but people didn't normally like, you can understand that if you're making a brochure or anything, you wouldn't normally ever put text over text.

Speaker 0

这在视觉上根本不好看。

Like it's just not visually appealing.

Speaker 0

所以他们才能侥幸过关。

So that's why they kind of got away with it.

Speaker 0

但是,埃里克,我们需要实现一个功能:每当我们插入图形时,都要找出所有被覆盖的文本,并将这些文本转换为图形,这样在软件层面才能正确处理图层关系。

But, Eric, we need to do a thing where anytime we put graphics in, we find any text that overlaps and turn that text back into graphics so that we can do that in the software side and the layering works correctly.

Speaker 0

正如我所说,他们本来是可以做到的。

And like I said, they could do that.

Speaker 0

他们有现成的代码来做这件事,但他们只想……唉,我好像又在重复了。

They had the code to do that, but they wanted to, yeah, I'm just repeating myself.

Speaker 0

他们只希望在必要时才这么做。

They wanted to do that only if it was necessary.

Speaker 0

因此,他们需要高效地检测出这些重叠情况。

And so they needed to efficiently find that.

Speaker 0

他们实际上需要高效地找到重叠的矩形。

And they effectively needed to efficiently find overlapping rectangles.

Speaker 0

我上过空间数据结构课,那门课中我们做过一件事:找出相交的矩形。

And I had taken the spatial data structures class, and one of the things we had done in that spatial data structures class is find intersecting rectangles.

Speaker 0

当时有一个标准算法,就是平面扫描法,时间复杂度是 n log n。

Like there was a standard algorithm for it, plain sweep, it's order n log n.

Speaker 0

他们提到这个问题时,我就说:哦,这个问题有解。

And I was like, you know, and they said this, and I said, Oh, there's a solution to that.

Speaker 0

它的复杂度是 n log n,我们直接实现就行了。

It's order n log n, we can just implement it.

Speaker 0

幸好我上了大学的这些课,因为就在我去那里的第二天,甚至更早,就用上了。

And, you know, so it was a good thing that I took the college classes because I did like literally the second day I was there or whatever, that.

Speaker 1

而重叠矩形对所有碰撞检测和二维内容都会非常有用。

And then overlapping rectangles will be super useful for all the collisions and two d stuff.

Speaker 0

是的,当然,我后来再也没用过这个方法,但思路是一样的。

Yeah, although of course I never actually had any use for that myself ever again, but it was that same idea.

Speaker 0

这通常被称为宽相碰撞检测。

Broad phase collision detection is what it's normally called.

Speaker 1

是的。

Yeah.

Speaker 1

现在,在我们转向看玻璃之前,打印机这边还有什么遗留问题吗?

Now, is there anything left on the printer side of things before we move on to looking glass?

Speaker 0

有的,但我记不起是什么了。

There is, but I can't remember what it was.

Speaker 0

哦,为了做个铺垫,我想我们再也不会谈论约翰·普赖斯和约翰·戴维斯了,所以我想在这里把他们的故事做个收尾。

Oh, so just to set up, I guess we're never going to talk about John Price and John Davis again, so I want to wrap up their story here.

Speaker 0

因为你实际上把这个作为话题提出来了,就是我们三个人在业余时间都在做什么?

Because you actually had this as a topic, which was the fact that the three of us in our spare time, what were we doing?

Speaker 0

而不是我们为公司做的工作。

Instead of what we were doing for the company.

Speaker 0

所以,我们在业余时间做了两件事。

So, there were two things we did in our spare time.

Speaker 0

我们做的一件事是玩了很多PC游戏。

One thing that we did is we played a bunch of PC games.

Speaker 0

还记得我提过,上大学时我就不再玩PC游戏了吗?

So, remember I said I had gotten out of playing PC games in college.

Speaker 0

比如我玩过Rogue,那是一款纯粹的文本显示的古老游戏。

Like I had played Rogue, like which is like a literally an old Rogue, which is a text display.

Speaker 0

在我工作的那两年里,我们玩了很多游戏。

And so in those two years that I was at that company, we played.

Speaker 0

我肯定还玩过其他一些游戏,但我记得的那些,所谓‘我们玩’,是指我们一起花钱买,因为我们很穷。

I'm sure we played a few other things, the things I remember playing, and what I mean by we played, is we paid for them together because we were poor.

Speaker 0

这是我大学毕业后的第一份工作。

It was my first job out of college.

Speaker 0

那是一家经营困难的公司,薪水不高。

And it was a struggling company, so they didn't pay a lot.

Speaker 0

所以我们经常一起凑钱买游戏。

So we often we bought them together.

Speaker 0

我们在工作时用最快的工作电脑玩这些游戏。

We played them at work on the fastest work computer.

Speaker 0

我玩了《翼骑兵2》。

So I played Wing Commander two.

Speaker 0

我玩了《创世纪七》。

I played Ultima seven.

Speaker 0

我还玩了《地下世界》(由Looking Glass开发的游戏)。

And I played Ultima Underworld, which was Looking Glasses game.

Speaker 0

《地下世界》我也玩了,我觉得。

And and Ultima Underworld too, I think.

Speaker 0

那时候,突然发现所有这些游戏都是Origin开发的。

And, you know, that was suddenly like and all of those games were by origin.

Speaker 0

但由Origin发行。

But published by origin.

Speaker 0

它们要么是Origin开发的,要么是Looking Glass开发的。

And they were by origin or they were by Looking Glass.

Speaker 0

但那只是一个巧合。

But that was a kind of a coincidence.

Speaker 0

就像那些只是我们感兴趣的游戏中的一部分。

Like that was just the games we were interested in.

Speaker 0

哦,还有X翼和TIE战斗机,当时出的是哪一款就玩哪一款。

Oh, and also X Wing and Tie Fighter, whichever one was out at that time.

Speaker 0

所以那是唯一一款非Origin公司的游戏。

So that was the only non origin game.

Speaker 0

是的,我不记得我玩过任何冒险游戏之类的。

Yeah, I don't think I played any adventure games or anything.

Speaker 0

所以那是我们做的一件事。

So that was one thing that we did.

Speaker 0

这让我重新接触到了那个时代的现代电子游戏。

And that got me back exposed to modern of the era video games.

Speaker 0

但另一件事是我们实际上就像听说过的艺术学校那样,一群艺术家组成了一个小社群,同时都在创作,并且彼此间相互影响。

But then the other thing that we did is we were effectively, it's a lot like what you hear about like a school of art where a bunch of artists have formed a little community and are all kind of doing work at the same time and somehow influencing each other.

Speaker 0

所以我们当时在尝试编写代码来实现三维图形,主要是三维图形。

So like we were trying to make write code to do three d graphics, mostly three d graphics.

Speaker 0

我们之间还互相竞争,看谁能每秒渲染出更多的多边形。

And we were kind of competing with each other, like, who can make the most polygons per second kind of thing.

Speaker 0

我们深受迈克尔·阿布拉什的影响。

And we were very influenced by Michael Abrash.

Speaker 0

我不知道你有没有听说过他。

I don't know if you've heard of him.

Speaker 0

他相当厉害。

He's pretty Of

Speaker 1

当然。

course.

Speaker 0

好吧。

Okay.

Speaker 0

不知道他现在是不是还出名。

Don't know if he's still famous now.

Speaker 0

就是这样。

That's the thing.

Speaker 0

但他曾在一本叫《Dobbs》的杂志上写过一系列专栏。

But he had done a bunch of columns in a magazine called Doctor.

Speaker 0

关于Mode X和三维图形。

Dobbs about Mode X and about three d graphics.

Speaker 0

我们曾使用过那些杂志,因为工作场所不知为何有这些杂志,本来我们打算自己买的。

We had used some of those magazines because they had them at work for some reason, because we were going to buy them ourselves.

Speaker 0

但我们看了那些文章,借鉴了其中的想法,并进行了改进,彼此之间也一定程度上展开了竞争,这在某种程度上放大了效果。

But we looked at those and used the ideas from them and came up with improvements and competed with each other to some extent, which kind of amplified things.

Speaker 0

我们还做了一些文字冒险类的东西。

We also worked on some text adventure stuff.

Speaker 0

我们曾想过,能不能做一款,因为我们之前提到过那个LP mug。

We thought about, could we make, because we ran this other LP mug that we were talking about.

Speaker 0

所以我们想,能不能做一个商业化的文字冒险Mug程序?

So we were like, could we make a commercial text adventure mug thing?

Speaker 0

而且有一些,是的,所以我们当时摆弄了一下。

And there were some, but yeah, and so we kind of toyed with it.

Speaker 0

我开始为它开发一个系统,就像一个完整的解释型语言,带有编译器和解释器等等。

And I started developing a system for it, like a whole interpreted language with a compiler and an interpreter and all that stuff.

Speaker 0

但我们最终没有继续推进这个想法。

But we didn't end up pursuing that.

Speaker 0

不过我们确实做了这些图形方面的东西。

But we did do these graphics things.

Speaker 0

与此同时,我不得不上网查一下,我为什么没想到要做这项研究。

And then, at the same time as all of that, I'd have to look up online what it was I didn't think to do this research.

Speaker 0

顺便说一句,我确实做了大量研究,比如翻出我以前写的那些老演示程序。

I did do a bunch of research, by the way, like digging up these old deans that are old demos that I wrote.

Speaker 0

但在那两年期间,我们请来作为LP MUD的‘叔叔’的那个人——最受欢迎的叔叔,弗雷德。

But sometime during that two years, the guy who had we had brought in as a as our uncle, on the LP MUD, the favorite uncle, Fred.

Speaker 0

弗雷德的真名是蒂姆·凯恩。

Fred's actual name was Tim Cain.

Speaker 0

蒂姆·凯恩现在因为在他的YouTube频道而广为人知,但他后来制作了《辐射》。

Tim Cain Oh, is well known in the community right now because of his YouTube channel, but he went on to make Fallout.

Speaker 0

但当时,他接下来做的是一款名为《Barbs Tale Construction Set》的游戏。

But at the time, what he went on to do was make a game called Barbs Tale Construction Set.

Speaker 0

这就是他进入游戏行业的途径。

That was how he entered the game industry.

Speaker 0

我们知道他做过这个游戏。

And we knew he had done that.

Speaker 0

我们当时就想,哦,原来你真的可以进入游戏行业。

And we were like, Oh, you can just get into the game industry.

Speaker 0

虽然这款游戏本身并不特别重要,但他制作了这款游戏这一事实,似乎让我们所有人都意识到:哦,这是一条正经的路。

Although that game is not particularly important, fact that he made it, something kind of opened, I think, all of our eyes to the fact that, Oh, this was a legitimate path.

Speaker 0

所以,我想用这个来总结关于他们的故事:约翰·戴维斯进了公司,工作了一段时间,然后在公司关闭前不久离开了。

And so that's how I wanted to wrap up talking about them is that John Davis went in, worked, then when the company shut down, they left a little before the company shut down.

Speaker 0

而我坚持到了最后。

I stuck all the way to the end.

Speaker 0

但最终,约翰·戴维斯继续前行。

But eventually, John Davis went on.

Speaker 0

他参与了任天堂64平台上的《飞行员之翼》开发,之后去了《使命召唤》的公司。

He worked on Pilot Wings on the Nintendo 64, and then he went to the Call of Duty company.

Speaker 1

哦,现在啊。

Well, now.

Speaker 1

是的。

Yeah.

Speaker 0

是这样的,我记不清那个具体的公司名字了。

It's I I can't remember the the the the specific company.

Speaker 0

名字一时想不起来了。

The name is escaping me.

Speaker 0

他们后来转去制作了Infinity Ward。

They then switched to making Infinity Ward.

Speaker 1

Infinity Ward,对。

Infinity Ward, yeah.

Speaker 0

所以他最终去了Infinity Ward。

So he eventually went to Infinity Ward.

Speaker 0

然后是John Price,那个和我一起做三维图形的家伙,我觉得John Davis其实并没有真正做三维工作,但他身处那个团队,感觉自己也是其中一员。

And then John Price, the other guy who was doing the three d graphics with me, I think John Davis didn't really actually do the three d, but he was in the group and he felt like he was part of that stuff.

Speaker 0

但John Price后来去做了《星际迷航》游戏。

But John Dave John Price went on to he did a Star Trek game.

Speaker 0

他做了好几款游戏。

He did a couple of things.

Speaker 0

我现在记不清了,我们可以去Moby Games上查一下。

I don't remember now what we could look it up on Moby Games.

Speaker 0

重点是,我觉得这很像那些艺术学校,因为我们所有人都彼此影响,我们还以Tim Kaine为例,你知道,我们当时根本不知道他将来会成为Tim Kaine。

The point was that I think it was a lot like one of those art schools in that because all of us were there feeding into each other, and we got that example of Tim Kaine, which, you know, we didn't know he was going to become Tim Kaine.

Speaker 0

他那时还没做《辐射》。

He hadn't done Fallout yet.

Speaker 0

对吧?

Right?

Speaker 0

我们只是喜欢他在LP MUD关卡设计中的作品,觉得他对玩家支持的态度很好,非常以玩家为中心。

Like, we were just we had liked the work he had done at in the level designs he had done for the LP MUD and and thought he had a good attitude towards player supporting like being a player positive.

Speaker 0

我老是提到这一点,但没好好解释我指的是什么,简单说就是别对玩家耍横。

I keep mentioning that, and I'm not really explaining what I mean by that, but it's just, you know, not being a dick to your players, basically.

Speaker 0

所以,这几种因素的结合,让我们三个人完全独立地进入了游戏行业。

So, that combination of things, somehow all three of us went into the game industry totally independently.

Speaker 0

我们之间没有互相介绍或动用任何人脉。

We didn't use contacts from each other or anything.

Speaker 0

我们甚至都不知道其他人也在进入游戏行业,但最终我们都进了。

All independently and didn't even say no the others were going into the game industry, but we did all go in eventually.

Speaker 0

我想我其实是第一个进去的,不过好吧,这么说也合理,我想就此打住。

I think I went first actually, but Okay, so yeah, that's fair and I wanted to wrap up about that.

Speaker 1

好的,所以在我们深入讨论Looking Glass之前,我得提一下:你之前说你玩过文字冒险游戏,然后转到了《创世纪》,但你没玩过西里尔的图形冒险游戏,对吧?

Okay, so before we dive into Looking Glass, I need to mention You were talking that you were playing text adventure, adventures, and then you went into Ultima, but you didn't play the graphical adventures, the Sierra I

Speaker 0

我后来玩了《国王密使》,但那会儿我确实错过了那个时代的图形游戏,所以在1992到1994年那段时期,我根本没去关注那些,我们只玩更偏向模拟类的游戏。

did King's later, but I yeah, that wasn't that was the thing, I just missed out on the graphics during that era, and so then when I was in that period, '92 to '94, I didn't even look at those, we just played the more simulation games.

Speaker 1

好的。

Okay.

Speaker 1

好的。

Okay.

Speaker 1

我需要强调一下你引入弗雷德这个角色的叙事精彩之处。

I and I need to highlight the storytelling marvel you've done with like introducing Fred.

Speaker 1

弗雷德是这个角色。

Fred is the character.

Speaker 1

弗雷德。

Fred.

Speaker 1

弗雷德就这样出现了,然后就不再出现在故事里了。

And Fred showed up like that and then he stopped showing up in the story.

Speaker 1

顺便说一下,弗雷德就是后来参与后续工作的蒂姆·凯恩。

And by the way, Fred was Tim Kain who worked at the follow-up.

Speaker 1

这太棒了,我根本没想到我会

This was super cool, didn't expect I

Speaker 0

我本来是计划好的。

did plan it.

Speaker 0

或者说我没计划,也没写脚本,但我确实列了个想提到的事项清单,嗯,就是这样。

Or if I didn't, I don't have a script but I did write down a list of things I wanted to mention and like yeah.

Speaker 0

所以,嗯,那也没多少内容。

So yeah, that wasn't a lot.

Speaker 1

好的。

Alright.

Speaker 1

那么,Looking Glass工作室。

So, Looking Glass Studios.

Speaker 1

你又是从德克萨斯搬过来的,对吧?

Moving again from Texas, right?

Speaker 0

公司要关闭了,我想,好吧,看看我能不能进入游戏行业。

The company was shutting down, and I was like, Okay, let me see if I can get into the game industry.

Speaker 0

哦,我漏掉了整个这件事。

Oh, here's the whole thing I left out.

Speaker 0

这并不重要。

It's not very important.

Speaker 0

我上了一所私立高中,那所学校很小,每个人都要上大学。

I went to a private high school and everybody, it was a very small school, very small school, and everyone was bound for college.

Speaker 0

那里的人都很聪明,非常有智慧。

It was a very intellectual guy, like everybody was relatively smart.

Speaker 0

但我不知道为什么,他们公开公布了我们的SAT成绩,也就是大学申请时的分数。

And I don't know why, but for some reason, they publicly posted our SAT scores, which are the scores you get for college applications.

Speaker 0

他们只是衡量你的能力。

They just rank your ability.

Speaker 0

SAT分为语文和数学两部分。

There's a verbal and a math.

Speaker 0

我在高中时以数学见长,是个典型的理科生。

And was known as a math in high school, was known as a math person, a science kind of person.

Speaker 0

所以大家都觉得我数学会考得很好,但语文会考得不好。

And so everybody expected me to do well on math and not do well on verbal.

Speaker 0

不知为何,它们被公开张贴出来了。

And for some reason, they just got publicly posted.

Speaker 0

因此,我的同龄人、其他学生以及我的老师们,大多数老师都对我的语言和数学分数相同感到非常惊讶。

And so both my peers, the other students and my teachers, most of my teachers were pretty surprised to see that I had equal scores on verbal and math.

Speaker 0

事实上,分数完全一样,尽管通常数学分数平均高于语言分数。

And in fact, literally equal, even though the average is normally math was higher than verbal.

Speaker 0

所以,不幸的是,我的语言分数高于数学分数。

So I was, unfortunately, was higher than math.

Speaker 0

总之,这一切的重点是,我在数学和编程之外确实有其他兴趣。

Anyway, so the point of all that is that I did have interests outside of programming in math.

Speaker 0

我只是觉得,我编程太厉害了,这根本说不通。

I just like, I'm so good at programming that it just didn't make sense.

Speaker 0

所以这就是我尝试哲学的原因,你知道的。

And so that's like why I tried philosophy, you know.

Speaker 0

但在大学期间,我参与了Usenet和几个论坛。

But so, during college, I participated in Usenet, a couple of forums.

Speaker 0

我想我稍微关注了一下,哦,当然我们玩过《毁灭战士》。

I guess I played a little attention to, Oh, course we played Doom.

Speaker 0

当我谈到我们玩什么游戏时,是的,当然我们玩《毁灭战士》。

Like, When I was talking about what games we play, yes, of course we play Doom.

Speaker 0

我稍微看了一些新闻脚本,也看了一些《事实冒险》的新闻脚本。

I look at those news scripts a little, and I looked at the Facts Adventure news scripts a little.

Speaker 0

但我认为我主要参与的新闻组是一个叫‘Talk’的组。

But I think the main news group I was on was a group called Talk.

Speaker 0

Bazaar,那基本上就是一个用于奇怪写作的平台。

Bazaar, which basically was just a form for weird writing.

Speaker 0

人们会想出各种奇怪的方式来写作,甚至不是标准的叙事故事。

People would just think of weird ways to write things that weren't SAE stories even.

Speaker 0

它们就是,你知道的,一些奇怪的写作。

They were just, you know, it's weird writing.

Speaker 0

所以我在那个领域里待了一段时间。

And so I kind of worked in that space for a while.

Speaker 0

所以我当时只是做了一点点奇怪的写作。

So I was doing a very small amount of weird writing.

Speaker 0

所以,我一直对写作之类的事情有些兴趣。

And so, I've always had some interest in writing or whatever.

Speaker 0

我只是特别擅长编程,所以根本没必要去追求它。

I'm just really good at programming, so it doesn't make sense to pursue it at all.

Speaker 0

看啊,我本该提前安排好这个的,但我没这么做。

See, I didn't set that one up in advance, like I should have.

Speaker 0

当公司倒闭后,我开始想,也许我该进入游戏行业。

When the company shut down and I started thinking, well, maybe I should go into the game industry.

Speaker 0

就像蒂姆·盖伊那样做了。

Like Tim game did it.

Speaker 0

等等,我玩过所有这些Origin的游戏。

Wait, I played all these origin games.

Speaker 0

Origin总部在德克萨斯州,而我也在德克萨斯,但我心想,也许我该试着去Origin找份工作。

Origin was based in Texas and I was in Texas, but I was like, maybe I should try to get a job at origin.

Speaker 0

但我并不认识Origin公司里的任何人。

But I didn't know anybody at origin.

Speaker 0

我甚至不知道如何进入游戏行业。

I didn't even know how to get a game in the game industry.

Speaker 0

在论坛上。

On talk.

Speaker 0

很奇怪,参与那个论坛的人之一,那个写些随机内容的人,是来自Looking Glass公司的人,曾参与过《地下世界》的开发。

Bizarre, one of the people who participated on that, one of the people who wrote random stuff was someone who worked at Looking Glass and had worked on Underworld.

Speaker 0

那时候还不叫Looking Glass。

It wasn't called Looking Glass then.

Speaker 0

我给他发了邮件,没试着和他交谈,但我见过他,他可能知道我的名字之类的,于是我发邮件问他:嘿,你有没有认识Origin公司的人,可以介绍我认识一下,看看能不能找份工作?

I emailed him, never tried to talk to him, but I'd seen him he would have known me by name or whatever emailed him and said, Hey, do you have any contacts for somebody I can talk to at Origin to see about getting a job?

Speaker 0

他回复说:你为什么不直接申请这里呢?

And replied with, Why don't you apply here?

Speaker 1

不错。

Nice.

Speaker 1

不错。

Nice.

Speaker 0

每当有人问我,比如,你怎么找到工作的?

Anytime anybody asks me, like, do you get jobs?

Speaker 0

比如,你有什么建议能帮人找到工作吗?

Like, do you have advice for how to get a job?

Speaker 0

我认识的一个和我一起运营这个LP MUD的人,问我有没有兴趣找工作。

I'm like, the guy I played, one of the guys that I co ran this LP MUD with asked if I wanted a job.

Speaker 0

然后,我发邮件问别人工作机会的那个人,也问我有没有兴趣找工作。

And then this guy I emailed asking about someone else's job asked if I wanted a job.

Speaker 0

我真的没法给出任何有用的建议,告诉你该怎么找到工作。

Like, I can't give any useful advice for how do you get a job.

Speaker 1

是啊,我现在想进谷歌,却去问别的公司,这可不是个好策略。

Yeah, I don't think that's a good strategy to ask for a different company now, you want to get into Google?

Speaker 1

这就像是,你想进谷歌,却去问Netflix要个谷歌的联系人,你知道吧?

It's like, let's ask Netflix for a contact to Google, you know?

Speaker 0

哦,对了,我问过他,因为显然Origin出版了Looking Glass Games,所以我以为他那里会有相关人脉。

Oh yeah, so I had asked him because obviously, Origin published Looking Glasses Games, so I assumed he would have contacts there.

Speaker 0

但他却说:‘你为什么不自己去试试呢?’于是他们把我飞过去,进行了面试。

But he said, why don't you do that?' So they flew me up, they did an interview.

Speaker 0

面试中包括了一些内容,我记不太清了,但我依稀记得他们让我在白板上做宽相碰撞检测。

The interview included, I don't really remember anything, but I vaguely remember that they challenged me to do broad phase collision detection on the whiteboard.

Speaker 0

也就是说,你有一大堆在移动的物体。

So which is, you know, you have a whole bunch of things moving.

Speaker 0

你不需要解决所有精确细节,但你需要知道哪些物体可能是潜在的碰撞对象。

You don't have to solve the exact details, but you want to know which ones are candidates for potential clients.

Speaker 0

我的方案并没有使用简单的扫描矩形算法。

It did not.

Speaker 0

但我还是勉强应付过去了,我的回答足够好,他们很满意,于是给了我一份工作。

My solution did not involve the plain sweep rectangle algorithm, but you know, I muddled my way through it and my answer was good enough that they were happy with it and they offered me a job.

Speaker 1

好吧。

Okay.

Speaker 1

当时人们会飞过去面试候选人吗?

Was this common that people flew interviewees

Speaker 0

如果你处于那种级别的职位,比如系列项目,我觉得这挺常见的。

over think that was common if you were at that kind of level of things, like series programs.

Speaker 0

比如你去应聘实习之类的职位。

Like if you went to find intern, you know, or something like that.

Speaker 0

但对于那种编程岗位,是的。

But for that kind of programming job, yeah.

Speaker 0

至于其他类型的编程岗位,我不确定。

Like for other kinds of programming jobs, I don't know.

Speaker 0

我不知道他们会不会为设计师或其他职位这么做。

And I don't know if they would have done that for a designer or something else.

Speaker 0

当时我算是一个相对高水平的技术程序员,我不确定普通程序员会不会得到这种待遇。

Like, was slotting in as a relatively high proficiency technical programmer, and I don't know if a normal programmer would have gotten that treatment.

Speaker 0

我不知道他们是否了解我的水平有多高,还是只是觉得我够好而已。

I don't know if they knew how high proficiency I was, or I was just like, Oh, he's good enough.

Speaker 0

我其实不知道他们雇用我时心里是怎么想的。

I don't actually know what they were thinking at the time they hired me.

Speaker 0

明确地说,大多数镜像公司的程序员都是麻省理工学院的毕业生。

To be clear, most of the looking glass programmers were MIT graduates.

Speaker 0

所以,他们对‘正常’的定义可能并不觉得我特别出色。

So, their expectations of what normal was like, know, they may not have seen me as particularly high level.

Speaker 0

可能只是觉得我普普通通。

May have just seen me as normal.

Speaker 1

是的。

Yeah.

Speaker 1

而且,对于一家游戏工作室来说,既位于波士顿附近,又由麻省理工学院的毕业生组成,这种情况是不太可能的。

And this was unlikely, right, for a company's game studios that to be based in both or near Boston and to be comprised of like MIT graduates.

Speaker 1

我听说,在游戏工作室里,这种情况真的非常罕见。

I heard that this was really unlikely in the game studios.

Speaker 1

I

Speaker 0

我的意思是,波士顿、Looking Glass,MIT就在波士顿,所以从这个角度来说并不奇怪。

mean, Boston, Working Glass, I mean, MIT is in Boston, so that's not unusual in that sense.

Speaker 0

但我认为大多数MIT毕业生并没有进入游戏行业。

But I don't think most MIT grads went into games.

Speaker 0

所以,我不记得还有其他游戏公司是由MIT毕业生组成的。

So, yeah, I'm not aware of any other game companies that were populated by MIT grads.

Speaker 0

甚至连一些设计师都是MIT毕业生。

Like even some of the designers were MIT grads.

Speaker 0

他们甚至不是程序员,我的意思是,我觉得他们有编程能力,但他们在Looking Glass的工作并不是编程。

Like they weren't even program I mean, like I think they had programming ability, but they that's not what they did at Looking Glass.

Speaker 0

他们只是设计师。

They were just designers.

Speaker 1

好的。

Okay.

Speaker 1

你是在《系统震荡2》开发期间加入的,对吧?

And you came in when System Shock two was being developed, right?

Speaker 0

《系统震荡一》当时刚刚完成。

System Shock one was just finishing up.

Speaker 0

所以我实际上为《系统震荡一》做了些小游戏,因为我到那里的时候游戏还没完全做完。

So I actually made mini games for System Shock one, like it wasn't quite done when I got there.

Speaker 0

所以我为它做了一些小游戏,并且多次测试了《系统震荡一》,但除了这些小游戏外,我没有参与其他代码开发。

So I made some minigames for it, and I playtested System Shock one a bunch, but I didn't contribute to the code other than the minigames.

Speaker 0

然后他们推出了一个CD版本,支持更高的分辨率并加入了配音音频,我也为这个版本做了一个小游戏,但那也是我唯一的一次贡献。

Then they developed a CD version of it, which ran at higher resolutions and had voice acted audio and made a I made another minigame for it, but that was also my only contribution to that.

Speaker 1

他们为它开发了CD版本。

They developed CD version for it.

Speaker 1

那么之前是用什么版本的?

So before, it was with what version?

Speaker 0

软盘。

Floppy disk.

Speaker 0

第一个版本是用软盘发行的,你知道,大概用了五张或八张软盘之类的。

The first version came on floppy disk, you know, came on five or eight floppies or whatever it was.

Speaker 0

而CD版本是每个人唯一记得的版本,因为它有配音。

And then the CD version is the one everyone only ever thinks about because it had the voice acting.

Speaker 0

这实际上非常正常。

That was actually very normal.

Speaker 0

比如《翼骑兵》也是类似的。

Like, Wing Commander was similar.

Speaker 0

《翼骑兵2》有一个独立的配音附加包。

Wing Commander two had a separate voice pack add on.

Speaker 0

《翼骑兵2》最初是装在一大堆软盘里的,然后还有一个配音附加包,我们当时说得更直白。

The Wing Commander two came on a whole bunch of floppies and then had a voice pack add on, which we're more blunt.

Speaker 0

问题是,把八张软盘装进一个盒子里,实际的物料成本很高,因为要包含八张软盘。

And the problem is, like, shipping eight floppies in a box was actually expensive cost of goods to have the eight floppies.

Speaker 0

CD版本实际上更好、更便宜,因此利润更高,但当时并不是每个人都有CD驱动器。

Like the CD version was actually better, cheaper to make, and so more profitable, but not everyone had a CD drive yet.

Speaker 1

是的。

Yeah.

Speaker 1

现在听起来,把语音包当作额外语音的附加内容简直荒谬,根本就不是真正的语音。

Today it sounds ridiculous to have like a voice pack is something like an add on for, you know, additional voices, not like voices at all.

Speaker 0

是的。

Yeah.

Speaker 0

好吧。

Okay.

Speaker 0

行了。

Alright.

Speaker 0

事实上,我刚刚看了一部关于其中一部《创世纪》游戏的回顾,据说《创世纪V》或《VI》就是这样:主版本里只有几段语音,然后还有一个语音包额外添加了更多语音,但并不是所有内容都有配音,因为《创世纪》系列的文字量实在太大了。

Well, in fact, I was just I was watching a retrospective about one of the Ultimas, and apparently it was like that for I don't know which one was Ultima V or VI, that they had a couple voice lines in the main release, and then there was a voice pack that added more voices, but not everything was voiced because the Ultimas just had too much text.

Speaker 1

明白了。

Okay.

Speaker 1

你真正参与开发的作品是《地球新世界》。

And the real development that you worked on was Terra Nova.

Speaker 1

对吧?

Right?

Speaker 1

你能谈谈它吗?

Can you talk about it?

Speaker 0

当然,我一开始并没有参与Terra Nova的开发。

Yeah, so I started on Terra Nova Well, I didn't start on Terra Nova.

Speaker 0

我最初参与了一个从未发布的大学篮球游戏,所以我很高兴能离开那个项目。

I started on a college basketball game that never shipped, so I'm happy to move on past that.

Speaker 0

后来我被调到了Terra Nova项目。

And I got put on Terra Nova.

Speaker 0

我是Terra Nova的第三位图形工程师。

I was the third person to be the Terra Nova graphics engineer.

Speaker 0

Terra Nova是一款户外小队战斗模拟器。

Terra Nova was an outdoor squad combat simulator.

Speaker 0

你知道,它是个射击游戏,但带点硬核的射击风格。

You know, it was a shoot them up, but it was a kind of a thick in man shoot them up a little bit.

Speaker 0

它绝对比普通的《看玻璃舞》更偏向射击。

It was not, it was definitely more shooty than normal looking glass dance.

Speaker 0

我在那上面没做多少有趣的技术,但我可以谈谈我实际做的工作。

I didn't do a lot of interesting technology on that, but I can talk about what I did do.

Speaker 0

我也知道一些关于它的其他事情。

I do know some other things about it too.

Speaker 0

要知道的一点是,我们当时试图让这个游戏在四到八兆字节的内存中运行,我想是这样。

One of the things to know is that we were trying to run that game in four or eight megabytes of memory, I think.

Speaker 0

而主地图,你知道,是户外场景。

And the main map you know, was outdoors.

Speaker 0

所以我们只用了高度场,也就是一堆高度值组成的网格。

And so we just used height fields, which are just, you know, grid of heights.

Speaker 0

因此主地图是512乘512,因为我们想要一个大空间。

And so the main map was five twelve by five twelve because we wanted a big space.

Speaker 0

我的意思是,所有这些开发在我加入之前就已经完成了。

I mean, had done all of this development before I got there.

Speaker 0

但后来他们还在那之外做了一个分辨率更低的扩展地图。

But, and then they had a lower res extended map past that.

Speaker 0

但由于分辨率较低,它只有256乘256左右。

But because it was lower res, it was only two fifty six by two fifty six or something like that.

Speaker 0

但仅仅是512乘512,你就得存储一个高度值,我认为这超过了一个字节。

But so, just being five twelve by five twelve, well, you have to store a height, which is I think more than a byte.

Speaker 0

我不记得了。

I don't remember.

Speaker 0

我不记得地图的确切大小了。

I do not remember how big the maps were exactly.

Speaker 0

但你需要一个高度值,并且需要一定的精度。

But you had a height and you wanted some precision.

Speaker 0

所以我认为它超过了一个字节。

So I think it was more than a byte.

Speaker 0

你用哪种纹理来填充那个格子?

You what texture went in that tile?

Speaker 0

所以,地图同时存储了关于方块和关于顶点的信息,就像两者都放在同一个位置一样。

So like a map the map stored both information about the square and information about the vertex as it, like, kind of both in the same spot.

Speaker 0

所以,它大概是64种纹理中的一种,还有高度、光照级别,你知道的,就那么几样东西。

So it was, you know, one of, like, 64 textures, the height, the light level, you know, so a couple of things.

Speaker 0

所以大概是两到四字节,可能是四字节,也许是三字节,但大概率是四字节。

So it was like maybe two or four bytes, probably four, maybe three, but it probably is four.

Speaker 0

如果你算一下,512乘以512再乘以4,就已经是一兆字节了。

And so if you do the math, five twelve by five twelve by four, that's already one megabyte.

Speaker 0

而我们当时试图在四兆字节的内存里运行它,还得存所有图形纹理数据和其他各种东西。

And we were trying to run it in four megabytes and you had to have all the graphics texture data and all this other stuff.

Speaker 0

我们当时已经在非常激进地压榨那个设备的存储空间了。

We were already like pretty aggressively pushing the storage on that thing.

Speaker 0

所以这只是为了让你明白,其实这没什么实际意义。

So that's just to give you some there's no point to that.

Speaker 0

这仅仅是为了让你了解一下我们当时所处的环境。

That was just to give you some sense of the kind of thing we're working in.

Speaker 1

是啊,你会开始体会到,如今你拥有多少资源,做这种事情时能有多大的余地。

Yeah, you get to appreciate, you know, today's standards for like, how much how much stuff you have at your disposal, how much resources you have when you just do this.

Speaker 1

到这个时候,我觉得用这种标准来思考简直荒谬,比如我想做一个户外地图,但所有东西加起来只有四兆内存,你知道吗?

Like at this point, it's ridiculous to me to think about in these terms, you know, to have like a I want to do something that is outdoor map, but I only have four megabytes of memory for everything, you know?

Speaker 1

我喜欢

I like

Speaker 0

这太疯狂了。

it was crazy.

Speaker 0

所以

So

Speaker 1

我们可以做到,因为你已经做了这么多东西。

We can do we can because, like, you've done so much stuff.

Speaker 1

我们不可能详细讨论每一件事。

We are not we're not gonna be able to talk about, like, everything in detail.

Speaker 1

所以我们可以跳过,直接讲到《神偷》登场的部分。

So we can we can skip past until thief comes to the stage.

Speaker 0

关于人员轮换确实有一些有趣的内容,但我不知道如果不讲很多背景的话,该怎么切入。

There's some interesting stuff about turnover though, but I don't know how to get to it without talking about so much.

Speaker 0

所以事情是这样的。

So here's the thing.

Speaker 0

你得明白,这是一个不错的设定。

You have to understand yeah, this is a fine play setting.

Speaker 0

有一点需要明白的是,Looking Glass 在我们制作的游戏方面与 id Software 并不相同。

So one thing to understand is that Looking Glass was not like id Software in terms of the games we made.

Speaker 0

我们制作的游戏更加复杂,这一点约翰·卡马克或约翰·罗梅罗也不会不同意。

We made more sophisticated and this is not something it's not something John Carmichael or John Romero would disagree with.

Speaker 0

我们制作的是更富思想性的游戏,而他们制作的是更简单、以动作射击为主的游戏。

We made more sophisticated thinking man's games, and they made more action shooting games that were simpler.

Speaker 0

因此,这某种程度上是一种挫败感,但我接受了,因为我很开心。

And so one of the kind of a frustration, but I accepted it because I was happy.

Speaker 0

我喜欢 Looking Glass 的游戏。

I liked Looking Glasses games.

Speaker 0

我享受《创世纪:地下世界》。

I enjoyed Ultima Underworld.

Speaker 0

我喜欢它。

I liked it.

Speaker 0

但作为一个图形程序员,想要与约翰·卡马克之类的人竞争,这有点令人沮丧,因为他能做出一个图形引擎,然后围绕这个引擎来设计游戏,展示引擎的性能,并让它变得非常出色。

But it was a little bit of an unsatisfying thing as a graphics programmer trying to compete with John Carmack, or whatever, that he could make a graphics engine and they would tailor the game around the graphics engine in some sense, and show off the graphics engine and make it really good.

Speaker 0

我曾经说过,在理想情况下,我们90%的CPU时间都应该用于向屏幕推送像素。

And I used to talk about the fact that in an ideal world, we would be spending 90% of our CPU time pushing pixels to the screen.

Speaker 0

因为我们当时的目标是实现大约每秒20帧的帧率,你知道的,在低分辨率下。

Because we were trying to get frame rates of, like, 20 frames per second, you know, at a low resolution.

Speaker 0

那时候,那些慢速电脑能提供的性能就只有这么多。

Like, that was all we could get out of those slow computers back then.

Speaker 0

所以问题在于,Looking Glass的项目中,80%甚至75%的CPU时间都花在了推送像素上,因为还有太多其他事情在消耗资源。

So the problem is that looking glass, we would get 80% or 75% being spent on pushing pixels because there was too much other stuff going on.

Speaker 0

所以当你在绘制一个庞大、复杂、细节丰富的户外场景时,让我这么说吧。

So when you were drawing a big, complicated, detailed scene outdoors, let me put it this way.

Speaker 0

纹理映射。

Texture mapping.

Speaker 0

天啊,我们要谈谈纹理映射吗?

Oh my God, do we want to talk about texture mapping?

Speaker 0

这会对人们有影响。

It'll matter for people.

Speaker 0

在软件渲染时代,我们想深入多少技术细节来讨论纹理映射?

How much technical detail did we want to go into about texture mapping in the software rendered days?

Speaker 1

我觉得要讲很多。

A lot, I would say.

Speaker 0

好的。

Okay.

Speaker 0

太好了。

Great.

Speaker 0

那我们就讲吧,因为我现在需要谈谈这个,来解释Terra Nova当时做了什么不同的地方。

Then we'll do it because I need to talk about it now, to explain what Terra Nova was doing differently.

Speaker 0

所以,好吧。

So, okay.

Speaker 0

我在这里整理一下我的思路。

I'm grouping my thoughts here.

Speaker 0

这个内容该怎么组织才合适?

What's the right organization for this?

Speaker 0

我们之前谈过《毁灭战士》。

Well, we talked about Doom.

Speaker 0

让我们倒回去看看《毁灭战士》。

Let's go rewind to Doom.

Speaker 0

《毁灭战士》以一种Look and Glass做不到的方式产生了非常高质量的图形。

So, Doom produced very high quality graphics in a way that Look and Glass did not.

Speaker 0

传统上,这种技术被称为亚像素和亚纹理单元精确。

And the traditional term for this is that it was sub pixel and sub texel correct.

Speaker 0

我可以不深入技术细节,来解释这到底意味着什么。

And I can describe without going into technical detail, what that really means.

Speaker 0

事情是这样的。

So here's the deal.

Speaker 0

想象一下,场景以某种方式用多边形和顶点的纹理坐标来描述。

Imagine you have the scene described in some way as polygons with texture coordinates of the vertices or whatever.

Speaker 0

所以你有一个场景,还有一个相机,你想渲染这个320乘200的微小视图。

So you have some scene, and you have a camera, and you want to render this three twenty, this tiny three twenty by 200 view.

Speaker 0

所以你通过每个像素的中心投射光线——但这并不是实际的实现方式。

So you cast this is not how you implement it.

Speaker 0

这里讨论的是你希望结果看起来是什么样子。

This is talking about what you want the results to look like.

Speaker 0

因此,你从每个像素的中心投射光线,看看它在场景中落在哪里。

So you cast array through the center of every pixel and you see where it lands in the scene.

Speaker 0

然后你从物体的四个角插值纹理坐标,找出它对应的纹理坐标,获取该纹理,并将其作为该像素的颜色。

And you interpolate the texture coordinates from the corners of the thing to find the texture coordinate that it is, and you grab that texture, and that's what you put for that pixel.

Speaker 0

这就是你想要的效果。

That's what you want.

Speaker 0

这听起来显而易见。

It sounds obvious.

Speaker 0

这本就应该听起来很显然。

It's meant to sound obvious.

Speaker 0

这本就应该听起来微不足道且显而易见。

It's meant to sound trivial and obvious.

Speaker 0

《毁灭战士》就是这样做的。

And Doom did that.

Speaker 0

《毁灭战士》非常稳定,完全实现了你想要的效果。

Doom was rock solid, produced exactly what you wanted.

Speaker 0

但实现这一点的方式,即使在《毁灭战士》中也很复杂,我们没必要细谈。

But the way you do that, even in Doom, Doom is a little complicated, and we can't we don't have to talk about it.

Speaker 0

但传统做法是,你使用相同的多边形描述,将其投影到二维空间。

But but the traditional way of doing this is that you take your same description with a with a polygon, and you project it down to two dimensions.

Speaker 0

所以现在它看起来就像这样。

So now it looks like that.

Speaker 0

然后你在边缘上插值纹理坐标,接着在绘制这些像素时跨扫描线插值,当你到达这个像素时,就会想:好吧,纹理的UV或ST坐标就是这个。

And you interpolate over the edges, the texture coordinates, and then you interpolate across a span while drawing these pixels, and you get to this one and you're like, okay, the texture UV or ST is this.

Speaker 0

你查看纹理并获取它。

You look up in the texture and you grab it.

Speaker 0

你完全可以编写代码来正确实现这一点,从而得到与我们之前提到的真正参考标准完全一致的结果。

And you can definitely write that code so that you do that correctly and you get the exact same result as that recapping result that we said is our true reference standard.

Speaker 0

而这正是现代GPU所做的。

And that is what modern GPUs do.

Speaker 0

但实现这一点需要大量的数学运算。

But, doing that requires a lot of math.

Speaker 0

在那个时代的计算机中,你无法高效地进行两个数的乘法运算。

And one thing that you could not do in computers of that era is multiply two numbers efficiently.

Speaker 0

乘法运算很慢。

Multiplying numbers was slow.

Speaker 0

除法运算更慢。

Dividing numbers was even slower.

Speaker 0

所以我会谈谈除法。

So I will talk about division.

Speaker 0

纹理映射非常重要。

It's very important to texture mapping.

Speaker 0

我们稍后在讨论《神偷》时会谈到这一点。

We'll talk about that later when we talk about Thief.

Speaker 0

但你看到的一点是,像PlayStation那样,它并没有进行透视校正,而只是在屏幕空间中对这些坐标进行插值。

But one thing that you saw, like the PlayStation did this, is that it wasn't perspective corrected, just interpolated in screen space these coordinates.

Speaker 0

这有点混乱和粗糙。

That was a little messy and sloppy.

Speaker 0

但即便如此,发生的情况是你已经将顶点投影到了屏幕上。

But even that, the thing that happens is that you have projected your vertices onto your screen.

Speaker 0

你知道,你说过,这些顶点在三维空间中的位置,以及它们在屏幕上的三维空间位置。

You know, you've said, here's where they are on three d space, here's where they are on three d space on the screen.

Speaker 0

但它们处于分数位置。

But they're at fractional positions.

Speaker 0

角落并没有正好落在坐标(3,2)上。

The corner didn't land at three, two.

Speaker 0

它落在了3.175、2.1,等等。

It landed at 3.175, 2.1, blah, blah.

Speaker 0

如果你在处理时考虑到这一点,这就是亚像素精度。

That is being sub pixel correct if you take that into account while you're processing things.

Speaker 0

所以,当你在两个顶点之间画一条线,如果是像素化的线条时,如果你允许它们具有一定的亚像素精度并在渲染时应用这种精度,实际点亮的像素就会发生变化。

So what happens is, when you draw a line between two vertices, and it's pixelated line, if you allow them to actually have a little bit of sub pixel precision and apply that while interpreting it, it'll actually change which pixels light up when you draw that line.

Speaker 0

这让你能够,例如,让线条移动得非常平滑和连续。

And that allows you, for example, to move the line very smoothly and continuously.

Speaker 0

但如果你将它们强制对齐到整数坐标,线条就会卡顿,看起来有点不连贯。

But if you snap them to integers, it's just going to trick along and look a little jerky.

Speaker 0

而所有Looking Glass的代码都没有实现亚像素精度。

And all of the Looking Glass code was not sub pixel correct.

Speaker 0

它只是将所有内容直接对齐到整数坐标。

It would just snap the things to the integer coordinates.

Speaker 0

当你以每秒10或20帧运行时,这种问题并不明显。

And when you're running at 10 or 20 frames per second, it's not as obvious.

Speaker 0

一旦你做得非常流畅,比如你的游戏风格很像《毁灭战士》之类的,

Once once you're, like, super smooth and you're, like, you know, you're not you you your game is very, Doom like, you know, or whatever.

Speaker 0

这个问题就会变得非常明显,但在那些 Looking Glass 游戏中依然存在。

It's a lot more obvious, but it was still an issue in those looking at those games.

Speaker 0

《毁灭战士》之所以能实现这一点,有各种原因,但其中一部分是因为我们当时根本不知道更好的做法。

And there are various reasons why Doom was able to do it, but some of it was that, like, we just didn't know better.

Speaker 0

比如,在《 Thief》之前,Looking Glass 的游戏没做好这一点,部分原因是我们根本不懂这些技术。

Like, part of the reasons why the Looking Glass games before Thief didn't get this right was because we just didn't understand that stuff.

Speaker 0

这并不是像我们之前提到的 Mike Abrash 那样的东西,我认为他甚至都没做过纹理处理。

That was not like, you know, like the Mike Abrash things that we were talking about, I don't think he even did texturing.

Speaker 0

或者他只是很晚才做纹理,而且也没怎么谈论过。

Or he did texturing very late, didn't talk about it very much.

Speaker 0

所以所有这些东西都非常耗费资源。

So all of that stuff is very expensive.

Speaker 0

我说到 90% 这个点的意思是,当你想用一个大型精细网格绘制户外场景时,这非常耗费资源。

Doing the to get to the ninth the point of my 90% thing is that when you want to draw an outdoor scene with this big detailed grid, that's very expensive.

Speaker 0

这并不贵,因为需要绘制的像素数量大致相同。

And it's not expensive because of the pixels because the number of pixels you have to draw is about the same.

Speaker 0

也许会有一点上下波动,导致一些额外的像素。

Maybe there's a little bit of, you know, up and down causing some extra pixel.

Speaker 0

问题在于你要绘制太多的边线。

The problem is that you are trying to draw so many edges.

Speaker 0

但边线的问题在于它们需要进行除法运算,因为你必须测量这些边线的变化情况。

But the problem with edges is that they require divides because the slope you have to measure what, like how those things are changing with those.

Speaker 0

所以Terra Nova想要绘制这个大型网格。

So they, Terra Nova wanted to draw this big grid.

Speaker 0

随着距离增加,网格会变得粗糙,但当我加入时,它基本上会绘制出一圈圈的环状结构。

It got coarser as you went away, but basically when I got there, started, it would draw like basically rings.

Speaker 0

还记得我提到过的PostScript描边吗?你需要绘制一些小的四边形,而且它们实际上会重叠。

And remember that thing I said about the postscript stroke where you had to draw little quads and they were actually overlapping in that.

Speaker 0

所以这有点类似的情况。

So it's kind of the same thing.

Speaker 0

你正在绘制大量这些不重叠的小方块,来渲染一个广阔的户外场景。

You're drawing all these little they're non overlapping, drawing all these little quads to draw a big outdoor scene.

Speaker 0

而且你必须沿着所有这些边缘进行插值。

And you're having to interpolate along all those edges.

Speaker 0

因此,在1992年或1993年或1994年出现了一个名为《火星演示》的演示程序,这是一个看起来非常惊艳的演示,但你只能向前移动。

So there was a demo that came out in '92 or '93 or '94 called the Mars demo that was this amazing looking demo that you could only move forward.

Speaker 0

但这位开发者只是将给定深度的顶点连接起来,然后在下一步绘制下一组顶点,再在下下一步绘制再下一组顶点。

But what the guy did was he just drew connected the vertices at a given depth, and then drew the next set of vertices at the next step, and the next set of vertices at the next step.

Speaker 0

这被称为浮动地平线。

It's called a floating horizon.

Speaker 0

这是一种常见的技术。

It's a standard thing.

Speaker 0

但通过这样做,然后从这些线向下填充。

But by doing that and then filling downward from them.

Speaker 0

你就无需绘制向下的边缘。

You don't have to draw the downward edges.

Speaker 0

你只需要为每个顶点绘制一次,你知道的,你知道的,这里有10个顶点,你只绘制9条边将它们连接起来。

You only have to draw for every vertex, you're only drawing one, you know, you know, so there's 10 vertices here and you draw nine edges connecting them.

Speaker 0

所以基本上每个顶点只对应一条边。

So it's basically one edge per vertex.

Speaker 0

而如果你绘制大量四边形,那就是每个顶点对应一个四边形,也就是每个顶点四条边。

Whereas if you're drawing a lot of quads, it's one quad per vertex, so it's four edges per vertex.

Speaker 0

因此,你将需要绘制的边的数量减少了四倍。

So you're cutting down the number of edges you're doing by a factor of four.

Speaker 0

在火星演示中,他使用了Gouraud着色,计算了颜色亮度并进行插值。

And in the Mars demo, he was groshading, so he was computing a color brightness and interpolating it.

Speaker 0

因此,他会沿着边插值这种颜色亮度,并向下推移。

So he would interpolate that color brightness along the edge and push it down.

Speaker 0

但这并不等同于在四边形上实际插值颜色。

But that didn't correspond to actually interpolating a color across quads.

Speaker 0

他只是将颜色向下插值,这实际上没有意义,但效果还不错。

It just interpolated them downwards, which didn't actually make any sense, but it was fine.

Speaker 0

看起来很棒。

It looked great.

Speaker 0

所以就有这样一个聪明的技巧:嘿,你可以将需要绘制的边数减少到四分之一。

So there was this clever hack of like, Hey, you can cut down the number of edges you need to do by a factor of four.

Speaker 0

所以《Terra Nova》基本上也做了同样的事情。

So Terra Nova basically did the same thing.

Speaker 0

它描绘了这些曲线,但这是一款纹理贴图游戏。

It traced out these curves, but it was a texture mapped game.

Speaker 0

所以你不得不向下填充纹理。

So you had to fill downward with texture.

Speaker 0

整个技巧是,我们在前景中绘制了一系列三角形、四边形或多边形,直到某个距离。

That whole trick was, we drew a bunch of triangles or quads or polygons in the foreground up to some distance.

Speaker 0

但从这个距离开始,我们开始绘制所谓的条带,就像我刚才说的,在地形上追踪出圆弧。

But then starting at this distance, we started drawing what we called strips that were, you know, like I was saying, tracing out circular arcs on on the terrain.

Speaker 0

当它追踪出一个圆弧时,它只是在绘制一个浮动的地平线,并用来自地图方块对应纹理的随机像素向下填充。

And as it traced out a circular arc, it was just drawing a floating horizon thing, and it was filled downward with random pixels from the texture corresponding to the map square.

Speaker 0

随机像素。

Random pixels.

Speaker 1

随机的。

Random.

Speaker 0

随机的。

Random.

Speaker 0

只是随机的。

Just random.

Speaker 0

因为那时候没人做多级渐远纹理,而多级渐远纹理是用来减少失真的;如果你不做多级渐远纹理,就会出现噪声,因为你会开始看到严重的混叠伪影。

Because the whole thing was nobody was doing mip mapping in those days, and mip mapping is what you do to reduce the if you don't mip map, you get noise because you you you start getting drastic aliasing artifacts.

Speaker 0

因此,在没有多级渐远纹理的情况下,你会看到随机像素,或者说是半随机的像素、图案或其他东西。

And so without mipmapping, start seeing random pixels effective, semi random pixels, patterns or other things.

Speaker 0

但因为我们地面纹理本来就有点噪点,所以效果已经足够好了。

But by having because our ground textures were kind of noisy anyway, it was like good enough.

Speaker 0

这完全是种临时方案,而且它还会应用光照效果。

It was it's a total hack, and it would apply the lighting as well.

Speaker 0

这完全是个临时方案,但其实就是个临时方案。

It was a total hack, but it was like it was a hack.

Speaker 0

那个时代的其他游戏都会将多边形绘制到12单位远的距离,然后使用浓重的雾效,让一切突然模糊消失。

Rest of the games of that era would draw polygons out to a distance of 12 or whatever, and then have an incredible fog that just like, everything just fogged out.

Speaker 0

你会玩到一些游戏,在远处看到地平线上有一张位图,比如远处的山脉。

And you would play games where you would see in the distance because they would have some horizon bitmap, like, you know, mountains in the distance.

Speaker 0

你看到远处的山脉,然后逐渐靠近它们。

And you see mountains in the distance, you'd be moving closer and closer to them.

Speaker 0

突然间,从遮蔽山脉的雾中,会冒出一座大山丘。

And suddenly, out of the fog covering the mountains would emerge a big hill.

Speaker 0

这完全说不通,因为显然,如果它挡住了视线,就不该被遮住。

And which just doesn't make any sense because, obviously, if it was blocking the view of the anyway.

Speaker 0

所以其他所有游戏,比如《魔法地毯》和《战斗区域》,都这么干。

So every other game, like magic carpet and there was a battle zone game, they all did that.

Speaker 0

而《地球新生》却真的渲染到了远处。

And Terra Nova just actually rendered out to the distance.

Speaker 0

而妥协方案是它采用了这些疯狂的噪点和纹理效果。

And the compromise was that it did these crazy noise, texture things.

Speaker 0

但你也运行在非常低的帧率下。

But I you were also running at a really low revs.

Speaker 0

所以一旦你知道了,就非常明显,但其实又没那么明显。

So you it was really it was very obvious once you knew it, but it wasn't.

Speaker 0

总之,这些代码都是在我加入之前写好的。

Anyway, so that was all written before I got there.

Speaker 0

但问题是,这些大圆弧需要查表来确定在每个距离上如何步进。

But the problem is that these big circular arcs involve looking in a table to figure out, do you how do you step to walk at each distance?

Speaker 0

而这种查表操作会消耗内存查找时间。

And that table referencing was doing was costing, you know, memory lookups and taking time.

Speaker 0

于是我改成了使用逐渐增大的方块进行遍历。

And I switched it to traversing like a little like, squares that were larger and larger as you went out.

Speaker 0

如果你用这样的方块,就会处理更多的边,因为圆弧采用的是对角线步进,可能会切掉一部分。

And if you do squares like that, you you process more edges, like, because the circles were taking diagonal steps, and so they could cut, like, the they could cut off some amount.

关于 Bayt 播客

Bayt 提供中文+原文双语音频和字幕,帮助你打破语言障碍,轻松听懂全球优质播客。

继续浏览更多播客