Back to Home

Sean Barrett: how I got into the video game industry

history of it · sean barrett · sean barrett · software rendering · programming career

Sean Barrett: how I got into the video game industry

Original author: Sean Barrett
  • Transfer
image


Programmer Terra Nova: Strike Force Centauri, System Shock 2 and the Thief series, Sean Barrett, talks about what led him to program three-dimensional graphics and work on games.

One of Mike Abrash’s posts begins with a discussion of how his written work influenced his career. It reminded me of how his labors influenced my career. Not sure if I ever told him that perhaps thanks to him I got into the gaming industry. I was thinking of writing a letter to him, but then I decided to state it all publicly and conduct a little research in this area.

When I was a teenager, in the 80s I had an Atari 800 computer on which I did ordinary things (few games, mostly BASIC). (Technically, at least initially, my family owned it, but I was the only user.) Although it was almost impossible at 800, but I became interested in 3D graphics. I studied Pascal and 3D at the same time as decrypting the program for drawing wireframes from Byte magazine; I made hacker attempts to reproduce the same effect at 800. (In the end, I managed to perform 800 ray tracing of a simple sphere with Lambert lighting, and then my friend’s checkered and reflective spheres.)

Looking at the Infocom games that were created by loners, I thought I wanted to do the same thing “when I grow up”, but at that time the industry began to move towards large teams, and Infocom started to decline, so it no longer seemed interesting / justified to me , and when I went to college, I never thought about such an opportunity.

I continued to be interested in computer graphics in college, regularly reading Computer Graphics SIGGRAPH and IEEE Computer Graphics and Applications. But I didn’t do more programming in real-time graphics, even though I had a personal computer with the ability to display graphics. And I did not play computer games for PC either. When I was engaged in programming, I basically wrote something like text adventure engines and programs for IOCCC, and played only in MUD.

I graduated from college in 1992, when I was 25, and moved to Texas, where I started working for a life-saving startup that released printer software. (This experience may seem to be of little value for the gaming industry, but in August 1993 I became (as far as I remember) the only programmer who worked on writing our new PostScript engine in C ++; our previous engine was written in Forth and the 68000 assembly language, in addition was supposed to support PostScript Level 2. So, I was the only programmer in a language interpreter and two-dimensional graphics engine project designed for the Adobe specification. Fifteen years later, in 2008, I started working on Iggy, a Flash-based UI library, which was basically a language interpreter and two-dimensional graphics engine designed for the Adobe specification. (However, I switched back to C.)) There I joined a couple of my friends, John Price and John Davis. I call them friends, but before moving to Texas I only knew them from LPMud (Darker Realms ), in which we were administrators together. (To end these strange memories of past acquaintances, I will say that we created this LPMud when we met in another LPMud, Wintermute. One of the Wintermute administrators that we emulated (and who visited our Mud several times) was Tim Kane .)

John, John, and I were the company's junior staff and quickly created a small clan. After the end of the working day, we played at work in Ultima Underworld, Ultima 7, Ultima Underworld 2 and Ultima 7 part 2 on the most powerful 386 and 486 that were in the office (it seems that in 1993 the most powerful was 486 50). At the same time, we found in the office columns on programming graphics for Mike Abrash 1992 in the collection of Dr. Dobb's Journal. John Price and I started writing 3D renderers of polygons on a PC, competing with each other (and with Abrash) in who will achieve greater speed. My renderer was pretty fast until I tried to implement texture mapping - the first implementation required two divisions per pixel, which was very slow.

After the startup went bankrupt in 1994, the three of us got into the gaming industry (but in different ways): John Price's page on MobyGames ; John Davis page on MobyGames ; my page on MobyGames and this one (and in fact, I have three pages there , however there are mostly not my projects there, people just express “many thanks” for the contribution).

As for me, since both Origin and I were in Texas, I decided to study the issue of employment with the company, so I wrote an email to someone who worked at Looking Glass (I knew him only from the Usenet group dedicated to strange text compositions ) trying to find Origin contact information because Origin was publishing LGS games. Instead, he invited me to an interview at LGS, and this is where the story of how I got into the game industry almost ends (not counting the links to the demos below).

Would I start programming graphics on PC and end up in the gaming industry if I didn’t find those columns of Abrash in time and organize a game design / graphics programming competition? (My third co-administration with John Price separated from Wintermute, because we had a strong belief that a good MUD should strive to entertain the players, and in many LPMud this was not so. So our group did not appear completely spontaneously, and completely it’s not so strange that as a result we became programmers in the gaming industry.) Maybe yes, maybe no. (And by the way, would I end up in LGS if I hadn’t had a chance acquaintance in LGS? It's harder to judge this - the Underworld series was my favorite, so maybe I would still find a way to contact them.)

Thinking about this, I thought about the Abrash-inspired 3D polygon renderers that I wrote. I wondered if I could find them, so I took up archeology in my old archived home directories. I could not find them. However, I managed to detect zip with demos that I sent to LGS, and they still work in DOSBox, so I will share them. (I was not able to find their source, so my guess is partially presented below.)

First, for reference, I want to show you Tim Clark's 5K demo “Mars” released in 1993. Sorry for the frame breaks: I don’t know how to make Fraps work correctly with DOSBox.


I decided to implement it myself and add new features to it, so I wrote my own version. I don’t remember exactly when it was: the EXE is dated 1994.


After looking in the readme, I saw that I forgot to mention that this is a remake of the Mars demo. Perhaps I assumed that people from LGS knew her. As it turned out, this was not so, so maybe they were more impressed than they should! In addition, they were developing Terra Nova: Strike Force Centauri , so this could also affect their interest.

Notice that my demo expands the capabilities of Mars, and has different worlds. In the first world there are two different relief colors. In the second (0:50) there is an effect of cloud shadows on the earth, which I could not reproduce as well in any other game / engine I wrote. There is fog in the third world, and a strange lighting model and swirling clouds in the fourth. In the fifth, there is a plasma sky in the style of the demoscene, illuminating the relief (this is just inverting the shadows), and the sixth is trying to imitate the lunar landscape.

Tilting to the sides is an imitation: I think that the sky uses a hard-coded mechanism for displaying lines with a constant z, and the baseline of the terrain tilts, but the vertical elements do not tilt at all. However, the sky and the general slope make this effect quite convincing.

A slight flicker when moving forward occurs because the forward movement is quantized on the squares of the map (but the movement to the sides, it seems, is not). It was just a design mistake. Another flicker occurs because I start to skip lines of the map when they move away. Skipped lines depend on your position, instead of, for example, always skipping odd lines regardless of the parity of the line the player is currently on, which would be logical. Another design mistake. When I was assigned to do Terra Nova terrain rendering (I was already the third person working on this task), I fixed the exact same error in it.

I also sent LGS the first real-time texture mapping engine I wrote. The map file and textures from it date back to February 1993, that is, it was about a month after the release of Ultima Underworld 2, and ten months before the release of DOOM.


Underworld had sloping floors and the ability to look up and down, so they needed a perspective texture mapping that was correct from the perspective, but they didn't have one. UW1 did all the texture mapping by rendering affine horizontal stripes, so there was no perspective correction on the walls, but the floors and ceilings were drawn correctly. I didn’t figure it out then, but UW2 split the quadrangles into triangles and drew affine triangles, so the perspective quadrilaterals no longer looked stretched and did not distort in a strange way; straight lines remained, but with a diagonal seam.

In the demo presented above, I myself (I think - at that time I only had Abrash and Usenet speakers - maybe someone in Usenet discussed this?) Invented the idea of ​​applying textures to walls / floors, which was later much better demonstrated in DOOM. I think I was rendering front to back with the fill buffer to reduce the cost of the pixel fill speed. As you can see, when I go higher than the height of the wall, clipping of the reverse faces is not performed, but the fill buffer still allowed me to reduce costs. At some point, I tried to rewrite the fill buffer and added an error that you can notice: polygons sometimes disappear from the right edge or are sorted incorrectly, although there was no such problem in the original engine.

Finally, I had what might be called the first deferred renderer, although this is actually not deferred shading or deferred lighting. I’ll talk about it below in more detail.


In this demo, I applied real-time dynamic lighting in a static scene. I imagined that it could be used to play with pre-rendered graphics, a la Alone in the Dark or BioForge. (BioForge was only released in 1995, but I definitely saw its screenshots before I got into LGS.)

First, it renders a complex scene with non-real-time texture mapping (at launch) into the on-screen buffer (into the g-buffer, if you want) using perfect perspective correction. Each g-buffer contains diffuse albedo, which reflects the color and the emitted color, but they are all packed only in 8 bits per pixel (using a palette, but different from the 8-bit display palette).

In real time, the engine re-renders the same polygons, but without texturing, only lighting. At the vertices of the polygons, diffuse and reflected lighting is calculated for a white surface, and then (as I assume) each of them is separately interpolated to the entire polygon. A value from the g-buffer is loaded into each pixel, and the lighting is calculated by unpacking the diffuse and reflected lighting in 8 bits (I guess again), and then the color of the display is searched in the 256x256 lookup table.

It should be noted that since lighting is calculated only at the peaks, it is not very high quality. I think I realized that we can dynamically subdivide polygons that require better lighting if we get to this (some of these polygons are pre-divided to improve lighting in them).

In LGS, in a sense, I returned to this idea, creating something like an 8-bit sprite with an overlay on the normal map; each pixel in the sprite had an 8-bit color and an 8-bit “lighting index”; conceptually, the index of illumination was indexed into the palette of normals, but in practice the index created directional illumination, diffuse and reflected, as well as self-shadowing. (For example, pre-render lighting with these effects from N lighting directions; now we process them as a sprite with N 8-bit color channels, one color for lighting at each angle, and then calculate the 8-bit palette for this sprite with “deep color” ". For example, compression by vector quantization. For real-time rendering, we perform mixing between the k closest light sources.

However, after Terra Nova, I never made games with sprite characters, so this was another dozen of my real-time inventions that remained useless.

Read Next