NOVEMBER 1999

GAME DEVELOPER MAGAZINE ON THE FRONT LINE OF GAME INNOVATION GAME PLAN DEVELOPER

600 Harrison Street, San Francisco, CA 94107 t: 415.905.2200 f: 415.905.2228 w: www.gdmag.com Can Subsidized Hardware Publisher Cynthia A. Blair cblair@mfi.com EDITORIAL Save PC Gaming? Editorial Director Alex Dunne [email protected] Managing Editor ith one of the largest inch monitor and a color printer for Kimberley Van Hooser [email protected] console launches ever about $90 more than a . Departments Editor just behind us and at While I’m glad that more PCs are Jennifer Olsen [email protected] least two more loom- working their way into homes — it cer- Art Director W Laura Pool lpool@mfi.com ing on the horizon over the next 18 tainly will grow the base of casual Editor-At-Large months, many people are speculating gamers — there are a couple of aspects Chris Hecker [email protected] about the features of these next sys- to these incentives that don’t bode well Contributing Editors tems. Upon seeing the impressive fea- for the PC game industry. First, these Jeff Lander [email protected] Paul Steed [email protected] ture sets of the new consoles, some rebate programs are seeding households Omid Rahmat [email protected] have raised questions as to the long- with machines barely equipped to play Advisory Board term viability of the PC as a gaming today’s games. The latest graphics and Hal Barwood LucasArts platform. It’s tough to look at a console audio hardware won’t be found in a Noah Falstein The Inspiracy Brian Hook Verant Interactive 4 spec sheet, read that it has broadband $289 computer, and without these capa- Susan Lee-Merrow Lucas Learning Internet access, amazing graphics and bilities, the systems offer little in terms Mark Miller Harmonix Dan Teven Teven Consulting audio capabilities, a keyboard, DVD of a cutting-edge gaming experience. Rob Wyatt DreamWorks Interactive support, support for electronic software Second, long-term service agreements distribution and backwards compatibil- with online services like Compuserve ADVERTISING SALES ity, and not see that the PC faces stiff could hamper the growth of broadband Western Regional Sales Manager Jennifer Orvik e: jorvik@mfi.com t: 415.905.2156 competition. The traditional strengths access to the Internet, and enabling Eastern Regional Sales Manager/Recruitment of the PC are being co-opted by con- broadband access is essential for grow- Ayrien Houchin e: ahouchin@mfi.com t: 415.905.2788 soles. I for one don’t believe PC gaming ing the online gaming market. International Sales Representative will go away, but the platform must It would be interesting to see a major Breakout Marketing e: [email protected] t: +49 431 801703 f:+49 431 801797 confront these challenges head-on. game publisher like step ADVERTISING PRODUCTION To grow the PC market, prices must up and subsidize a line of high-end Senior Vice President/Production Andrew A. Mickus continue to drop. Fortunately they are, game PCs, targeting veteran PC owners Advertising Production Coordinator Dave Perrotti and it’s one reason I’m bullish on the and hard-core gamers. In return for the Reprints Stella Valdez t: 916.983.6971 PC’s future. One big reason for recent rebate at purchase, these consumers MILLER FREEMAN GAME GROUP MARKETING drops in PC prices is the direct result of might agree to buy a certain number of Marketing Director Gabe Zichermann marketing campaigns by ISPs like games from EA over a span of years (the MarCom Manager Susan McDonald Compuserve and AOL. Compuserve, for Columbia House music club model), or Junior MarCom Project Manager Beena Jacob example, is subsidizing the cost of sign a multi-year subscription to a per- CIRCULATION Compaq, HP and eMachine entry- sistent game world like ULTIMA ONLINE. Vice President/Circulation Jerry M. Okabe systems to the tune of a $400 rebate at The latter option is especially intrigu- Assistant Circulation Director Sara DeCarlo purchase. In return, these consumers ing, since the risk to publishers of these Circulation Manager Stephanie Blake (many of them first-time PC purchasers) games is high — developing and main- Assistant Circulation Manager Craig Diamantine agree to subscribe to Compuserve for taining a persistent world is expensive, Circulation Assistant Kausha Jackson-Crain three years at $21.95 per month. These they are more difficult to manage, and Newsstand Analyst Joyce Gorsuch ISPs are gambling that it’s better to more rides on their success than with INTERNATIONAL LICENSING INFORMATION underwrite the cost of these new traditional games. A publisher could Robert J. Abramson and Associates Inc. machines today and recoup that invest- ensure that when the game was built, t: 914.723.4700 f: 914.723.4722 ment through extended online service some percentage of players would be e: [email protected] agreements. The ISP gets reimbursed for locked into the game. A guaranteed rev-

its up-front investment from these enue stream over a period of years looks CEO/Miller Freeman Global Tony Tillin multi-year service agreements, it gets good on the books, and in the hit-or- Chairman/Miller Freeman Inc. Marshall W. Freeman “content” in the form of new chat par- miss world of game publishing, that’s President & CEO Donald A. Pazour ticipants, more eyeballs for which it can important to Wall Street. CFO/COO Ed Pinedo Executive Vice Presidents Darrell Denny, Galen A. sell advertising space on its service, and Of course, there’s nothing stopping Poss, Regina Starr Ridley other assorted benefits. If it persuades any of the console manufacturers from Sr. Vice Presidents Annie Feldman, Howard I. Hauben, these indentured servants — I mean, launching a similar rebate program to Wini D. Ragus, John Pearson, Andrew A. Mickus Sr. Vice President/Development Solutions Group KoAnn customers — to stay with Compuserve entice their customers. It may simply Vikören after the agreement is terminated, so be a matter of who strikes first. ■ Group President/Division SF1 Regina Ridley much the better for the ISP. The bottom line is that as I write this, you can buy a brand new 400MHz eMachine with 15-

GAME DEVELOPER NOVEMBER 1999 www.gdmag.com New Products: Metacreations intro- duces Carrara, NxN rolls out Alien- brain, and Criterion unveils its next generation of Renderware. p. 7

Industry Watch: Dell snubs ATI, shows off its new console, Sony divulges more PSX2 secrets, and Aureal busts out with boards. p. 8

Product Review: Jeff Lander sings the praises of multi-resolution meshes as he reports on Digimation’s MultiRes Toolkit News from the World of Game Development and Plug-in for 3D Studio Max. p. 10

characteristic of certain wildly popular Alienbrain’s server systems require New Products high-end packages. Windows NT 4.0 or later, and clients Carrara will sell for $499 and run on require Windows 95/98/2000/NT 4.0. by Jennifer Olsen Windows 95/98/2000/NT 4.0 and Pricing was not yet finalized at press platforms. time, but the servers are expected to ■ Metacreations Corp. cost in the neighborhood of $4,900, A New Chip off the Old Block Carpinteria, Calif. with client systems priced at around (805) 566-6200 $1,900. NxN also offers flexible volume METACREATIONS has unveiled Carrara, http://www.metacreations.com pricing packages. its newest entry into the fray of “bar- ■ NxN Software AG 7 gain” and animation Munich, Germany packages. The name is appropriate X-File Management and More +49 (89) 27-32-24-0 enough: Italy’s Carrara marble has http://www.alienbrain.com been prized for its unsurpassed quality NXN SOFTWARE has announced Alien- since ancient times, back when a huge brain, the successor to its groundbreak- slab of marble was the original model- ing asset management tool tailored Gearing Up for the Next Generation ing environment for 3D artists. specifically for game developers, Carrara is actually the marriage of MediaStation. Remember back in high CRITERION SOFTWARE has revealed the Metacreations’ Ray Dream Studio and school when you wrote your first game? third generation of its multi-platform Infini-D products. So what separates it Maybe you had a few dozen files and 3D development toolkit, Renderware. from the rest of increasingly crowded kept track of them on the back of your By now we’ve all gotten an idea of pack of 3D modeling and animation physics homework. Whatever system what the near future of 3D gaming programs? It has much the same laun- you had, it wouldn’t work on today’s holds both for PCs and consoles. As dry list of features and effects as many development projects which now com- demands on developers increase, plat- of its competitors, including multiple prise thousands of files and mountains forms diversify and pressure builds to renderers, Direct3D and OpenGL sup- of media to manage. decrease development lead time, more port, importing and exporting of most The folks at NxN feel your pain, and developers may be considering outside industry-standard 2D and 3D file for- Alienbrain is their antidote to the resources for help. mats, scads of shaders and presets, and mind-boggling complexity of manag- Renderware is based on a streamlined an SDK for customization. However, ing a game development project. The plug-in architecture that allows develop- one feature that sets it apart is its clean, client/server system includes four - ers to mix and match functionality by attractive user interface, which lacks ules to track file management, version overloading the pipeline with their own the screen-clogging blizzard of buttons control, process automation and pro- tools (physics or collision detection, for ject tracking across differ- example,) when they so desire. The PC ent user groups: “Genius” version supports Glide, OpenGL and is designed for the artists Direct3D, with a device-independent on your team, “Intelli- architecture that will enable easier port- gence” for the program- ing to consoles and tomorrow’s digital mers, “Control” is the TV platforms. command center for pro- Renderware 3 will be available by ject administrators and year’s end for PC, Playstation 2 and tool developers, and iMac at $1,000 per programmer per “Knowledge” is for pro- platform per year with no royalties, ducer-types. While the and third-party plug-in development is nomenclature won’t settle in full swing. , Dreamcast and any debates about who Nintendo Dolphin versions of Render- the real brains on your ware are also being considered. team are, each module ■ Criterion Software Ltd. Carrara’s modeling interface: its lack of clutter may contains features and Guildford, Surrey, U.K. be inviting to some, limiting to others. functionality unique to +44 (0) 1483-406200 the needs of its users. http://www.renderware.com http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER BIT BLASTS - INDUSTRY WATCH

has been hinted at, and product specs marketing campaign. Based on Industry Watch are sketchy. But the word on the street Aureal’s AU8810 processor, the is that the X-Box will be based around SQ1500 supports A3D 1.0 and features by Alex Dunne a 500MHz Intel chip, the Nvidia a 512-voice wavetable synthesizer. The GeForce 256, a DVD drive, a multi-giga- SQ2500 is based on a new version of DREAMS DO COME TRUE. Sega’s Dream- byte hard disk, and of course, some fla- the Vortex2 AU8830 processor and cast launch proved to be better than vor of Windows. Who will produce this supports A3D 2.0 with a 576-voice the company hoped, with preliminary console? Not Microsoft, apparently — wavetable synthesizer. ■ figures indicating that $97 million in Dell, Gateway and Samsung have been sales were rung up around the U.S. on lined up as manufacturers. 9/9/99. Sega claims it was the biggest 24 hours in entertainment retail sales, IT’S TEN NO MORE. Total Entertainment UPCOMING EVENTS easily surpassing the $28 million that Network (TEN) ditched its name and its The Phantom Menace took in on open- target market, deciding that the casual ing day last May. game market is more lucrative than its previous focus on hard-core players. The CALENDAR PSX2 NEWS. Carefully timed to coin- company, now called Pogo.com, is cide with the Dreamcast launch, Sony focused strictly on card, trivia, board stole some of Sega’s thunder with a and other “family” games. The site has 1999 GDC RoadTrips 8 number of Playstation 2 announce- more than 3.5 million members, and ments. The company revealed that the has lined up has distribution relation- OGDEN ECCLES CONFERENCE PSX2 will debut in Japan next March ships with @Home, Alta Vista, Cnet, CENTER (three months later than originally Excite, Go, Netscape, and Sony. Salt Lake City, Utah planned, possibly due to chip manufac- November 1, 1999 turing problems), and in the U.S. and BE LINES UP TITLES. Be Inc. and Mono- THOMPSON CONFERENCE CENTER Europe next fall. Japanese consumers lith announced that SHOGO: MOBILE AT THE UNIVERSITY OF TEXAS will have to cough up 39,800 yen ($365 ARMOR DIVISION will be brought to the Austin, Tex. at press time) for the system. Sony also BeOS. SHOGO will be developed and pub- revealed that it will distribute games via lished for BeOS by Wildcard Design. At November 3, 1999 the Internet, made possible by the ECTS, Be showed CIVILIZATION: CALL TO Cost: $120 ea. (discounts available) PSX2’s broadband support and an POWER, CORUM 3, and QUAKE 2 running upcoming hard drive Sony will sell. To on its . http://roadtrips.gdconf.com support this new means of distributing console titles, Sony is creating an elec- DELL DECISION HURTS ATI. ATI tronic transaction system, and an e- acknowledged that Dell’s recent deci- Software Development East distribution server. In developer news, sion go with Nvidia chips in its Sony will give PSX2 developers tools OptiPlex computer line will cost ATI WASHINGTON CONVENTION CENTER that support the regular Playstation $10 million in sales per quarter. The Washington, D.C. programming/debugging mode as well company still expects to meet fourth- November 8–12, 1999 as a new workstation mode for creating quarter sales projections when it Cost: variable PSX2 graphics, all on the same system. reports results on October 21, but that http://www.sdexpo.com didn’t quell some panicked investors, ENTER MICROSOFT... At ECTS, Micro- and trading of ATI’s stock was halted soft demo’d its upcoming console on both the Toronto and Nasdaq RE:Play Real World Conference (code-named the “X-Box”) to various exchanges after the company revealed developers and analysts. As we go to the cost of that lost deal. ATI points TISCHMAN AUDITORIUM AT THE press, no release date for this console out that it will still supply Dell’s note- PARSONS SCHOOL OF DESIGN book PCs, and that its relation- New York, N.Y. ship with the big computer November 13, 1999 company is still strong. Cost: free http://www.eyebeam.org/replay AUREAL LAUNCHES CARDS. Aureal entered the board busi- ness and is shipping two new Comdex Fall Aureal-branded sound cards, the Vortex SQ1500 and the SANDS EXPO & CONVENTION CENTER Vortex2 SQ2500. The new Las Vegas, Nev. cards are marketed under the November 15–19, 1999 Sony took advantage of the Dreamcast launch Aureal name by I/OMagic Cost: variable to divulge more tidbits about the Playstation 2. Corporation, and are support- http://www.comdex.com ed by a multimillion dollar

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com BIT BLASTS - PRODUCT REVIEW

I DON’T HAVE THAT KIND OF TIME. With mation needed to create a mesh that this in mind, I looked with interest at can dynamically scale from its full reso- several commercially available continu- lution down to 1 composed of ous LOD systems at Siggraph 1998. 3 vertices. This MultiRes mesh can then One of these was a very interesting sys- be used directly in your game as scal- tem developed by Intel. At the time, able content. It can also be exported the project was not quite ready to be a into the MetaStream 3D format that is product, but looked very promising. used with tools from MetaCreations to Well, at the GDC this year, Intel view scalable 3D models on the web. unveiled the fruits of this labor. They You can see an example of MRM in have teamed up with Digimation to action in Figure 1. The first image is the produce the MultiRes Software Toolkit original mesh at 6,126 vertices or and Plug-in for 3D Studio Max. 11,766 faces. I then reduced this down The MultiRes Plug-in enhances 3D to just 64 vertices for 120 faces. Obvi- Studio Max by providing a method for ously, this looks pretty bad up close, but reducing a high polygon mesh to a when the object gets far away it looks lower polygon count mesh. In this way, fine. The MRM algorithm preserved the the plug-in is similar to the Optimize outline of the arms and legs. This is routine that is built into 3D Studio where real-time use of MultiRes really 10 Max. However, MultiRes is quite a bit makes a difference. A herd of these ani- Digimation’s more powerful. For example, you can mals at full resolution would grind any set exact polygon count targets as well system to a halt. But a herd of them at MultiRes as a reduction percentage. Also, Multi- 120 polygons is perfectly reasonable. Res does an excellent job of preserving HOW DO I USE IT? If you are a 3D Studio by Jeff Lander texture coordinates and vertex normals. Max user, the plug-in couldn’t be any Artists are even able to fine-tune the easier. You simply select your model calable 3D graphics has been a reduction algorithm by a variety of con- and select the plug-in from the Modifi- major event in 3D graphics this trols as well as selecting the vertices not er panel. You can then “Generate” the S past year. With so many differ- to remove. MultiRes mesh and start interactively ent gaming platforms and such a variety As a modeling tool alone, this pro- reducing the vertex count in the of graphics cards, making content that vides a pretty powerful and useful way model. The default generation options performs similarly on all systems is a for artists to craft content. However, the do a good job of mesh reduction for real challenge. Game developers have real power of MultiRes is realized by many models. However, you can really commonly used different level-of-detail creating a multi-resolution mesh. This fine-tune the operation. models to balance the performance. special mesh file contains all the infor- The “Vertex Merging” option allows However, creating LOD models is a time you to determine whether or not consuming and tedious project for any unconnected areas of the mesh will be game artist. Furthermore, dynamically merged as the reduction proceeds. You changing between LOD models during specify the maximum distance in 3DS the game can lead to annoying popping Max units that the algorithm will con- as they switch. Graphics researchers sider for merging. This can be useful if have been promoting the idea of con- your mesh is composed of parts that tinuous LOD algorithms for 3D models. are not topologically connected. In these algorithms, the model will “Boundary Metric” gives you the smoothly scale from very high to very options with respect to any material low polygon counts. In fact, Stan Melax changes in to model. It will then try to wrote an article in this magazine about avoid collapsing vertices that cross implementing a continuous LOD sys- these material boundaries. tem (“A Simple, Fast, and Effective Most of the time, the algorithm Polygon Reduction Algorithm,” Novem- along with these options will allow ber 1998). However, creating a system you to create a good mesh. However, that handles all the lighting and texture there are times that you will want to information and smoothly integrates FIGURE 1. The bottom dinosaur’s select vertices that you do not want to into your production is a task that face count has been reduced dramati- collapse in the model. Perhaps there is could easily tie up development cally, but looks fine from a distance. a feature in the model that is distinct resources for some time. and you wish to be preserved. You can select the “Maintain Base Vertices” Jeff Lander is always trying to find a tool to make his life easier and cut down on option and then select the vertices you unnecessary work at Darwin 3D. If you can recommend any nifty tools, pass them wish to preserve. These vertices will on to [email protected]. then be maintained throughout the reduction process.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com Excellent Very Good Average Below Average Poor

The final option determines how the benefits of MultiRes are still available to meshes as triangle strips. These strips normals in the model will be handled. you. The MultiRes Software toolkit con- can be tricky to create and often require While vertices are removed, the topolo- tains all the functions you will need to custom tools to generate them. gy can change pretty dramatically. You create a scalable mesh. You simply set MultiRes provides a way to generate can simply use the original vertex nor- the parameters for the reduction and triangle strips from a polygonal model. mals throughout the reduction. Other- submit a structure containing all the However, since the model’s topology wise, by setting the “Multiple Normals vertices, normals, and faces in the changes, as the level of detail changes per vertex” option, the system will cre- model to the GenerateMRM function. an initial triangle strip would become ate new normals based on the surround- I found it very easy to take models invalid. To address this issue, the Multi- ing faces as the model reduces. This created in Softimage and convert them Res Toolkit provides a way to generate option comes at the cost of increasing into a MRM by modifying the Digima- triangle strips on the fly. Very cool... the number of update records that must tion sample viewer. This would be easy WHAT’S THE BOTTOM LINE? The 3DS Max be recorded. Whether or not this is to do for any polygonal model. MultiRes plug-in is $295. By itself, this needed depends greatly on your applica- SO HOW DO I USE IT IN MY GAME? Now I plug-in may be of use to Max modelers tion and models. have a nice MRM all ready to go and I who wish to have a better polygon That’s all there is to it. Once you are want to use it in my game application. reduction tool or want to generate happy with the reduction, you can save The examples provided with the MetaStream objects for web viewing. If it out, ready to use in your application. Software Toolkit make this easy. There you don’t use Max or really want the BUT I DON’T USE MAX. If you don’t use is both a Direct3D and OpenGL exam- game interactivity, this is probably not 11 3D Studio Max, you won’t get the bene- ple of working with a MultiRes mesh. for you. fit of this nifty plug-in. However, the One thing developers will appreciate The MultiRes Software Toolkit is that while the MRM generation func- includes three license copies of the Max tions are in a Dynamic Link Library plug-in as well as all the libraries and (DLL), all the run-time code needed to code needed to generate and display display and manipulate the meshes are continuous LOD meshes. The cost of straight C. You need no extra libraries the toolkit is a flat fee of $5,995 per fin- to ship with your project. This also ished game title. When you consider all makes it possible to use the MRM tech- the technology included and the nology on game consoles. amount of development time it would Also, as the algorithm works by take to create this functionality, this changing the connectivity of the seems like a great deal to me. meshes, the actual vertices are left Obviously, I’m not the only one who alone. This means that the MultiRes thinks this is interesting. Both Valve algorithm can work with most anima- with TEAM FORTRESS 2 and Pandemic tion schemes such as skeletal deforma- Studios with DARK REIGN 2 have licensed tion, morphing, or even QUAKE-style the MultiRes Toolkit for their upcoming mesh flipping. 3D titles. I expect many more to follow. OTHER FEATURES. The MultiRes Toolkit MultiRes is the first commercial pro- also offers another very valuable feature. ject to come out of the collaboration In order to render polygonal meshes in between Intel and Digimation. I cer- the fastest way possible, many 3D tainly look forward to other products graphics cards prefer to receive the that come of this partnership. ■

MultiRes:

Digimation Inc. Pros: Cons: St. Rose, La. 1. Full code for plug- 1. Plug-in only comes for (800) 854-4496 in and run-time modules 3D Studio Max. Users of http://www.digimation for Direct 3D and other packages must roll .com OpenGL. their own conversion Price: Plug-in is $295. 2. High-quality polygon- programs from library Software toolkit is reduction algorithm with included in SDK. $5,995 per finished great performance. 2. Toolkit cost is up-front game, including three although pretty reason- copies of the plug-in. 3. No per-copy royalties on game sales. able. Software Requirements: 3. Users will need to adapt Windows 95/98/2000/ their game engines to NT 4.0; 3D Studio Max work with the multi- FIGURE 2. The MultiRes user for the plug-in. resolution meshes. interface.

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER by Jeff Lander GRAPHIC CONTENT

The Blobs Go Marching Two by Two

his may come as a shock to some, but the world is not made up of corridors composed of completely planar surfaces. We live in a wildly organic place. Hills roll, muscles bulge and fountains splash. The world around you is T filled with organic shapes which cannot easily be created out of triangles. In fact, many of these objects are not ment (actually squared so I save some ing data but is not much of an object. even just lying around looking all math later) and the strength of the ele- What I want to create are particles that 13 organic. They slop, splash, waddle, and ment. This strength parameter defines will visually grow together as they get plop about you all the time. Many how the element will affect the space closer. You can see an example in shapes around you are even in motion. surrounding it. Figure 1. In order to create an object These objects change shape effortlessly The elements interact with each that will show this visual aspect of the as you game artists crumple under the other by creating an energy field energy field, it is necessary to define a pressure of having to model such phe- around them. This is similar to the value that will represent the outer shell nomena. When was the last time you way planets create a gravitational field of the object — the threshold. saw a nice splashing fountain in a for a solar system. It is possible to eval- The energy field varies in strength game, anyway? uate the energy of the system at an from on up at any position you Animators have faced the challenge arbitrary point in space. The formula may evaluate. In fact, there is nothing of visually creating the organic world to determine the amount of energy to keep you from defining negative we live in for some time now. To help that an element contributes to the strength for an element, creating nega- them out, commercial modeling pack- point is given as: tive regions, or holes, in the energy ages have provided the artist with tools distance = squaredDistance(&goop-> field. This is useful for effects such as for creating organic shapes. One of the position,&testPosition); denting and the like. To define the sur- methods for creating organic objects is if (distance < goop->radiusSquared) face of the object in the field, I can set through the use of blobby balls that { an arbitrary threshold giving the object can be combined together to form a falloff = 1.0f - (distance/goop-> its final shape. clay-like sculpture. The commercial radiusSquared); The threshold value defines the animation package developers have fieldStrength += goop->strength * falloff boundary between the area inside and realized the usefulness of this tech- * falloff; nique and coined all sorts of propri- } etary terms for their version. You may By running this formula over all the have seen ads for meta-balls, meta-clay, elements in your system, you get the blob-modeling, and various other ways exact field strength for that position. of combining the term “meta” with The energy field creates some interest- some form of goop. To create an object from this meta- LISTING 1. A meta-goop particle. goop, an artist drags around primitive elements, usually spheres, which repre- typedel tMetaGoop sent the rough shape of the object. { Each of these elements has a center tVector position; position and several parameters associ- float radiusSquared; The "meta-goop" seen here produces ated with it. These parameters define float strength; results that are difficult to create with how the element will interact with the }; traditional modeling techniques. particles and world surrounding it. You can see an example structure for a meta-goop particle in Listing 1. When not splashing gloop around his kitchen floor, Jeff can be found creating real- The position describes the center of time graphics applications at Darwin 3D. Fling some bits of your own his way at the element. I also need to keep track [email protected]. of the radius of influence of the ele- http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER GRAPHIC CONTENT

FIGURE 1. Our goal is to make our three particles visually grow together as they get closer to one another.

14 the area outside the shell of the object. Walking on Eggshells I could step across the entire 3D Figure 2 shows how an example thresh- space defined by entity radii and eval- old value creates a boundary in a 2D y creating a few meta-goop parti- uate the field. Anywhere the returned energy field created by three meta-goop B cles and setting some values for value is equal to the threshold, I could entities. them, I have created my meta-goop draw a solid cube the size of the steps By adjusting this threshold value for system. Run that goop through a func- taken. This sounds pretty good. the energy field, as well as adjusting tion that evaluates the energy field, Sounds like it would work. Actually, it the strength, position, and effective apply a surface threshold, and I have sounds kind of familiar. It sounds radius of individual entities, a great the surface shell for the meta-goop kind of like volume rendering of vox- variety of objects can be created. But I object defined. But the problem els for applications such as viewing still need to talk about how. remains, how do I draw it? CAT scan data. In fact, that is exactly

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com what I would be doing if I took this approach. However, rendering the energy field The Marching Cubes Patent Question this way can lead to pretty chunky look- ing images unless the step size is fairly s many of you who have met sional surface images” seems pretty small. This is because the energy field is me and heard me rant on broad to me. continuous over the entire range of the the topic know, I believe I have been told by someone via e-mail model world. However, the steps I took A algorithmic software that GE aggressively enforces this patent. walking across the field are in discrete patents are totally wrong. I feel they However, it is not clear to me how this steps. If the steps are too big, the image completely halt continued development would apply to the rendering of an isosur- can look chunky. This is analogous to down interesting research pathways by face in a game. Does this mean that any drawing a line on a computer graphics shrouding a topic with legal pitfalls. modeling program using these tech- screen. If the resolution of the screen is Graphics researchers create progress by niques must pay a license to GE? If I cre- too low, the line can look very jagged. building on the work done by others ate a game using a derivative of marching This unfortunate condition is known as before them. I like to imagine the state of cubes and it is a big hit, am I going to “the jaggies” and requires some form of the industry if Bresenham had patented receive a stealth patent letter in the mail smoothing or antialiasing to make the his method for drawing a line on a graph- demanding a percentage? How derivative lines look better. ic display and then charged a licensing does it need to be? The prior art on this Unfortunately, decreasing the step fee for every line drawn. topic seems limitless, but what can I use size in my energy field will greatly The topic of volume rendering is an as a reference and still be safe? 15 increase the amount of calculations interesting case in point. As an obvious With the record number of software that must be made. Therefore, it is nec- next step in the visualization of volume patents being filed, this is going to essary to find a way to smooth out the data, it was reported by researchers in become an increasingly difficult issue for image — sort of antialias the several publications. However, General game developers in the future. I am meta-surface. Electric apparently owns a patent on the actively researching the issue and hope technique via the Lorenson and Cline to report on the results in a later column. implementation (U.S. patent Anyone with information on the topic, CAT Scans and Game Development #4,710,876). As an actual apparatus to please let me know. In the meantime, display medical imaging data, I can always document your research from ortunately for me, the graphic understand it. However, the patenting of public journals as best you can. Igno- F visualization and medical imaging a “method for displaying three-dimen- rance is not bliss in this situation. industries have been dealing with this issue for quite some time. Wyvill and the issue (see Sidebar). object and the cube can be ignored McPheeters in 1986 and Lorenson and That aside, the way marching cubes completely. Likewise, if the corners are Cline in 1987 independently devel- works is pretty simple. Divide the all greater than the threshold, the cube oped a system called “marching region you wish to render into a regu- is completely inside the object and can cubes” which enables you to render a lar 3D grid. Evaluate the energy field at also be ignored. The only cubes that polygonal approximation of a voxel each position on this grid. Now, con- need further consideration are those field. One possible unfortunate cir- sider the grid cube by cube. If the ener- that have corners both inside and out- cumstance is that this algorithm may gy function at all eight corners of the side the meta-object. These cubes are be tainted by a software patent and I cube are less than the threshold level, on the object surface and will be part am investigating how this will affect the entire cube is outside the meta- of the final render.

LISTING 2. Finding the intersection point.

void FindIntersection( tVector *a, tVector *b, float aVal, float bVal, float thresh, tVector *result) { /// Local Variables /////////////////////////////////////////////////////////// tVector diff; float ratio; /////////////////////////////////////////////////////////////////////////////// VectorSubtract( a, b, &diff); ratio = (thresh - aVal) / (bVal - aVal); VectorMultiply( &diff, ratio); VectorSubtract(a,&diff,result); if (aVal > bVal) FIGURE 2. Creating a boundary threshold in a } 2D energy field.

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER GRAPHIC CONTENT

FIGURE 3A. One vertex inside and FIGURE 3B. One vertex outside and FIGURE 3C. Two vertices outside the rest outside create one triangle. the rest inside also make one triangle. and two inside create two tringles.

A cube has eight vertices. That rent 3D graphics hardware, the extra ping techniques to bring a water crea- 16 means that there are 256 possible com- triangles shouldn’t affect performance ture to life. I think an interesting binations of how a surface can intersect too much. application would be to combine with the cube. If you consider symme- meta-surface techniques to a particle try, the number of possibilities reduces system like the one I described last to 14. Much of the literature on surface Goopy Games summer (“Spray in Your Face,” generation using the marching cubes Graphic Content, July 1998). routine deals with optimizing for those hope it is now clear that these meta- For more fun, get my demo applica- 14 special cases. Igoop techniques can be used to cre- tion off the Game Developer web site However, there is an easier way I ate interesting organic objects suitable (http://www.gdmag.com). This will have seen termed “marching pyramid.” for real-time display. However, there allow you to play with the creation of If you consider a cube of eight vertices are several aspects that actually make meta-goop and start spreading some as being composed of five tetrahedrons them ideal for use in games. For one, slop around your games. ■ with four vertices each, the problem is they are procedurally created. Complex greatly simplified. There are now only structures can be generated from sim- F O R F U R T H E R I N F O three very simple cases to deal with. ple data structures consisting of the • Greene, Ned. “ Automata: The cases are the following: location and attributes of each particle Modeling with Stochastic Growth Pro- 1. One vertex is inside the surface in the system. There is no need to store cesses in Voxel Space (Proceedings of and the rest outside. a complete mesh. Siggraph 89).” Computer Graphics, 2. One vertex outside the surface In addition, the meta-object can be Vol. 23, No. 4 (Aug. 1989): pp. 175–184. and the rest inside. tessellated to different levels depend- 3. Two vertices outside and two ing on the initial grid size of the voxel • Lorensen, William, and Harvey Cline. inside. space. This gives the game a dynamic “Marching Cubes: A High Resolution That is all I need to consider. In cases level-of-detail component that is 3D Surface Construction Algorithm 1 and 2, a single triangle is generated. needed in these days of varying hard- (Proceedings of Siggraph 87).” Com- In case 3, two triangles are generated. ware performance. puter Graphics Vol. 21, No. 4 (Aug. You can see the three cases represented You can attempt generation of the 1987): pp. 163–169. in Figures 3a–c. objects in real time through efficient • Watt, Alan, and Mark Watt. Advanced Once the vertices of the pyramid are optimization of the surface approxima- Animation and Rendering Techniques. classified, the actual vertex positions tion routine. You could also simply Reading, Mass: Addison-Wesley, 1993. of the triangles created are obtained decide to create the objects at load time • Wyvill, Geoff, Craig McPheeters, and by linear interpolation of the corner and display them as traditional polygo- Brian Wyvill. “Data Structure for Soft values along each edge. You can see nal objects during the actual game, or Objects.” The Visual Computer Vol. 2, the code for this in Listing 2. As there evaluate the mesh only when the state No. 4 (Aug. 1986): pp. 227–234. are five tetrahedrons making up each of the goop elements changes. This cube, the number of triangles generat- kind of flexibility makes for easy inte- Web Resources ed with the marching pyramid tech- gration into a variety of applications. • http://www.students.cs.ruu.nl/ nique is greater than what would be I didn’t even discuss how the sur- people/jedik/Methods/ created from simple marching cubes. faces could be rendered. One obvious Surface_fitting/Marching_cubes.htm However, the classification and cre- choice would be to apply environ- • http://www.swin.edu.au/astronomy/ ation step is much simpler and the ment-mapping techniques to create pbourke/modelling resultant surface is a more accurate the chrome creature from Terminator 2. approximation of the surface. On cur- Likewise, you could apply bump-map-

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com by Paul Steed ARTIST’S VIEW

Mo-Cap and Keyframing, Sittin’ in a Tree

s an artist, you’ve heard at one time or another some pretty common arguments: photo reference vs. “from memory,” tracing vs. hand- drawing, or scanned images vs. hand-painted ones done in Photoshop. A However, for animators working on computer games today, there’s a new debate when it comes to character ani- done faster and better. Like any other around on his hands (Figure 1). Because mation: keyframing vs. motion capture. tool available to the computer artist/ani- of the animation system of the game, 19 Analogous to the classic Luddite/ mator today, it can be used in various affording or even showing off any type Promethean struggle that occurs still in ways to various degrees. What I’m going of complex finger animations is impos- the scientific community, animators to do is demonstrate a situation in sible. However, using a little bit of prob- tend to divide themselves into two which motion capture and keyframing lem solving Orbb becomes a great exper- camps. On one side you have the purists can be married — no, have to be married iment in evenly combining motion who believe mo-cap is the evil product together — to form a solution for one capture and keyframed animation. of technology run by marketing blow- instance of character animation. I’ll explain. Figure 2 shows a more hards. On the other you have the strate- orthographic view of our ocular, podi- gist artist who is constantly looking for atrically-challenged little friend. In the the better, faster way to get the job I’ve Got My Eye on You Q3A , each character must done. Because in the end if your artwork be divided into three distinct parts: is featured in a computer game and not eet Orbb. He’s cool. He’s a charac- head, torso and legs. The parts are tied a gallery in New York City, it boils down M ter we created for QUAKE 3: ARENA together using a simple triangle tag sys- simply to getting the job done. (with textures by Kenneth Scott) solely tem (match tab a to tab b). The head Mo-cap can and will help get the job for the weirdness of making him run and torso basically move around when you move your mouse around (free look) with the head motions slightly lead- ing those of the torso. The legs are purely locomotive and couldn’t care less what the upper body does. Of course, death animations are all-body inclusive. So in Orbb’s case his hands have essentially become his legs, his body casing became his torso and his eyeball became his head. Setting up and attaching him to a biped in Character Studio turns out looking something like what we have in Figure 3. FIGURE 1. Q3A’s Orbb marches to FIGURE 2. An orthographic view of Orbb’s pecu- Notice that I didn’t give the beat of a different drummer. liar anatomy. him arms and that the head and torso aren’t linked to an

Still a form of computer game artist concentrate (just add imported beer) nearly 35 years in the making, Paul Steed (simply labeled “Steed” for easier marketability) will hopefully be applied to a new project by the time you read this. As usual, product information can be attained by dropping a line to [email protected].

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER ARTIST’S VIEW

FIGURE 4. Orbb’s run cycle still needs work after plugging in the mo-cap data.

FIGURE 6. Adding the mo-cap data to the reversed legs gives better results.

20 posed to be arms, the elbows aren’t In adding keyframes to the fingers I quite bending right, now are they? And try to exaggerate the motions a little. FIGURE 3. Orbb has been attached those toes sure don’t look like prehen- Just as a stage actor wears tons of make- to a regular biped skeleton. sile digits. So my dilemma is how to up in order to be visible from the back make the legs act like legs while bend- row, amplifying animations is just as ing like arms. I wonder if I can turn the important in real-time games. Charac- underlying skeleton. The reason for this leg around in the up axis? First I’ll ters running around in a game like is that I intend to apply mo-cap data in detach the mesh from the skeleton, Q3A usually don’t appear very large as the form of death animations and loco- then select the upper thigh and rotate you’re trying to stuff rockets down motive animations mainly to the legs it so the knee faces the opposite direc- their throat from afar. (arms), but I’m going to keyframe the tion (Figure 5). So after applying the mo-cap data to fingers (toes), body and head anima- Cool. Now we can apply the same the arms and keyframing the hands tions. I won’t even concern myself with mo-cap run data to the now-reversed and fingers, Orbb runs like he’s sup- what the unused skeletal parts of the legs and see what it looks like (Figure posed to (Figure 8). I basically get to biped do at this point since, given 6). This looks better. Next we reattach utilize all my animation files such as Orbb’s unique anatomy, they don’t the mesh to the skeleton and keyframe deaths, jumps, backpedals, walks, shuf- matter (and I can’t delete them). those fingers...er, toes, doing some- fles, or whatever, for Orbb’s animation So, taking a motion-captured run thing cool like pushing off, flicking out set as it pertains to his legs and center cycle I plug it into the character’s skele- as they push off, and so on. Doing this of gravity. I have to make some gross ton (Figure 4). Something doesn’t quite keyframe work on the hands results in adjustments to make sure his weight look right here. If indeed those are sup- poses like the ones shown in Figure 7. distribution appears correct, but overall

FIGURE 7. Keyframing offers us the precision to devise some cool hand poses.

FIGURE 5. Rotating the legs will make them act more like arms. FIGURE 8. Mo-cap and keyframe data combined to produce our finished run cycle.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com ARTIST’S VIEW

they work out pretty well. Once the character animation because it gives rately predicting the implementation of locomotive animations are in, I you “the eye.” the data in my animations. I also didn’t keyframe the head and body casing to Simply put, having the eye means know Character Studio very well at the react accordingly. you can look at something and see it time and failed to exploit its strengths This is just one of many possible situ- to be either one of two ways: right or and allow for its shortcomings. Know- ations that can support both motion wrong. If it’s right then you can move ing your pipeline and knowing all your capture and keyframing. However you on to the next task. If it’s wrong, you software is crucial to successful mo-cap look at it, mo-cap is just as useful as keep working on it until you make it implementations. keyframing if you have a basic under- right. So many times someone shows When I did my next session I went to standing of character animation and me something or e-mails me some House of Moves. The crew at HOM defi- experience with keyframes. Rather than animation sequence and asks my nitely know their stuff and they were turning your nose up at an animation opinion. When it’s so bad that I don’t great to work with. I was quickly aid such as mo-cap, it behooves you at know where to start with a meaning- allowed to review the motions captured least to explore the potential benefit of ful critique I simply ask, “Does it look in crude wireframe playback to see if it the technology. After all, it’s just... right to you?” was what I wanted. HOM also gave me QUAKE 3: ARENA marks the first time videotape that matched the captured I’ve personally dealt with mo-cap out- moves for both review and reference. ...A Tool Like Any Other side of the annual obligatory dog-and- There were differences dealing with pony shows at Siggraph and other trade House of Moves, but the most over- 22 long time ago when I first started events. I decided to try the mo-cap whelming difference was that I suited A weight-training, I voiced my frus- route because it’s dead easy in up to do most of the motions myself. tration at being so weak. This old bald Character Studio and for the simple rea- I consider myself to be in reasonably guy from the monastery on base who son our frame rate went from 10 FPS in good shape so I wasn’t afraid of the was spotting me said, “Always remem- QUAKE 2 to 15–25 FPS (depending on physicality of the shoot. Since I’m a ber, Grasshopper, the weights are a the animation). Turning to mo-cap ham at heart I knew I could act well tool, not a measurement.” The same makes sense as frame rates increase, enough to get reasonably expressive applies to the methods and tools we since keyframing the subtle and nearly motions based on what I’d seen T.J. do use to create character animation with imperceptible nuances of humanoid at the earlier shoot, and more impor- the computer. The character animator character animation, if not difficult, is tantly, to get what I wanted from the today no more becomes a talentless at least time-consuming. The difference characters I had already created. How- hack because he uses mo-cap than a between a six-frame run cycle and a 13- ever, I fully realize that I’m in a unique master illustrator shows his inadequa- frame run cycle is obvious to say the position to have more freedom than cies because he uses photographic ref- least. Another reason is that my fellow most artists at most companies. It’s erence for his painting. animator Kevin Cloud decided to con- great being the modeler, animator, I did my first animations back in centrate on other art aspects and leave mo-cap director and mo-cap actor. I high school when I’d have little stick me to do all the models and animations get to make sure I get exactly what I people dancing along the edges of my (nice of him, wasn’t it?), so finding want and need to get the animations textbooks running, fighting, somer- ways to save time became a priority. right. I enjoyed the HOM shoot so saulting or just plain being lewd. Then However, to say that I find myself much that when I did my third session I got into comic books and began forgetting how to keyframe because just recently I decided to be the “tal- telling stories with splash pages and I’ve implemented mo-cap into the ent” once again. sequential story art (panels) à la Kirby, workflow is just plain ludicrous. Mo- This time however, I decided to try Buscema, Byrne, Golden and Miller. cap is a start and, if anything, a rough yet another company a whole lot closer Comic art or comic strips are the most timing guide to assist your keyframing. to home. Located in the idyllic, rolling basic example of keyframes. While not I have yet to implement any motion- hills and fauna of Wimberly, Tex., near as literal as flipping a page and watch- captured animation without at least Austin, Kei and the crew at Locomotion ing a little stick man come to life, each some keyframed adjustment. This is Studios provided a comfortable, relaxed panel in a superhero comic is a static not a problem for me. and professional atmosphere (except representation of a continuing dialog they didn’t have any beer stocked). and dynamic flow for which your brain The animations I went for this time (instead of the computer) provides the The Mo-Cap Experience were more scripted than the animations “tween” frames. I did at the other two studios, so it was Learning to draw and portray char- he first session I did was with Greg more important for me to give a better acters in this fashion is perfect basic T Pyros and his crew at Pyros Pic- performance. Instead being pieced training for character animation, since tures. An amazing martial artist and together and used by the characters it forces you to see things in your actor, T.J. Storm, and a fellow actress, during real-time game play, these ani- mind clearly enough to put them Bobbi, were the talent for my first run mations would be plugged into the down on paper. This translation of at making animations for the characters characters mostly as-is to be used for thought to media and, more impor- in Q3A. I learned a lot from the session, rendered cutscenes. This is a great tantly, the ability to recognize a suc- but since it was my first time I came up example of mo-cap saving you time on cessful translation is the key to better a little short in preplanning and accu- a project since the amount of work it

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com would take to make the subtle, expres- Locomotion? Soft reflector balls. Trust you tread down the motion-capture sive, realistic nuances I wanted in the me, when you’re covered with the studio path. It could mean the differ- animations would have taken far longer hard ones, your potential for lots of ence between success or failure: than I have to do them. Even in a pain while doing mo-cap is high. PREPLAN. By preplanning I mean story- worst-case scenario where the anima- board, either literally or in your mind, tion is too wooden, keyframe augmen- each move you plan on getting. Ensure tation can still save the day utilizing Just Where Do I Go for Mo-Cap? there are one or two people who track accurate timing if nothing else. and manage the process from start to In addition to offering immediate s I’ve said, time-saving is another finish (you, the artist, being one of playback of the captured animation to A attractive quality of motion cap- them). Also, come up with good file see if it was what I wanted, Locomotion ture, but one that gets argued by artists names for your motions. I usually stick took the process one step further by because of the heavy cleanup required. to a six-character naming convention filming the captures in MPEG format, That’s what mo-cap service houses because it leaves room for different ver- giving me a digital movie of the perfor- such as Pyros Pictures, House of Moves sions (takes) later on. Calculate the mance. This proved extremely conve- and Locomotion are for. You can let amount of time in seconds you esti- nient, more so than videotape. them do the clean up instead. By the mate each motion will last and then a Extremely accommodating like the time you’ve made the space, spent the total for the shoot. Use that number of other studios, they were tolerant money and trained the artists to sup- finished seconds as a starting point when I got wacky. For example, one port your own motion capture facility, when you negotiate a price. thing I did for a particular character the overall cost will be hard to beat by GET A BID. Once your list is formed, start 23 with a three-jointed leg was to walk simply going to an expert. Having dealt shopping around. Just be sure you backwards in order to give it a creepy with three of these companies that pro- have a very clear idea of what you quality when it walked forward. To vide such a service in the past year has want before presenting it to a mo-cap support this, the guys at Locomotion given me a fast and comprehensive studio. Don’t be afraid to start a bid- quickly and easily played back the ani- understanding of the motion capture ding war. These guys know how mation in reverse, which allowed me process. Understanding this process important patronage and word of to adjust my performance until I got it from start to finish is a necessity if you mouth are in our industry. right. Oh, and do you want to know plan on using mo-cap. GET GOOD TALENT. Although I really enjoy the best thing about the session at Therefore, consider the following as doing my own capture sessions, next

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER ARTIST’S VIEW

time I’ll go back to paying some- ever heard mo-cap referred to one else to hit the ground and as “Satan’s Rotoscope.” What a writhe around in real...er, mock load of crap. pain. I’ve found the key to get- I hear statements like this ting a good performance is to and I think of that e-word — find actors who are almost . Teams of people are mime-like in their expressions responsible for games today, and motions. Also remind your not individuals. Not to explore actor to go full speed and not the possibilities and benefits of slow down during performance. a new technology because you This may not be something want the pleasure of proclaim- readily apparent, but overacting ing you did it all from scratch is or being overly conscious of part of the inanity that results devices tracking your every in very late products being movement can be very obvious shipped. Sure, given all the in the finished data. I’ve had to time in the world, any anima- cut up to ten percent of the tor worth his salt can create keyframes in any given mo-cap Steed knows the importance of wearing many hats dur- convincing and supremely real- file due to the actor being too ing the motion-capture process, including this one cov- istic character animation. Well, 24 measured in his or her move- ered with reflector balls at Texas’s Locomotion Studios. we all know how much time we ments, or make substantial have to do our animations, tweaks because hands were used don’t we? to break a fall (or to remove other glar- PAY THE GUY. Guess this is the bottom But, what the hey. Let’s just say for a ing forms of anticipation). If you have line, isn’t it? Rates vary, but if you second that mo-cap is evil. The bane of the inclination and the ability, I highly shop around, like I’ve already suggest- the real artiste. If that’s the case, then recommend doing your own motions at ed, you’ll get the fairest price. The why not just toss that computer alto- least once. It makes you appreciate what price of motion capture seems to keep gether and go back to traditional cel you ask the talent to do in all those hard dropping every time I get it done. This art animation and just scan the art in? reflector balls. trend will no doubt continue as tech- Oh, but that would mean you’d have GET THE MOTION YOU WANT. Not much else I nology advances. to use a scanner. Since that evil con- can say here. You’re the client. You’re Speaking of cost, it is something to traption digitally captures images that plopping down the cash (usually 30 consider. For a small developer, using could be used in game art, such as tex- percent or so up front when you show a mo-cap studio may be cost-prohibi- ture maps, we should probably get rid up at the studio). You decide when the tive, but I’d encourage you to check it of that bit of demonic technology as captured motion is right. Insist on a out anyway. All the people I’ve well. While you’re at it, what about video or MPEG of the performance to worked with have been extremely digital cameras, model digitizers, review and just have around. If any- accommodating and flexible when heck...even photographic reference of thing, it’s something to show your boss trying to get my business. If you pre- any sort? Maybe all example of mod- and co-workers. plan appropriately and know exactly ern techniques or technologies that CHOOSE YOUR IN AND OUT TIMES. Basically, what kind of motions you want, the assist the artist in his ability to meet the in and out times are the points at end cost will reflect your degree of his deadlines with work that (gasp) is which you want the motions you see organization. sometimes better than he could have on video to start and stop recording. Another key to making a mo-cap ses- achieved on his own should be con- This is obviously just so the mo-cap sion successful is to involve the anima- signed as products of the nether realm. studio can calculate your total number tor who will be using the data. Sure, The purists would secretly be not too of seconds captured, giving you exactly those clipboard-carrying, coffee-cup- unhappy about this because then they what you want when it happens. But toting producer types have their uses could weed out the real artists from never underestimate that little hitch or and can baby-sit the fiscally irresponsi- those pretentious wannabe keyboard movement right at the beginning or ble artist if they like, but at least one of jocks. Then they could beat their chests end of a motion. While it’s prudent not the artists who will be working with in pride and reaffirm their prodigious to pay for useless seconds of idle move- the fruit of the session needs to be pre- training and stature. ment, you might be able to take a part sent during the shoot. Technophobia has no place in of one motion and use it in combina- today’s world of computer game devel- tion with keyframes somewhere else. opment. Motion capture is here to stay IMPLEMENT THE CLEANED DATA. Once the Can’t We All Just Get Along? and will antiquate keyframing about as data is delivered, plug it into your char- quickly as electronic documents have acter and see how it works. I did cap- ot too long ago, I read a couple turned our work environment into a tures for a character and decided I didn’t Nnegative commentaries on “paperless” office. In the right hands, like the implementation and just cut it motion capture in a telephone-book- mo-cap is the perfect way to aid and from the list. Occasionally, some things sized tome dedicated solely to charac- enhance the keyframe animator, not really do just look better on paper. ter animation. This was the first time I replace him. ■

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com by Omid Rahmat HARD TARGETS

A Tale of Two Channels

C gaming appears to be the technological peak of game development. However, the advent of Sega’s Dreamcast, Sony’s marketing of Playstation 2 technology, and the intriguing prospects of Nintendo’s Dolphin system P have helped to promote greater anticipation for the console. Even Nintendo’s Game Boy has shown companies in the U.S. alone that act as powerful platforms with multimedia phenomenal growth in 1999 and is middlemen for computer manufactur- and online capabilities. Next-genera- attracting new titles and developers to ers, and who supply systems, upgrades tion consoles may not be PCs, but they the color version, while the next- and services to users. In such a large, don’t aim to sit on someone’s office generation, 32-bit Game Boy “Advance” competitive market, specializing in LAN, either. is slated for release late next year. All hardware sales to game players would 27 these comparisons of platform tech- make little sense, and trying to compete nologies aside, the biggest obstacle to in the arena of PC gaming software is The Console Player’s Choice success in the PC gaming market is the unlikely to enliven any reseller’s bot- structure of the PC business, which is tom line. t the third annual Electronic built around the sales of PC hardware to By contrast, a fully configured net- A Gaming Summit this past August, businesses and education outlets. work of systems for a small business or Ziff-Davis announced the results of the Games may be ubiquitous, but the PC corporate customer has potential for Video Gaming in America research industry still sees the game industry as a lucrative service and support contracts, report. This report found that purchase marginal interest, and sometimes solely or may be solely beneficial in selling a impact is influenced more by brand as a means to sell the latest CPU. reseller’s software expertise. So, while power of a character or game than by Examining the market of console game the $125 billion in sales that the PC the knowledge of the publisher or users and the channels for console prod- channels produce is an impressive developer. Surprisingly, the buying ucts is a sobering lesson in how far the number, it’s spread across a vast mix of habits of game players, according to the PC industry has to go to become con- dealers and resellers. These consist of report’s findings shown in Chart 1, sumer-savvy. value-added resellers (VARs), retailers, point out their preference for discount The PC game business has always distributors, systems integrators (SIs), stores where impulse buying and pric- been hampered by a lack of shelf space mom-and-pop stores, and everything ing play a key role. Console games seem and sufficient sales outlets. This situa- from a single-person consultancy to big to have better branding and get into tion is unlikely to be resolved while the service companies such as EDS. Stacked the places where the most buying market remains driven by the upgrade up against these hardware-driven dis- occurs. This is despite the fact that at cycles of Microsoft and Intel. In the tribution channels is a console business places like Wal-Mart, PC games have to meantime, the console gaming market driven by cute game characters and be priced below $20 to qualify for sig- is benefiting from penetration into mass-market promotions. nificant sales. If that weren’t bad both traditional retailing channels and Simply put, PC channels are relative- enough, the reputation of consoles as existing PC sales channels. ly young compared to the retail chan- high-technology products, which is nels that console games have penetrat- reflected in the sales of console games ed. PC channels are as old as the PC, through computer superstores. Channels Young and Old while retail channels date back to The other advantage that the console before the electronic age. This points market has is rentals. “Core” game play- hile online sales of PC products out the gaping chasm of consumer ers (defined in the report as those con- W is considered to be a hot area of savvy between traditional PC sales sumers who purchase two or more growth, the vast majority of sales still channels, and the retailers that thrive games per month) are averaging more come from third-party retailers and dis- on N64, PSX, and Game Boy products. than three rentals per month, while tributors who rely on their expertise Furthermore, the next generation of “casual” players (defined as those who with applications to serve a desired console products promises to constrict purchase fewer than two games per market. It’s rare to find a reseller or sys- the PC gaming market by providing month and play fewer than four times tem integrator that is focused on games. In contrast, console products are Omid Rahmat is the proprietor of Doodah Marketing, a digital media consulting predominantly retail-based and require firm. He also publishes research and market analysis notes on his web site at no third-party support or intervention. http://www.smokezine.com. He can be reached via e-mail at [email protected]. For PCs, there are more than 100,000 http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER HARD TARGETS

per week) average about 1.4 CHART 1. Game players are shopping across all outlets (source: Ziff-Davis). rentals per month. The real kicker is purchase rates after 100% rental are 84 percent and 65 percent respectively for core and casual players. Video rental outlets can devote any- 80% 1998 1999 where from 10 to 20 percent of their shelf space to games, but generate in excess of 60% those figures in percentage of revenues from rentals. There is really no mechanism in 40% place, or likely to be put in place, to create the same rental opportunity for PCs. The PC always has the benefit 20% of the limited demo software package bundled with game 28 magazines and available for 0% N/A

download, but these options Toy Other Video Stores Stores Stores Stores Stores Stores Stores

pale in comparison to being Stores Internet Discount Specialty able to take a game home to Computer Mail Order Electronics Warehouse Bookstores play in full for three days. Department Another interesting find- ing in the report is the influences on significant marketing budget to spend, “cute” character brands of console players’ purchasing choices across core or PCs end up costing $100, and you games. At a more specialist level, the PC players, casual players, and “average” can load 10 games within 60 seconds. has programmers like John Carmack players (defined as consumers who pur- and designers like Sid Meier, but the chase fewer than two games per month console industry has Shigeru Miyamoto but play four or more times per week), The PC Branding Problem and David Perry. shown in Chart 2. Friends, television, To reconcile these two worlds, PC and in-store game demos played a key C games, with some exceptions, game channels have to get closer to role here. In-store demos of PC games P tend to be more sophisticated sim- the console market in terms of mar- are unlikely to happen anytime soon, ulations and immersive environments. keting sophistication and audience unless you have a publisher with a very As a result, PC games lack some of the appeal. PC gaming will not ultimately die, but it will become cor- nered, and that will affect CHART 2. Consumers’ sources for videogame purchasing information (source: Ziff-Davis). the flow of new talent into the industry. That in turn 80% would affect innovations in "Core" "Casual" "Average" Players Players Players technology and titles. It looks like the console mar- 60% ket has finally grown up, and now it’s time for the PC market to do the same. But it won’t happen until the 40% gaming industry figures out how to break the infrastruc- ture of PC sales channels. Recently, the Good Guys 20% chain of electronics stores announced it was ceasing PC sales, CompUSA said it would close some of its stores, and 0% OfficeMax has felt the drain

TV of lower PC prices and prof- Store Radio Game Advice

Friends its. Meanwhile, displays of Internet In-Store In-Store Outdoor Displays Billboards Packaging

Magazines console games and hardware Videogame Newspaper Magazines General Sample Disks Game Demos

Salespeople’s in CompUSA stores continue Publisher /Retail to grow. ■

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 PROGRAMMING Pig Ced Sface Wk he Nied 64

by Mark A. DeLoura

ame console programming is largely a secret 30 art. The technology and APIs are kept hidden

by nondisclosure agreements, and you won’t

find development kits for game consoles at

your local software store. As a result, pro-

gramming for game consoles is something

you just don’t hear much about.

While specific techniques for program-

ming Nintendo’s current game console are well-known within that particular devel-

oper community, they are virtually unknown among PC developers, or developers

looking to do cross-platform titles. This article will give you some insight into the

inner workings of the Nintendo 64 (N64). Much of what I’ll discuss in this article

hasn’t even been released to authorized N64 developers. Nintendo has chosen to

Mark A. DeLoura ([email protected]) is the software engineering lead for the Product Support Group at Nintendo. He’s been working on the Nintendo 64 since the first hardware dev kits showed up, and he damn near cried the first time he booted up SUPER MARIO 64. Now he’s working on high-tech wizardry for Nintendo’s next-generation console, Dolphin.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER N64 PROGRAMMING

pull back the covers to help special features of the RSP, it is developers squeeze the last very well-suited for computa- ounce of performance out of the tionally heavy tasks such as 3D machine. We hope that this arti- graphics calculation and audio cle will help N64 developers do mixing. just that, and encourage other In addition to 32 32-bit developers to explore N64 pro- scalar registers, the RSP gramming. includes 32 128-bit vector reg- After a quick discussion of the isters. These vector registers N64 architecture, we’ll dig can be addressed in a variety of down deep and design some ways, but they are ideally used custom Reality Signal Processor as eight shorts (also called vec- (RSP) microcode, which tessel- tor slices). Each slice has a 48- lates a Bézier surface as shown bit accumulator associated in Figure 1. The RSP is a very with it that can be used to powerful custom chip in the store intermediate results. N64, and until now the details FIGURE 1. This Bézier surface has been tessellated by Using the vector registers and of programming this chip have the microcode we develop in this article, and rendered accumulators, a vector opera- been kept secret. In a sense, we by a Nintendo 64. tion can be performed which 32 at Nintendo have decided to let multiplies two vectors and the cat out of the bag. You’ll get adds the result to the current a feel for the incredible power of this takes this information, loads the tex- accumulators, giving 16 calculations in chip and see why N64 is capable of ture cache from RDRAM, and renders one cycle. great 3D graphics with features that fully MIP-mapped, anti-aliased, Z- The RSP can actually execute a vector still aren’t available in consumer 3D buffered triangles to the frame buffer. operation and a scalar operation each cards. This design leaves the CPU free to per- cycle. This means that it’s possible to form physics calculations, advanced do 17 calculations per cycle. With care- artificial intelligence, sound process- fully tuned microcode, it is possible to Nintendo 64 Architecture ing, and other game functions. reach a maximum of just over one bil- lion operations per second. he Nintendo 64 is designed around T two main processing components RSP Architecture (Figure 2). These two elements are a The Microcode MIPS R4300i CPU, and the Reality Co- he RSP is modeled on a general- Processor (RCP), which is a custom chip. T purpose 32-bit RISC processor. It his high-speed programmable The simplicity of this architecture includes 4KB of memory for code T architecture was very forward- makes N64 programming very straight- (IMEM) and 4KB of memory for data thinking at the time the Nintendo 64 forward. In addition to these processors, (DMEM). Programs which execute on was designed. It has enabled Nintendo the N64 contains 4MB of Rambus the RSP are known as microcode. to provide a set of standard microcode DRAM (RDRAM), four controller ports, Nintendo provides a standard suite of libraries which make 3D programming and a cartridge port. The memory is microcode to all N64 developers, easier for the novice. At the same time, expandable and a 4MB Expansion Pak is including 3D transformation and light- elite programmers are able to code up currently available. ing code, line-drawing code, sprite rou- special routines which are optimized The N64’s custom RCP runs at tines, and audio processing. Due to for their own games or enable unique 62.5MHz. It is pri- functionality. marily composed During the life span of two parts: the of the N64, the 3D Reality Signal performance has Processor (RSP) nearly doubled as a and the Reality result of microcode Display Processor optimizations. (RDP). The RSP processes display lists which are sent Microcode from the CPU. It Execution performs all FIGURE 3. An example command matrix and vertex from the standard N64 3D graphics irst let’s talk a computations and microcode. This command turns on F little about the outputs triangle FIGURE 2. The Nintendo 64 architec- using a specific tex- structure of microc- commands to the ture is simple and elegant. ture tile. ode and how to use RDP. The RDP it. Microcode is exe-

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 PROGRAMMING

cuted through the use of an RSP Using Curved Surfaces task. Tasks are command lists (graphics display lists or audio ith this basic under- commands) which indicate a W standing of the N64’s series of operations for the workings behind us, let’s move microcode to perform. They are on to the main focus of this executed in parallel with the article, using curved surfaces. CPU. In order to start an RSP Curved surfaces are not sup- task, you create the command ported in the standard N64 list and pass it to the RSP along microcodes. But if you want to with pointers to the microcode render curved surfaces, it makes and various buffers that the a lot of sense to do the heavy microcode needs. Then you call computations required on the a simple function to start RSP vector processor. Now, we’re execution and control is imme- not actually going to render diately returned to the main pro- curved surfaces. We’ll take a gram while the RSP begins pro- FIGURE 4. Bézier surfaces are defined in a biparamet- curved surface representation cessing commands. ric space. Sixteen control points are used to define the and tessellate the surface into The RSP can communicate surface completely. polygons which the N64 then 34 with the RDP or CPU during renders. execution if necessary. For For our purposes here, we are example, most versions of the 3D and stored in separate registers before going to use Bézier surfaces. A Bézier microcode communicate with the jumping to the function requested. surface is a curved bicubic surface, sim- RDP, feeding it triangles and other ilar to Hermite surfaces, B-spline sur- data to render to the frame buffer. faces, and NURBS. The Bézier is mathe- Other versions of microcode commu- The DMA Engine matically complex enough for us to be nicate with the CPU when data is able to create interesting surfaces, ready. For example, the Z-Sort microc- he RSP includes a set of registers while not being so difficult to compute ode can be set up to alert the CPU T which control the DMA engine. that we’re only going to be able to do a after a number of objects have been Since there may be multiple requests couple per frame. If you need to brush processed so that the CPU can work for DMA pending, the microcode must up on curved surface technology, on these objects in parallel. When the check the DMA Busy register before check out the list of references at the RSP completes the task, it signals the submitting its request. If a request is end of this article. CPU so that the user program can being processed and there is already There are a number of algorithms send the next RSP task or use this another request pending, the micro- we could use to tessellate a Bézier sur- information for synchronization. code must wait face. First, let’s quickly look at the before sub- standard equation and mitting a the algorithm The Command Loop request. A we’ll use in request is the micro- he microcode command loop made by code. T sequentially goes through com- altering the mands which have been DMA’d into DMA Source, DMEM from the command list. Simi- DMA Destination, lar to assembly language instructions, and DMA Length the commands have bitfields which registers. Once the indicate the RSP function desired. In length is written to the the microcode command loop, the DMA Length register, the opcode and subopcode bitfields are DMA engine queues the If masked off and used as an offset into request and begins the you’re the function jump tables (also stored transfer if no requests inter- in DMEM) to determine the IMEM are pending. The ested in function location. transfer executes in the back- In the standard graphics microco- parallel with the ground of des, each command is a 64-bit double- RSP so control Bézier surface word. The opcode and subopcode are is immedi- algorithms and contained in the upper bits, and lower ately want to learn more about why I’ve bits are reserved for data being passed returned chosen this one, please see the as function parameters as shown in to the expanded version of this article (with the example in Figure 3. The data bit- micro- Bézier surface derivation) on fields are masked off in the main loop code. .com.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 PROGRAMMING

Bézier Surface Equation curved surfaces, June–July 1999.) 4. Save surface vertices (segment The central differencing algorithm address). Bézier surface is a parametric sur- has a hefty initialization cost due to 5. End display list. A face (u,v = [0,1], [0,1]) defined by the computation of second partial I’ll describe these commands further in its 16 control points pij which form a derivatives (Quu, Qvv, Quuvv) at each a moment. 4×4 grid, as shown in Figure 4. The corner control point. But every curve Since we only have five commands, common form for representing this subdivision after that will only cost us we can just use a 3-bit field for the surface is: 18 additions and 18 multiplies. The opcode. Fortunately, the standard 3 3 memory footprint is 24 bytes per subdi- graphics microcodes all use a 3-bit ()= () () Quv, ∑∑ pBuBij i j v , and there are 77 subdivisions opcode field and 6-bit subopcode field, = = i 0 j 0 necessary to create our mesh. This will so we’ll use that. But we’ll just wedge all

The functions Bi(u) and Bj(v) are the fit in our 4KB DMEM nicely. our instructions into the subopcodes for Bernstein polynomials which are also one primary opcode. Then we can reuse used for Bézier curves. a lot of the main command loop rou- The edges of a Bézier surface are each Writing the Tessellation Microcode tines from the standard microcodes, Bézier curves. Since only the end con- including the display list DMA routine trol points of Bézier curves lie on the ow that we’ve chosen the algo- that loads commands into the DMEM curve, we can extrapolate that the cor- N rithm to tessellate the surface, buffer for us. The low bit of the opcode ner points of the surface are the only let’s get back to work on the microcode field and subopcode field are not used. 36 control points which lie on the surface. itself. The first things Since microcode function addresses All twelve of the other control points we need to fig- stored in DMEM take up two bytes influence the shape of the surface, but ure out are the (address range 0–4095), our jump table are not on the surface itself. For this commands should be indexed on even bytes only. article, we’ll create a microcode that we need Not using these low bits ensures that we tessellates a Bézier surface into an and the have an even index without performing 8×8 grid of quadrilaterals. com- a shift or multiply for every command. mand The parameters for our commands are struc- pretty straight-forward. The most com- Tessellation by Evaluation ture. plicated command sets a segment regis- We’re ter for address computations. It requires he most direct way to slice a going to a segment number and physical address. T Bézier surface into polygons use a We’re using a 16-address segment table is by calculating the above (u,v) 64-bit in the RSP, so it’ll take four bits to hold double summation on a regular double the segment number. The addresses are grid. Performing this in a very word for our 32 bits, so we’ll use the second half of optimized way, each surface command size. the 64-bit double word for the address. vertex we calculate requires 54 That will give us Then we’ll use the upper nine bits for additions and 108 multiplies. plenty of the opcode and sub- That’s a lot of work to do opcode fields when we’re planning to create and follow a 9×9 grid of vertices. it with four bits for the Central Differencing segment address. he way we’re going to generate You can see T points on the Bézier surface in our command this article is through the use of central structure in Figure 5. differencing. Central differencing gives us an easy way to find the midpoint of a Bézier curve without having to keep Getting Data In and Out track of control points for each sub- curve. We can split the edge curves at room to store the data for each com- efore we code up the tessellation their midpoints, and then split the sur- mand inside the instruction. The com- B algorithm, let’s figure out how to face across these midpoints to create mands and parameters necessary for get data in and out of DMEM. The “set four subsurfaces. This process can be our tessellation microcode are: RSP segment” command fills an entry repeated recursively to create an arbi- 1. Set RSP segment (segment number, of our 16-entry segment/offset table, trarily fine mesh. (For details on this physical address). which is stored in DMEM. This table algorithm please see the previously- 2. Load control points (segment makes some programming tasks easier, mentioned article on Gamasutra.com, address). such as swapping the frame buffer each or Brian Sharp’s series of articles on 3. Perform tessellation. frame. The segment table stores 24-bit

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 PROGRAMMING

coordinates an effective range values as well. We’ll have to tweak our of +/– 32KB. It makes sense for math to minimize overflow and under- us to use this same format for flow, but it will pay off in performance. control points, but since we’re One final note on formats. Each vec- just tessellating, we really only tor register contains eight vector slices. need the point position. Rather But each of our points contains three than wasting the extra space values (x, y, and z). We’re really just for colors and texture coordi- going to make things confusing if we try nates when we DMA the con- to stuff two of three coordinates from trol points into DMEM, our for- one vertex into a vector register, along FIGURE 5. Our command structure is similar to mat will only represent the x, y, with two other vertices. So let’s insert a the structure of standard N64 microcode com- and z position as signed shorts. junk (we’ll call it j) field at the end of mands. We use this structure for all of our com- The surface vertex format is each of these vertices. This will also give mands. more complicated. The central us much better alignment in DMEM. difference algorithm describes Now that we have our formats four sets of values that each ver- defined as in Listing 1, it’s a simple task offsets which are added to any address tex needs to track. These are: to convert from one to the other. Actu- sent to the RSP. The segment table 1. Q(u,v): Position ally, all we need to do is copy the 64

index is stored in bits 24–27 of the 2. Quu(u,v): Second partial derivative bits from each corner control point (x, 38 addresses passed in. The low 24 bits of in u at this vertex. y, z, and j) into the beginning of each the segment address are added to the 3. Qvv(u,v): Second partial derivative corner surface vertex. 24 bits stored in the segment table. in v at this vertex.

Since our physical address range is 4. Quuvv(u,v): Second partial derivative 0–0x007fffff (8MB), 24 bits is enough. in u of the second partial deriva- Corner Initialization Prior to tessellation we need to load tive in v at this vertex. the control points into DMEM. Our All of these values are vectors of x, y, ow we need to compute the sec- “load control points” command simply and z. Since the vector slice size of the N ond partial derivatives described takes an address as a parameter. The RSP is 16 bits, and the control point above for each corner of the surface. address is passed to the segment coordinates are 16 bits, we’re going to Fortunately, the second partial in u address translation routine, which uses stick with 16 bits for these coordinate and the second partial in v at each the segment table to convert the address to a physical address. The DMA LISTING 1. Formats for data storage in DMEM. The j fields are unused, we engine is called to bring the 16 control include them for data alignment. points into DMEM from this physical address. struct ControlPoint { After tessellation, we need to save s15 x, y, z, j; the surface vertices we’ve computed, }; using the “save surface vertices” com- mand. We’ll pass in an address and the struct SurfaceVertex { segment address translation routine s15 qx, qy, qz, qj; will convert it to a physical address. s15 quux, quuy, quuz, quuj; That physical address is used to pro- s15 qvvx, qvvy, qvvz, qvvj; gram the DMA engine to copy our 81 s15 quuvvx, quuvvy, quuvvz, quuvvj; surface vertices to RDRAM. }; The “end display list” command sim- ply flags the RSP to quit. It executes a break, which signals the CPU, and LISTING 2. Pseudocode for computing Quu(0,0) and Qvv(0,0) using vector alerts our main program. processing.

# Load the vector registers with point data Data Formats vload vectora, P[0,0], P[0,0] # = x y z j, x y z j vload vectorb, P[1,0], P[0,1] he first thing our “perform tessella- vload vectorc, P[2,0], P[0,2] T tion” command does is perform a simple translation from control point # Do vector computations to simultaneously compute quu and qvv. format to surface vertex format. So let’s vadd vectord, vectora, vectorc # D = A+C talk about these formats. vmul vectore, vectorb, vconst[5] # E = B*(-2) The Nintendo 64’s standard vertex vadd vinter, vectord, vectore # inter = A-2B+C format uses 16-bit coordinate ranges, vmul v00, vinter, vconst[3] # v00 = 6*(A-2B+C) which are s15 quantities (one sign bit vstore2 v00, v00uu, v00vv # Store results to uu and vv fields and 15 integer bits). This gives vertex

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 PROGRAMMING

corner control point can be computed with similar equa- together the Q and Qvv computations. That’s because both of tions that use different points. Here are the equations to these are very similar computations. For Quu and Quuvv we’re perform at control point (0, 0): doing this: =−+ QPPPuu ()00, 6 ()00 2 10 20 Qu()+ Qu() Qu()= uu01 uu uu mid 2 QPPP()00, =−+ 6 () 2 vv 00 01 02 QuQu()+ () Qu()= uuvv01 uuvv We need to do this computation in x, y, and z for each uuvv mid 2

equation. This is a great place to take advantage of vector The computations for Q and Qvv depend on the prior com- processing. We’ll do this operation in parallel, computing putations, so we do them second. They look like this: both equations for x, y, and z simultaneously. First, we load both sets of control point positions into the vectors, as Qu()+ Qu() shown in pseudocode in Listing 2. Then just a few vector Qu()= 01−∗()dusqhalf Q() u mid 2 uu mid computations are performed and all coordinates are simul- Qu()+ Qu() taneously calculated. ()= vv01 vv −∗( ()) Quvv mid dusqhalf Quuvv umid Note that we have the constants –2 and 6 stored in a vec- 2 tor constants (vconst) register, which makes it easy to multi- ply each slice in another vector by each Most of the opcodes you see in the microcode scalar. Using vector processing we’ve listing make intuitive sense. But one that 40 reduced two additions and two bears explaining is vmudm. The RSP pro- multiplies for each of six coordi- vides many multiplication opera- nates to just two additions and tions. They vary depending on the two multiplies total. sign of the operands and whether We can perform this same the operands are fractions or

process to compute Quuvv. integers. The vmudm opera- But we’ll have to pair up tion performs multiplica- the operations. We have tion of signed integers four control points, the by unsigned fractions. corner points, which we The resulting integer need in order to calcu- part of each vector slice

late Quuvv. We can com- computation is stored in pute two separate con- the destination vector reg- trol points ister (first operand), and simultaneously by jam- the 32-bit integer/fraction ming them into the same vector and doing results are stored in the vector operations. So we’ll perform this accumulator slices.

process twice in order to compute Quuvv for This microcode currently is all four points. not optimized for dual process- ing, nor for accumulator storage of intermediate results. Vector Surface Subdivision loads and stores are scalar opera- tions, so we could easily tighten this or code simplicity, we’re going to subdivide microcode up by executing loads and stores in parallel with F the surface iteratively, not recursively. We’re going to vector operations. subdivide many times, so let’s make a function out of it. What do we need to pass to this function? Well, we’ll need the data for the endpoints of the curve we’re splitting, and a Performance Figures du value which is the distance in parametric space from the midpoint to the endpoint. This is 0.5 for our first subdivi- alculating a regular grid of points on the Bézier surface sion. For simplicity, we’ll pass in the value (du)2/2 so we C using the standard double sum equation is a not a very don’t have to compute the square and multiply by one-half efficient way to tessellate. Using floating-point arithmetic on each time we use the function. We’ll also stuff this value in a the CPU, this process took 272,500 CPU cycles. While cen- vector slice so that we can use it in vector computations. tral differencing has a large performance cost at initializa- We’ll call the vector which contains this value vecdusqhalf. tion, the subdivision step is very fast. Implemented on the Our function ends up looking like this (there will be one for CPU, it takes 70,400 CPU cycles to tessellate our surface. u-curve splits, and one for v-curves): When we moved this algorithm to the RSP, we made some void tesselSubdivide[U|V](Vertex v0, Vertex v1, Vector vecdusqhalf) sacrifices. We used 16-bit fixed-point arithmetic and took a The microcode for the tesselSubdivideU function appears in hit for DMA-ing data to and from the RSP. But our algo- Listing 3. The function tesselSubdivideV will be very similar. rithm, including RSP load and save time, runs in just 16,600 The first thing you’ll notice in this code is that we block CPU cycles. And the CPU itself is free during this process to

together the Quu and Quuvv computations. We also block do other computations.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com N64 Optimizations Keep the LISTING 3. Microcode for the tesselSubdivideU routine.

Platform Fresh ######################################################### # tesselSubdivideU e’ve examined how Bézier sur- # W faces can be implemented on # Subdivide this curve in the U direction the N64 using a central difference tes- # sellation algorithm in microcode. The payback we got for choosing a more # Surface Vertex structure offsets efficient surface tessellation algorithm .symbol VERTEX_POS, 0 and pushing it onto the RSP was sub- .symbol VERTEX_UU, 8 stantial. .symbol VERTEX_VV, 16 Technically, the N64 is still a power- .symbol VERTEX_UUVV, 24 house. Programming the microcode and taking advantage of vector pro- # Register aliases cessing gives developers the ability to .name pnew, $10 # Position of output surface vertex (u) implement algorithms that aren’t fea- .name pminus, $11 # Position of input left surface vertex (u-du) sible on much bigger and faster CPUs. .name pplus, $12 # Position of input right surface vertex (u+du) In addition, learning to program the .name vecdusqhalf, $v6 # Vector which contains 0.5*du*du in slice 0 N64 now will give developers a big .name vecminus, $v7 # Vector for storing left surface vertex info 41 advantage when it comes to next-gen- .name vecplus, $v8 # Vector for storing right surface vertex info eration console development (includ- .name vecuus, $v9 # Temp vector for UU and UUVV computation ing Nintendo’s upcoming system, cur- .name vecuushalf, $v10 # Final results of UU and UUVV computation rently known as Dolphin), many of .name vecposvvsinter, $v11 # Temp vector for POS and VV computation which use vector processing. If you’re .name vecposvvshalf, $v12 # Temp vector for POS and VV computation interested in becoming an N64 devel- .name vecmulleduus, $v13 # Temp vector for POS and VV computation oper, or if you are an N64 developer .name vecposvvs, $v14 # Final results of POS and VV computation and you want to know about microc- ode development kits, please contact .ent tesselSubdivideU Nintendo by sending e-mail to tesselSubdivideU: [email protected]. ■ # Do quu and quuvv computations together F O R F U R T H E R I N F O ldv vecminus[0], VERTEX_UU(pminus) Books ldv vecminus[8], VERTEX_UUVV(pminus) Watt, Alan, and Watt, Mark. Advanced ldv vecplus[0], VERTEX_UU(pplus) Animation and Rendering Techniques: ldv vecplus[8], VERTEX_UUVV(pplus) Theory and Practice. New York: ACM vadd vecuus, vecminus, vecplus # Add endpoints Press, 1992. vmudm vecuushalf, vecuus, vecconst[1] # Mul by one-half

Periodicals # Do qpos and qvv computations together Clark, J. H. “A Fast Scan-Line Algorithm ldv vecminus[0], VERTEX_POS(pminus) for Rendering Parametric Surfaces.” ldv vecminus[8], VERTEX_VV(pminus) Computer Graphics Vol. 13 No. 2: pp. ldv vecplus[0], VERTEX_POS(pplus) 289–299. ldv vecplus[8], VERTEX_VV(pplus) Game Developer vadd vecposvvsinter, vecminus, vecplus # Add endpoints vmudm vecposvvshalf, vecposvvsinter, vecconst[1] # Mul by one-half Sharp, Brian. “Implementing Curved vmudm vecmulleduus, vecuushalf, vecdusqhalf[0] # uus/2 *(du^2)/2 Surface Geometry” (June 1999) and vsub vecposvvs, vecposvvshalf, vecmulleduus # Subtract... “Optimizing Curved Surface Geometry” (July 1999). # Store everything Gamasutra sdv vecuushalf[0], VERTEX_UU(pnew) For a detailed derivation and compari- sdv vecuushalf[8], VERTEX_UUVV(pnew) son of Bézier surface algorithms, see sdv vecposvvs[0], VERTEX_POS(pnew) the expanded version of this article at jr return http://www.gamasutra.com. sdv vecposvvs[8], VERTEX_VV(pnew) .end tesselSubdivideU Bézier Surface Microcode Source If you're a Nintendo 64 developer, log on to Nintendo’s developer web site at https://www.warioworld.com.

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER RESOURCE MANAGEMENT The Big Seee: Rece Maageme Dig Y Cle P by Michael Saladino

eveloping games for consoles often requires tight 42 resource management. Trying to fit all your

textures, sounds, and polygons onto the

machine is difficult enough, but then

consider that your monsters, explosions,

and bullets must live in this same place

along with your program code. It’s a tight fit.

But resource management is much means that if you’re thinking about recently-released specifications for the more than just dealing with size con- developing for consoles, you’re proba- Sony Playstation 2 reveal that the sys- straints. You also have to properly allo- bly considering this system. The tem will have 32MB of main memory. cate andD freeD resources, which, if Playstation’s massive consumer market But since it’s currently in development, ignored, can quickly turn into hiding is the good news, but the bad news is that might change.) In other words, places for numerous bugs. Fortunately, that its market is the only big thing the PC has a huge leg up on consoles as there are ways to deal with these prob- about it — the system itself is very lim- far as main memory goes and it doesn’t lems. It just requires planning and ited when it comes to resources. The look as if that will end anytime soon. implementing some helpful tools. Playstation is a small system with only Keeping these restrictions in mind First, let’s see what we’re getting our- 2MB of primary memory. The when developing a game is critically selves into when we start talking about Nintendo 64 isn’t much better at 4MB. important, especially if you want to do developing for a console. For this article, The newest kid on the block, the Sega simultaneous PC/console development my focus is on the main memory, so Dreamcast, comes to the table with a (or worse yet, if you decide partially we’ll ignore video and sound memory. more impressive 16MB of memory but through your PC development to try The current champ of the console it will sometimes have Windows CE porting it to a console). Many of the wars is the Sony Playstation, which taking a slice of that space. (Also, the newest PC games require 24 or 32MB

Michael Saladino is currently the lead programmer on STAR TREK: HIDDEN EVIL at Presto Studios Inc. His previous work has found him at Volition Inc. during the development of DESCENT: FREESPACE and at Mobeus Designs Inc. Contact him at [email protected] or just drop by his office for a late afternoon cocktail where he can be found exploring improved living through crushed velvet.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com of loaded resources, so trying to fit efficiently. A good that into a console is a daunting task. way to handle this It’s comparable to trying to fit an ele- data is with a mem- phant into a Volkswagen. And don’t ory pool manager. expect consoles ever to catch up. PCs A memory pool and consoles both use the same mem- manager is a piece ory components and therefore on- of code that han- board memory sizes for each are dles large collec- increasing at the same rate of approxi- tions of dynamical- mately four times every three years. As ly created data of a long as PCs cost many times more common type. than consoles, they will always have With this layer of more memory. code, we can han- So, you have a game that barely fits dle the allocation, onto a PC, and then the producer starts de-allocation, and talking about porting to a console. usage of these data What do you do? Well, it’s an old story elements. We can in game development: A group of pro- also keep track of Hungry common data types. These monsters’ polygons are grammers just start building a game important statistics part of a cyclic memory pool. and before they know it, they’re at about the data such 43 80MB of resources with no idea how as the greatest they got there. Then they end up number of bullets that was ever in exis- which happen to be tied to the frame spending many man-months trying to tence at one time during an execution cycle. You the data fresh every shrink the game to fit on a consumer of the game. Knowing these statistics frame, and at the end of the frame you PC. At that stage, the idea to port the can be very helpful in setting maxi- dispose of all that you created. Looking game to a console has to remain exact- mums that help compress your game’s through a game’s code base will most ly that — an idea. You could never get footprint onto a given system. I divide likely reveal many more algorithms it on a Playstation at that stage. my memory pools into two separate that use this type of data. It’s all too easy to allow this scenario versions. The first is responsible for One way to manage this data is to use to occur because most game program- handling data types which cannot a linked list that grows dynamically mers use systems with at least 128MB have a maximum number of elements along with the data. This is easy but not of memory, and many games can go forced onto them. However, they must very fast. First, you must call malloc (or well into their second half of develop- share the common trait that they are new) for every element you create. For ment without anyone ever seriously always allocated and de-allocated in some data types this could easily be looking at their memory footprint. two independent stages. The second thousands of times per frame. But since Code, much like a gas, expands in vol- type of memory pool handles data these data elements need to be truly ume to fill its container. Therefore it’s types that have a limited number in dynamic, a pre-allocated array will not up to the responsible programmer to existence at any given time, which work. Therefore, combining these two set a clear goal for the size of the code lends itself well to a temporal caching choices into a hybrid is what is called base, know where it’s going, and make system. for. This is the first type of memory sure that it stays on course. The basic pool. ideas about memory management that This memory pool allocates large I will explore are ones common to con- Cyclic Memory Pools numbers of elements with a single call soles and PCs. It’s just more important to malloc. As new elements are needed, to consider them while producing on a et’s consider the first style of mem- the memory pool system hands out console game because the environment L ory pool. To give you a clear idea pointers to memory blocks that have is so restrictive. Let’s begin by looking of what type of data elements fall into already been allocated as part of a previ- at some useful coding techniques. the above description of this pool, it’s ous chunk. If you run out, the memory any data list that is allocated element pool will allocate another large block of by element until it reaches its maxi- elements for the next n requests for new Memory Pools mum growth for that cycle and is then elements. This keeps the number of sys- completely destroyed so the process tem-level allocations to a minimum. ost data in a computer game con- can begin again. Many data types in The trick is maintaining the balance Msists of large numbers of com- games actually fall into this category, between saving time by creating more mon data types. Examples of this are and most involve frame-specific data elements with each real allocation and the monsters in your world, bullets fly- because the frame is a convenient losing memory with allocated space that ing around them, polygons that make cycle. Examples of this data type goes unused. Each type of data element them up, the execute buffers that ren- include Direct3D execute buffers, poly- will probably work best with its own der them, and so on. You need to gons generated from 3D clipping, block size, which is determined by maintain lists of these data structures spans for scanline hidden surface examining the data type’s usage during so they can be accessed quickly and removal, and AI transversal lists; all of an average game. http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER RESOURCE MANAGEMENT

To reach this balance, you can cus- of data element, say 100 debris parti- sented a region on a scanline that tomize the memory pool so that it cles, 30 smoke puffs, and so on, and needed to be refreshed. I created a grows and shrinks intelligently. For then allow the memory pool to hand memory pool of these data elements to instance, if the data type tends to allo- out new elements whenever they are request from when I needed them. cate the same number of elements needed without ever going over the set Since I had multiple dirty scanline every cycle, then there is no need to limit. This means that no system-level screens working simultaneously, I de-allocate the space every frame — memory management occurs, which ended up saving tens of thousands of just empty it and use it again. This speeds up our code. We also know new and delete calls on peak frames. And results in even fewer system-level exactly how much memory each type by using very large chunks of a thou- memory allocations. If the data type of data takes up throughout the game. sand data elements per pool, I had tends to spike up every few seconds, What happens when we run out of excellent cache locality coherency you can have the memory pool elements of a given type? A simple age- when walking the lists. “prune” itself back to the average num- based caching system can be used to The integration of the caching mem- ber of elements per cycle, thereby using destroy old instances in favor of new ory pool might not be quite as obvious. far less memory. ones. While this could conceivably All data elements that belong to these degrade image quality or even game types of pools must derive from a com- play, it will usually go completely mon class. This common class contains Caching Memory Pools unnoticed if you carefully balance one item: the field on which to base resource savings vs. game-play costs. An the caching algorithm. Earlier in the 44 he secondary form of memory old bullet that has been flying for three article, I implied that this caching T pools manage data elements that seconds and still hasn’t hit anything scheme had to be based on the age of are dynamic and cannot be allocated (such as one flying towards the sky) is the object, but it can really be based on and de-allocated in two independent probably not going to be missed if it anything. Any heuristic that deter- stages. Although this describes nearly disappears unnaturally. Smoke puffs mines which element in the pool every type of data list, there is one and debris particles are also not going should be expunged in favor of a new other restriction that this pool places to be missed if they disappear a little element will do. Once you have all on data types. The data must be able to too soon, especially since the player is data elements deriving from the base handle an arbitrary maximum of ele- most likely focusing on the area where class, the rest of the integration is the ments to be enforced when a new ele- new particles are being generated. same as the other memory pool. Just ment is requested. This memory pool is stop allocating and deleting elements useful for “eye candy” — data elements and instead request them from the such as bullets, explosions, and particle Memory Pools Integration appropriate memory pool system. effects. Because console memory Once most objects in our game are resources are very limited, wasting he integration of these pools into based on the memory pool classes, we space on hundreds of bloody chunks is T our code base should be simple can expand their usefulness by turning just not good. Therefore, a memory enough since they are a very general them into statistic recorders to monitor pool that keeps usage under control class. For example, I wrote a cyclic memory use. Pools can keep track of can be very helpful. Basically, this memory pool type recently for han- how many of a given data element memory pool is a caching system. But dling dirty scanline updating in STAR have been allocated, how many have many programmers only seem to use TREK: HIDDEN EVIL. I had thousands of been used, measure the peaks, and caches in reference to textures, when data elements, each of which repre- determine the averages. All this infor- in fact they can be very useful mation can be gathered easily by with any number of data types. the memory pool system and Let’s look at an example of easily retrieved to help reduce what happens in my latest game, your game’s memory footprint. STAR TREK: HIDDEN EVIL. When an This data is also very useful for enemy drone is destroyed by a customizing the actions of each blast, an explosion sprite memory pool used by your is generated, a couple of smoke game. For instance, you might puffs are released, and a dozen find that you are requesting sig- spark particles are emitted. First, nificantly more bullets per sec- you don’t want to allocate and ond than you first guessed and delete every one of these ele- it’s causing them to expire too ments each time a drone is early. Therefore, you raise your destroyed. Take a quick look at allowance for bullets. some hyperactive console games An example of the real-world and you can see that hundreds usefulness of these statistics can of these eye-candy objects are Ensign Sovak is demonstrating caching memory pools be seen in our memory reduction created every second. A good by destroying an enemy drone. Sparks are great can- work on BENEATH. Our memory solution to this problem is to didates for caching pools. footprint was much too large at create a set number of each type the end of the project, so we sent

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com RESOURCE MANAGEMENT

one of our programmers years of using memory man- into the code to determine agers such as this, I’ve never where we could cut. By seen that happen. If this breaking the memory usage memory block passes these down to the object level, we initial tests, we make sure saw a tall spike at the data that the block is in our hash object “flare shards.” Flare table. If we find it, then we shards are pieces that fly off have a legitimate free on a when a flare object legitimate block. We free the explodes in the game. (A data block by marking it as flare is shot from a flare freed in its header state and gun, an object that many then filling the block with a creatures use.) We discov- “freed value.” The memory ered that the spike was block is then removed from caused by the fact that mul- our hash table and we finally tiple creatures had flare FIGURE 1. Our memory manager's block structure. call free() to actually free the guns, each flare gun had a block on a system level. pre-allocated clip of ten Using these two functions, flares, and each flare had a pre-allocat- trailer containing very specific data we can catch many memory errors 46 ed clip of twelve flare shards. The result that allows us to track the blocks. In when they are first introduced and not was thousands of flare shards just sit- the header we place a pointer to the weeks later when we’re trying to track ting in memory waiting to be used. source code file-name string that the down some very obscure, difficult-to- Our solution was to create a flare block was allocated in and the line reproduce bug. We can also use these shard pool in which we allocated a set number it was allocated on. This lets us functions to track our total memory number of flare shards at the beginning identify memory errors by generating allocation, peak memory allocation, of the game. Then, whenever a new useful debugging messages that lead average memory allocation, and other flare shard was needed, it requested the programmer straight to the prob- useful code statistics. one from a memory pool. If the memo- lem. We also include a marker in both Finding memory leaks is another big ry pool was full, the oldest flare shard the header and trailer that allows us to advantage to this code layer. At the was retired early and became the new track its current state and watch for end of your program, you can call the flare shard. We ended up saving boundary overwrites. FindMemoryLeaks() function to find all megabytes of data space. Something When an allocation occurs, our cus- memory leaks. The code to handle this that small had actually gone unnoticed tom routine allocates memory using a is quite simple. By the time you call by us. malloc call with enough additional space this function, a free should have been to hold the header and trailer. The data called for every malloc you made; there- portion of the block is cleared out to an fore, any memory blocks that still exist Memory Manager uninitialized value. The header and in the hash table are memory leaks. trailer are initialized correctly with the Just walk the table, printing out every s any experienced programmer file name, line number, and overwrite block along with its file name and line A can attest, memory errors can be markers. This memory block is then number information. You now have a some of the most difficult bugs to track put into a hash table to give us better printed list of every memory leak in down. And when you consider that searching performance when we need your game. consoles are often weak in terms of to find blocks in later stages, such as With this layer written, how do we development tools, having your own validation or freeing. The memory integrate this system into our code code to help track down memory bugs block is then returned with the appro- base? We could overload new and delete, can be quite a time saver. This is where priate adjustment for the header and or we could replace all our standard C a memory manager can be useful (see the rest of the program is none the memory calls with our own personal Figure 1). Normally, programs use the wiser that this has taken place behind functions if we didn’t want to use C++. standard malloc and free (or their C++ the scenes. The path I usually take is to use equivalents, new and delete) when deal- Let’s look at what happens when we defines, such as this: ing with memory allocation; however, free memory. First, check to see if the #ifdef _DEBUG these functions do not help us track memory block has already been freed #define Allocate(x) \ down memory leaks, prevent us from by looking at its header state. Also MemoryManager->Allocate(__FILE__,__LINE__,x) overwriting our memory bounds, or check the header and trailer markers to #define Deallocate(x) \ handle other common memory errors. see if an unrecognized value has been MemoryManager->Deallocate(x) So, let’s look at a simple layer that we placed there, implying that a boundary #else can wrap around new and delete in order overwrite has occurred. This does not #define Allocate(x) malloc(x) to help us debug our code. catch all memory overwrites because #define Deallocate(x) free(x) Let’s examine how this layer will obviously the overwrite could have #endif work. The meat of the code marks each written our marker, and it would This method keeps you from having memory allocation with a header and appear untouched. However, in all my to type the file and line parameters for

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com RESOURCE MANAGEMENT

every allocate function call. Also remove memory errors before notice that the entire memory you even move the code base manager layer is skipped when over to the console. not in a debug build, thereby Another issue to think about is speeding up the code base in the the difference between the final release build. (And by that Windows operating system and time, all the memory bugs should whatever operating system exists be gone, right?) on the console you are porting to. (Or lack of operating system, as the case may be.) Windows is Resource Wrapping significantly more complex than anything you’ll find on a con- he memory manager that we sole. (With the obvious excep- T just looked at should save tion of the Sega Dreamcast, time when tracking down memo- Jack confronts his arachnophobia to squash bugs. Of which has Windows CE, but ry bugs. But what is the code real- course, our memory manager can do that for him. even that is a very stripped-down ly all about? It is just wrapper version of what you use every code; a custom high-level library day on a PC.) As with all that encloses a low-level library, such platforms. By maintaining a custom advanced operating systems, Windows 48 as the C memory manager, which pro- application interface to a system, you can be quite forgiving of mistakes — vides improved functionality. By mak- avoid having to rewrite code through- sometimes too forgiving. Because if ing sure that our wrapper is the only out a project, and instead update only you make a mistake that Windows can entry into the system, we can receive one library. For instance, if you had a survive, chances are your console customized records that the low-level game that used Windows-specific timer won’t. For instance, I’ve seen program- system was never designed to give. devices, you would have to track down mers not clean up after their memory Let’s take this idea of the wrapper all instances of such timer devices allocation because they know that even further. There are many other throughout your code base when port- when they shut down their program, resources that we can surround with ing to a console. Instead, write a wrap- Windows will clean up their memory wrappers. Why not wrap the file IO sys- per class around the device that’s used space. This is a horrible habit to get tem? Or write a custom library instead by the entire code base. Then, when into, but from my experience, it seems of using fopen() and fclose()? This layer it’s time to port your game to another common. Always work off the assump- can be used to abstract packed files platform, you only have to touch one tion that you do not have a safety net. (many files merged into one for faster file by rewriting the timer wrapper. All When you type a new, match it with a disk access) or keep endian switching other code in the game remains the delete immediately. When you open a straight between Macs, PCs, and con- same because it all uses your custom file, make sure that you close it. soles. You can also use it to track down timer interface. Other issues to consider, which I do unclosed files that can cause quite a bit not have the space to get into here, are of trouble, as a recent incident at Presto problems associated with other showed us. Specific Porting Issues resources, such as video space. Just as Windows gives each application a PCs will always have more main mem- maximum number of file handles, et’s take a moment to think about ory than consoles, they will also which when used up, can no longer be L some specific issues when porting always have more video memory, opened using standard C file access from a PC to a console. First, when because PCs owners are willing to conventions. If you’re opening files developing for a console (especially a spend more. The same problem exists without closing them, you eventually new console for which the develop- for sound memory. Consoles don’t yet use up these file handles and run out. A ment environments are not mature), have hard drives for high-speed data recent bug in our load/save system on you’re often developing with DOS- spooling or massive state saves, and STAR TREK ended up being a section of prompt linkers and no support pro- the CD-ROMs they do have are usually code that was not closing its files, and grams outside a basic C compiler. considerably slower than what is com- after five or six mission loads, we So when doing a port, take advantage mon on PCs. In short, consoles are would run out of handles. We wasted a of the PC’s enormous library of devel- amazingly limited compared to PCs. considerable amount of time on a bug opment support before actually mov- But if you know what you’re doing, that could have easily been avoided ing the code to the new platform. you can make a game that’s just as with a wrapper library reporting For instance, using NuMega’s Bounds- incredible as anything on a PC — unclosed files. That’s what wrapping Checker is good place to start. For sometimes even more so. ■ systems are all about — adding more those who have never used it, functionality to already-written BoundsChecker helps programmers Code for the memory pool system systems. find memory bugs similar to those dis- and memory management wrapper Another benefit of writing wrapper cussed above, such as double frees, can be found on the Game Developer code is that it helps us achieve our overwriting boundaries, and memory web site, http://www.gdmag.com. overall goal: porting between multiple leaks. This program can help you

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com POSTMORTEM Iaial Game 2

By Jonathan Chey

his is the story of a young and inexperienced

52 company that was given the chance to develop

the sequel to one of the top ten games of all time. The

sequel was allotted roughly one year of development with

its full team. To make up for the short development cycle

and correspondingly small budget, the project was sup- TTposed to reuse technology. Not technology in the sense of a stand-alone engine from another game, but individual components that were spun

off from yet another game, : THE DARK PROJECT. The THIEF technol-

ogy was still under development and months away from completion

when our team started working with it. To cap everything off, the pro-

ject was a collaborative effort between two companies based on a con-

tract that only loosely defined the responsibilities of each organization.

Jonathan Chey was the project manager and a programmer on . He is also one of the co- founders of . Prior to founding Irrational Games, he worked at and prior to that he received his Ph.D. in Cognitive Science from Boston University. He is currently working on his tan back in his hometown of Sydney, Australia. He can be reached at [email protected].

GAME DEVELOPER NOVEMBER 1998 http://www.gdmag.com Add to these gloomy initial conditions the fact that the game from which our shared technology was derived slipped more than six months from the initially estimated date, that several developers quit during the project, that we didn’t bring the full team up to strength until six months from the final ship date, and that we struggled with financial and business problems during the entire project. Having learned this, you might anticipate the worst. Strangely, SYSTEM SHOCK 2 shipped within two months of its targeted date and will, I hope, be rec- ognized as a sequel worthy of its esteemed ancestor. Let’s step back and trace the origins of the The team at Irrational Games, from left to right: First row: Steve Kimura/Artist, companies and the project. Looking Glass Jonathan Chey/Project Director, Justin Waks/Multiplayer Programmer, Studios is familiar to many as the creator of a Mauricio Tejerina/Artist, Rob "Xemu" Fermier/Lead Programmer, Dorian series of highly innovative titles including Hart/Designer, Lulu Lamer/QA Lead. Second row: Ian Vogel/Level Designer, the original SYSTEM SHOCK, the ULTIMA Scott Blinn/Level Designer, Michael Swiderek/Artist, Rob Caminos/Motion 53 UNDERWORLD series, the Editor, Nate Wells/Artist. Third row: Mike Ryan/Level Designer, Ken line and TERRA NOVA, among others. Three Levine/Lead Designer, Mathias Boynton/Level Designer. Not shown: Gareth years ago, Ken Levine, Rob Fermier and I Hinds/Lead Artist. were developers at Looking Glass, struggling with the aftermath of VOYAGER, an aborted Star Trek: Voyager–licensed project. At the time, Looking Glass It’s the Engine, Stupid was in financial and creative disarray after a series of titles that, though critically acclaimed, had failed to meet sales othing impacted the development of SYSTEM SHOCK as expectations, the latest being TERRA NOVA and BRITISH OPEN N much as the existing technology we got from Looking CHAMPIONSHIP GOLF. Frustration with the 18 months wasted Glass. This fact cannot be classified monolithically under the on VOYAGER and a certain amount of hubris prompted three heading of “what went wrong” or “what went right,” how- of us to strike out on our own to test our game design and ever, because it went both wrong and right. The technology management ideas. We wanted to nail down a rigorous and we used was the so-called “,” which was essen- technologically feasible design, focus on game play, and force tially technology developed as a result of Looking Glass’s ourselves to make decisions rather than allow ourselves to THIEF: THE DARK PROJECT (for more about its development, stagnate in indecision. We wanted to run a project. So we formed Irrational Games. After some misadventures SYSTEM SHOCK 2 with other development contracts, we unexpectedly found Irrational Games LLC ourselves back at work with Looking Glass as a company Cambridge, Mass. rather than as employees. Initially, our brief was to prepare a (617) 441-6333 prototype based on the still-in-development THIEF technology http://www.irrational-games.com recast as a science-fiction game. The scope of the project was Looking Glass Studios Inc. very wide, but we quickly decided to follow in the footsteps of Cambridge, Mass. the original SYSTEM SHOCK. Our initial design problem was (617) 441-6333 how to such a game without the luxury of the actu- http://www.lglass.com al SYSTEM SHOCK license, since no publisher had yet been Release date: August 1999 signed. Intended platform: Windows 95/98 Our initial prototype was developed by the three of us Project budget: $1.7 million working with a series of contract artists. Our focus was on Project length: 18 months the core game-play elements: an object-rich world contain- Team size: 15 full-time developers, 10–15 part-time developers ing lots of interactive items, a story conveyed through Critical development hardware: Pentium II machines, 200MHz recorded logs (not interaction with living NPCs), and game to 450MHz with 64MB to 128MB RAM, Nvidia Riva 128, play realized through simple, reusable elements. This focus Voodoo, Voodoo 2, TNT cards, Creative Labs’ sound cards, enticed Electronic Arts into signing on as our publisher early Wacom tablets, Windows 95/98. Also used SGI Indigo work- in 1998 — a fantastic break for us. It meant we could now stations. utilize the real SYSTEM SHOCK name and characters. Critical development software: Microsoft Visual C++ 5.0, Opus Immediately, we went back to our original design, threw Make, 3D Studio Max, Adobe Photoshop, Alias|Wavefront away some of the crazier ideas that had been percolating and Power Animator, DeBabelizer Pro, RCS, Filemaker Pro, and began integrating more of the rich SYSTEM SHOCK universe Adaptive Optics motion capture software into the title. That was the point at which the real develop- ment began. http://www.gdmag.com NOVEMBER 1998 GAME DEVELOPER POSTMORTEM

see “Looking Glass’s THIEF: THE DARK well as delivery date. While there are PROJECT,” Postmortem, July 1999). features in SYSTEM SHOCK 2 that could The THIEF technology was developed have been better if we had not rushed with an eye toward reuse, and I will them (the character portraits for exam- refer to it in this article as an “engine.” ple), we still firmly believe that the However, it is not an engine in the game as a whole was made better by same sense as QUAKE’s, UNREAL’s, and our resolve to finish it on time. LithTech. The Dark Engine was never USE OF SIMPLE, REUSABLE GAME-PLAY delivered to the SYSTEM SHOCK team as 2.ELEMENTS. The field of compa- a finished piece of code, nor were nies developing first-person shooters we ever presented with a final set like id and Valve, among others, is of APIs that the engine was to impressive. From the outset we realized implement. Instead, we worked that we would have to work smarter, with the same code base as the not harder, to make a game that could THIEF team for most of the project stand up in this market. It would be a (excluding a brief window of time futile attempt to create scarier mon- when we made a copy of the sters, bigger guns, or higher-polygon source code while the THIEF team environments. Additionally, we real- prepared to ship the game). ized that our design time and budget 54 Remarkably, it is still possible to were very tight and that we would not compile a hybrid executable out of this Concept Sketch of the Psi Reaver. have time to carefully hand-script com- tree that can play both THIEF and plicated game-play sequences in the SYSTEM SHOCK 2 based on a variable in a engine. Instead, in an attempt to shift configuration file. analyzed our technological capabilities the battlefield, we chose to focus on This intimate sharing of code both and then decided on a design that simple, reusable game-play elements. helped and hurt us. We had direct would work with it. This process is The success of HALF-LIFE, which access to the ongoing bug-fixes and almost mandatory when reusing an launched while we were in the middle engine enhancements flowing from the engine. Sometimes it can be difficult to of SYSTEM SHOCK 2 confirmed our intu- THIEF team. It exposed us to bugs that stick with this when a great design idea itions in this respect. We simply didn’t the THIEF team introduced, but it also doesn’t fit the technology, but we have the time, resources or technology gave us the ability to fix bugs and add applied the principal pretty ruthlessly. to develop the scripted cinematic new features to the engine. Because we And many of the times we did deviate sequences used by HALF-LIFE. We con- had this power, we were sometimes we had problems. soled ourselves with the knowledge expected to fix engine problems our- Another feature of our development that we were not even trying to do so. selves rather than turning them over to philosophy is that everyone partici- This strategy melded very well with Looking Glass programmers, which pates in game design. Why? Because all our acquisition of the SYSTEM SHOCK wasn’t always to our benefit. At times three of the Irrational founders wanted license, as the original SYSTEM SHOCK we longed for a finished and frozen to set the design direction of our prod- had already been down this road. We engine with an unalterable API that ucts, programmers were able to resolve decided to expand on elements that we was rigidly defined and implemented design issues without having to stick to liked in SYSTEM SHOCK and then add — the perfect black box. But being able a design spec, and we strongly empha- similar new systems. Each such new to tamper with the engine allowed us sized game design skills when hiring all system was evaluated rigorously in to change it to support SYSTEM of our employees and contractors. In terms of game-play benefits, underly- SHOCK–specific features in ways that a all our interviews, one of our most ing technology, and design-time general engine never could. pressing questions to ourselves was requirements. “Does this person get games?” Failure For example, take the ship’s security to “get” them was a definite strike system. Early on we decided that we What Went Right against any prospective employee. wanted to continue the surveillance Ultimately, the team’s passion for and theme from SYSTEM SHOCK, which we THE IRRATIONAL DEVELOPMENT MODEL. understanding of games was a major could leverage throughout the game to 1.In our hubris after leaving contributor to the design of the final provide lots of game play for very little Looking Glass, we formulated several product. implementation cost. We realized that informal approaches to development The final goal of our development security cameras would be trivial to that we intended to test out on our process was to make decisions and hit implement using existing AI systems projects. Most of these approaches deadlines. We focused on moving for- (they are just AIs pruned of many of proved to be successful and, I think, ward, and we didn’t allow ourselves to their normal abilities) and that once formed the basis of our ability to com- be bogged down. We desperately want- we had cameras that could spot and plete the project to our satisfaction. ed to ship a game and believed that the track the player, we would be able to First, we designed to our technology discipline imposed by the rule of for- build several game-play elements out rather than building technology to fit ward motion would ultimately pay off of them. Cameras could summon mon- our design. Under this model, we first in terms of the final product quality as sters to the player, so much of the

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com game play consisted of avoiding detec- Irrational’s development budget could tion by security cameras and destroy- not cover all the SYSTEM SHOCK 2 devel- ing cameras before you were seen. opment costs, and as compensation for Because cameras scan fixed arcs, the the late delivery of the THIEF technolo- player can utilize timing to sneak by gy. Unfortunately, these personnel cameras, pop out and shoot them at were not always available on time — a the right moment, or get underneath situation which caused us much con- them and bash them with a melee cern. We knew that this “resource weapon. Once a player is spotted, mon- debt” could never really be paid off sters flood the area until the player is until THIEF shipped — nothing is so dif- able to shut off the security system ficult as prying resources away from a somehow or the system times out. This team that is trying to ship a product introduces the need to deactivate secu- before Christmas. It wasn’t until rity systems via security computers that December 1998 that we first began to are scattered throughout the level. see some of these promised resources. This type of system was technologi- However, these “resources” — real peo- cally simple to implement and required ple — had just finished up THIEF and minimal design effort. While not com- were totally fried following the gruel- pletely formulaic, the basic procedure ing crunch to ship THIEF. The saving to set up a camera and security system grace and reason that this arrangement 55 could be shown to designers quickly was ultimately successful was that using a few simple rules. From this one these developers were all talented and system and a couple of associated sub- Concept sketches of the Cyborg experienced and already knew the systems, we derived a large amount of Midwife. technology. Their addition to the team game play without having designers gave us a solid boost during the final create and implement complicated months in our ship cycle. scripted sequences and story elements. avoided falling back on this contract in The other benefit of the cooperative When you throw together many such most cases. We preferred to resolve development agreement between systems (as we did), you end up with a issues through informal discussions. Irrational and Looking Glass was that lot of game play. Conceptually, Irrational was to be our respective engine programmers COOPERATIVE DEVELOPMENT. SYSTEM responsible for the development of the could share knowledge. The ability to 3.SHOCK 2 was truly a cooperative product and Looking Glass was to pro- walk over and quiz engine program- development between Irrational and vide A/V content and quality assurance mers about systems proved to be an Looking Glass. Looking Glass provided services. invaluable benefit that more than com- the engine and a lot of infrastructure During the early stages of the pro- pensated for the lack of a rigorously support (such as quality assurance), ject, a deal was worked out whereby a specified and documented engine. while Irrational handled the design, small number of Looking Glass person- Without a formal understanding of the project leadership, and the responsibil- nel were subcontracted to Irrational engine, we had to resolve engine issues ity for marshaling resources into the when it was determined that in a personal and informal manner. final product. Both entities This process relied on the contributed personnel to the personalities of the respon- development team. sible individuals on the Inevitably, some friction engine team. Thus, the arose from this process while Irrational programmers bal- we sorted out who was anced their time not only responsible for what. according to the complexity However, this cooperation of their tasks but also was ultimately successful according to how much because both sides were inter- support was available from ested in developing a great the engine side. product, and we were able to Overall, Irrational’s rela- compromise on most issues. tionship with Looking Glass (On the most mundane level, was an unusually close one Irrational ended up providing and ultimately successful as late-night, weekend meals for a result of our mutual its development team and for respect and willingness to Looking Glass on some days work with each other. during the week.) Despite our partnership Our cooperative arrange- being based on a formal ment was founded on a con- A psi-attack against a Hybrid in Engineering. contractual arrangement, it tractual agreement, but we was our ability to work flex- http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER POSTMORTEM

ibly above this legal level that er, had previously worked in enabled the development to these roles. proceed smoothly. It’s not totally clear how DESIGN LESSONS FROM we pulled off our project 4.SYSTEM SHOCK. Though with our limited experience. the SYSTEM SHOCK license was Partially, it must have been wonderful, there were some due to our ability to bond as problems. The biggest was sim- a team and share knowledge ply the challenge of living up to in our communal work envi- the original. Fortunately, we ronment (“the pit”). To a cer- had the freedom to pay homage tain extent, inexperience also to SYSTEM SHOCK legitimately by bred enthusiasm and com- reusing elements from it. mitment that might not have Additionally, we had access to been present with a more some of the original developers, jaded set of developers. We including our own lead pro- also worked hard to transfer grammer Rob Fermier. Cold comfort in Hydroponics. knowledge from the more As with most sequels, we experienced developers to faced the challenge of keeping the less seasoned individuals. 56 the good elements of the original that SYSTEM SHOCK’s interface, while Rob worked on an extremely compre- game while not blindly copying them. elegant and powerful once under- hensive set of documentation for the We knew that most players would stood, presented a significant barrier to functional object tools, as well as a set want a new story set in the same entry. Our primary goal was to simpli- of exercises (“object school”) to be world, with the same basic flavor as fy this interface without dumbing it worked on each week. These kinds of the original game, yet we also wanted down. We devoted more design effort efforts paid back their investment to reach out to a broader audience. We to this task than to any other system many times over. resolved these issues by identifying the in the game, and it required many iter- This is not to say that our progress key elements that made SYSTEM SHOCK ations before we were happy with it. was all sweetness and light. The art so good and reinterpreting those ele- We adopted a bi-modal interface in team, for example, floundered for a ments using current technology. Some which there are two distinct modes long time as we tried to integrate the elements made it through largely (inventory management and junior artists and imbue a common art unchanged (for example, the story- combat/exploration) between which look in the team’s psyche. We had a lot telling logs and e-mails, the über vil- the player can toggle. This was a risky of very mediocre art midway through lain Shodan and her close involve- decision. This bi-modal model was our project and the art team was stag- ment with the player throughout the mandated by our desire to keep the nating. Ultimately, management had game, and the complexity of the familiar and powerful mouse-look little to do with the art team’s success world). Other elements were reinter- metaphor common to first-person — they were largely able to organize preted (such as the look of the envi- shooters while retaining cursor-based themselves and create a solid, original ronment, player interface, and tech- inventory management. How we look. niques for interacting with the world). switched between modes became our On the management front, our inex- A small number of items were simply biggest design challenge. Sometimes perience was apparent. We blundered cut, most notably the these mode changes are explicitly through the early stages of develop- sequences — we were fairly united in requested through a mode change key, ment with scheduling and manage- our opinion that these just didn’t work and sometimes they are invoked auto- ment issues. A large problem was our well in the original. matically by attempting to pick up an failure to assign specific areas of Notably, as with the original SYSTEM object in the world. So far this system responsibility and authority early on. SHOCK, we opted to omit interactive seems to be working well, though only Bad feelings arose as a result, which NPCs in the game. SYSTEM SHOCK time and user feedback will tell could have been avoided if we had eschewed living NPCs because the whether we really got it right. clearly delineated areas of responsibili- technology of the day was simply inad- WORKING WITH A YOUNG TEAM. The ty from the start. equate to support believable and enjoy- 5.SYSTEM SHOCK team was fright- able interactions with them. It’s been eningly young and inexperienced, four years, and that technology is still especially for such a high-profile title. What Went Wrong not available. So we continued the tra- Many of our team members were new dition of SYSTEM SHOCK and provided to the industry or had only a few POOR LEVEL DESIGN PROCESS. Level players with background information months’ experience, including the 1.design is a clearly defined pro- using personal logs and e-mails gleaned majority of artists and all the level fessional activity in the game industry. from the bodies of dead NPCs. builders. Of the three principals, only It’s a profession that mixes artistic and Perhaps our biggest deviation from Rob had previous experience in his role technical skills in equal measure, and the original revolved around the play- as lead programmer. Neither Ken, the the bar is raised on both fronts every er interface. It’s commonly accepted lead designer, nor I, the project manag- year. Despite our understanding from

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com the very beginning that the implementation. Most of our level building would be a level builders had previously problematic part of the built QUAKE or UNREAL levels SYSTEM SHOCK development and were not familiar with the process, we didn’t quite style of game play that we grasp how difficult and time were trying to build in SYSTEM consuming it would be, nor SHOCK 2. Partially this was did we expect that it would because we were simply eventually block the ship- exploring a style of game play ment of the game. that we did not entirely under- In hindsight, our failure stand ourselves. But it reflect- to understand the amount ed a failure on our part to of work needed to design properly educate the design- levels is reprehensible given ers. Building prototypical that we had seen the same spaces, looking at past games problems emerge on THIEF, and conducting more inten- and that SYSTEM SHOCK 2 lev- Xerxes, central computer of the Von Braun. sive discussions about game els involved substantially play will all be part of our more complex object place- future projects. ment than THIEF. I attribute this error tive consequences. The advantages Our other major design hurdle was 57 mostly to our denial of the problem — were that we could track progress on the instability and inscrutability of we had a limited budget for level levels, we could “bootstrap” levels fair- Dromed, the Dark Engine editor. designers and there is a long training ly quickly, and we could (in theory) Dromed is a cantankerous beast and time required to get designers familiar swap individuals in and out of differ- many man-months were spent strug- with the complex Dark Editor. So we ent tasks. The disadvantages are fairly gling with its idiosyncrasies. Perhaps locked ourselves into working with the obvious, and most stem from the fact our biggest problem stemmed from the resources we had. Since each individ- that the various stages of level design lack of support in one crucial area — ual task required from the designer are clearly not independent (for exam- the part of the engine concerned with (apart from initial architectural work) ple, architecture is ideally built with an translating the designer-placed brushes was relatively simple, it was easy to understanding of the functional into the basic world representation. believe that the sum total of work was objects that are to be used in the level). Like many complex 3D engines, the also relatively small. What we over- Although I think our process was nec- Dark Engine suffers from troubling looked was the fact that SYSTEM SHOCK essary in order to get the game out on epsilon issues (data errors caused by 2 involves so many objects, scripts and time, it probably detracted from the rounding inaccuracies) and other parameters. As such, the work load on quality of some of the levels. In addi- glitches that crop up during level com- level designers was excessively large. In tion, psychological factors, such as lack pilation. Because the programmer who addition, we made a classic beginner’s of ownership and training issues (stem- implemented the basic renderer and mistake and failed to provide adequate ming from unfamiliarity with levels) world representation was not available time for tuning in response to play- speak very strongly against transferring during the majority of the SYSTEM testing feedback. In SYSTEM SHOCK 2 people from one task or level to anoth- SHOCK 2 development cycle, we had to this was particularly important er. Nevertheless, there were several work around these problems. It was because the ability of the player to re- benefits of our procedure — mostly the often a frustrating process when the enter levels means that the difficulty ability to employ particularly talented fundamental cause of the problems was of a level cannot be adjusted in isola- individuals to pinch hit on particular not even known. Over time we devel- tion from the rest of the game. Often levels, and the psychological benefits oped a set of heuristics to avoid the we had to impose global changes of completing architectural work early majority of the glitches, but we were across all levels, which could be very in the schedule. forced to lock down much of the level expensive even when the change was Perhaps the rudest shock in our level architecture before we wanted to in relatively minor. building process came from our misun- order to ensure stability. We took a novel approach to the derstanding of what part of the process MOTION CAPTURE DIFFICULTIES. The level building process by attempting to would prove to be most difficult. 2.Dark Engine has a complex apply design levels using a production- Architectural work was actually fairly creature animation playback system line method. Using this metaphor, we simple, because we intentionally kept and deformable mesh renderer. We attempted to divorce the different our spaces fairly clean and did not encountered many problems with this stages of work on the level: rough attempt anything too unusual. piece of technology along our data architecture, decorative and functional However, placing and implementing integration path, and found quirks in objects, architectural polish, and light- our objects was far more complex and the playback systems as well. Primarily, ing. It was not considered necessary for involved than we expected. One diffi- the system was hampered by the fact the same individual to be involved in culty that we encountered was educat- that data frequently had to be modified all stages of this production process. ing our designers in what was expected by hand, that mysterious bugs would This approach had positive and nega- from them in terms of game-play appear in motions during playback http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER POSTMORTEM

which had not been present in the gy and by the fact that we did not plan IMPLEMENTING SCRIPTED SEQUENCES. source data, and that few tools were properly for the sessions. We hadn’t 3.Motivated by the dramatic available for debugging and analysis. defined key poses, rehearsed the scripted sequences in HALF-LIFE, we We were ill-equipped to deal with these motions, or ensured that our motions attempted to introduce similar ele- kinds of problems, having devoted few were compatible with the technology. ments into SYSTEM SHOCK 2. In doing resources to dealing with the technolo- Optical capture technology, the tech- so, we broke one of our rules: we tried gy problems. nology that we used, can be glitchy to step outside the bounds of our tech- Our primary animation source was and has difficulty with motions that nology. Although we attempted rela- motion capture data. We were nervous have obscured markers, as in the death tively simple sequences and ultimately about the technology from the start motions that were necessary for SYSTEM got them working, they were time and attempted to minimize our risk by SHOCK 2. Over the course of three ses- sinks, and the payback was relatively concentrating primarily on humanoid sions, we gradually refined our slight. For example, we scripted a hal- creatures with a small number of motions, but we spent a lot of time lucinatory sequence in which the play- interesting variants such as spiders reshooting failed captures from earlier er character rides through the interior and floating boss monsters. In retro- sessions. of the alien boss-monster, known as spect, this was a very wise decision, as Even in the best cases, most of our the Many. This so-called “Many ride” we had a lot of trouble even with this captures exhibit strange artifacts (feet was the source of innumerable bugs — simple set of creatures. Motion cap- pointing down through the ground, the player would be thrown off the ture technology and capture services hands improperly aligned, and so on), moving platform, manage to kill his 58 were contracted from a local compa- whose causes are still unknown to us. projected self, bump into walls, and so ny, but unfortunately this company In future projects we will hand-ani- on. We confirmed our intuition that viewed its motion capture work pri- mate almost all of the data, and we will the Dark Engine does not support com- marily as a side business and did not need to understand better what aspect plex scripted sequences well because display much interest in it. In fact, of the conversion process introduced the toolset (AI, moving terrain, and they cancelled this sector of their these artifacts into our final game ani- animation) is not optimized for this business during our project, and we mations, although the irregularities sort of behavior. The moral is, once had to fight hard to complete the ses- never appeared in our raw data. again, to work with your technology, sions that we had already scheduled Motion capture technology, while not against it. with them. highly efficient compared to hand ani- INEXPERIENCE WITH MULTIPLAYER Our capture sessions were hampered mation, must be approached carefully 4.GAME DEVELOPMENT. Early in the by our inexperience with the technolo- to obtain good results. project we were asked to identify the major risks associated with the project. Our number one candidate by far was the multiplayer component. This was the only new substantial engine fea- ture that was to be added and it was a complicated piece of work. We were particularly nervous about this tech- nology for a couple of reasons. First, it is usually much harder to make this kind of pervasive change to an existing piece of software than it is to build it in from scratch. Second, Looking Glass had no track record in shipping multi- player technology and we were not confident that the development was fully understood. Irrational did not want to introduce multiplayer support into SYSTEM SHOCK 2 because we considered it a tangential feature that did not contribute to our core strengths. However, marketing concerns dictated it, so ultimately we acquiesced. Our lack of enthusiasm for this feature contributed to its develop- mental problems because we failed to monitor its progress adequately or raise concerns when that progress fell behind schedule. Because this was the first multiplay- er product developed by Irrational or

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com ting around at board meetings smoking devote less time than we desired to cigars. From the mundane matters of every aspect of our work. My program- making payroll, organizing taxes and ming time was severely curtailed and I expense reports to business negotia- was able to spend far less time on tions and contract disputes, there is SYSTEM SHOCK 2’s AI than I wished. substantial overhead involved in run- Simultaneously, I was unable to pro- ning even a small company such as vide the level of direct management Irrational. In our naïveté, we did not that I wanted, and I was forced to post- factor these tasks into our schedules pone company financial work until the and the result was that they mostly end of the project or hurry it through. became extra tasks that kept us in the The results were less than optimal all Hacking the security system. office late at night and on weekends. around. As a result of our misjudgment, we Ultimately, SYSTEM SHOCK 2 turned just had to work harder. Rather than out better than I ever hoped it would. Looking Glass, we did not properly enduring a crunch period of a few The final vindication for me was sitting estimate the time required for the months, the entire last year of the in my office and playing the game in multiplayer testing. We did not project was our crunch time, as we the final couple of weeks of the project, devote adequate quality assurance struggled desperately to fulfill our jobs while waiting for EA to approve our resources to this feature. Too much as programmers, designers, and man- final build. Despite the lack of sleep, time was spent testing the multiplayer agers as well as keep the money flow- the near-complete breakdown of my 59 features over the LAN and not enough ing in (and out) of the company. Our nervous system and the 18 months of over the more demanding modem tasks were complicated further by the time I spent working on the project, it connections. need to reincorporate the company was still fun to play. I like to think that Given the difficulties posed by the from an S-corporation to an LLC dur- we have managed to capture the feel of multiplayer technologies, the engine ing the final two months of the pro- the original game by putting more developers working on the task made ject (a legal maneuver designed to game play into what initially looks like great efforts, and their early results allow me, an Australian national, to a fairly straightforward first-person were promising. However, the early be allocated company stock). shooter. It’s been a great first project departure of one of the programmers, As well as destroying our personal for Irrational Games and we look for- and the fact that he was not replaced, lives, our failure to judge the magni- ward to doing even better the next ultimately doomed any possibility of tude of our task meant that we had to time around. ■ shipping the multiplayer technology with the initial SKU. Reluctantly, we opted for a that would be avail- able at the same time as the single- player box reached shelves. Our coop- erative multiplayer game will undoubtedly be fun and will probably be enjoyed immensely by a relatively small number of our customers. However, we wonder whether our fail- ure to deliver a promised feature in the box will ultimately hurt us more than the absence of that feature from the start would have. RUNNING A COMPANY WHILE BUILDING 5.A GAME. As the principals of the company, Ken, Rob and I didn’t really understand what it took to run a busi- ness and simultaneously work in that business. None of the Irrational founders started the company to be businessmen, and we have always believed that the ultimate health of the company depended on us all staying involved in the development process, which is, after all, what each of us enjoys and wants to do. Unfortunately, as anyone who has run a business knows, there is a lot more to starting and maintaining a company than sit- http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER SOAPBOX by Greg Costikyan

A Platform for New Ideas: Why We Need an Indie Label Now

ast night, I went to see Kristin Hersh play at today. Gaming needs a venue for inde- pendent work. the Knitting Factory. You may not have heard Last year, Miller Freeman did the industry a service by launching the of her, but the club was packed. Hersh releas- Independent Games Festival. It’s a place for “garage” developers to showcase es her music on 4AD, an independent label. product, get exposure, and maybe land L a publisher. That’s great, but it’s not It’s not owned by Sony or Time Warner labels and indie film companies experi- enough — because they’re dealing with 64 or BMG. Hersh doesn’t get the kind of ment, at lower budgets, with the off- the same publishers as everyone else: promo that major-label artists do — beat and original. And sometimes, they EA, Interplay, GT, and others of their but she has more control over what hit a nerve, build an audience, and ulti- ilk. The majors will fund the tried and gets released. Hersh is probably never mately rejuvenate the field. It happens true, another shooter or RTS or racer. going to chart — but she makes continually in the music business, and They’ll happily exploit low-budget new- enough to live quite well, and reaches it happened in film this past summer bies who develop something that fits an audience of enthusiasts. with The Blair Witch into slots they know how to sell — but Tonight, I’m going down to the Project. they’re not going to experiment with Angelika with my sweetie. It’s New something new, something offbeat, York’s primary venue for independent something that will probably fail but films. The movies they show are just might rejuvenate the field. never going to appear at your The problem? There’s no way to dis- local Odeon or Sony theater; tribute an independent game. Yes, with they’ll be lucky to reach a little effort, you can 500 screens in the land a meeting States. But there are with the buyer enough theaters for CompUSA or like the Angelika Electronics Bou- to support a tique or Software whole market Etc., but they’re for indepen- not going to buy dent films — your game with- films that out the high-bud- will never gross as get graphic glitz they much as a Hollywood blockbuster, but expect from the majors, six reach an audience of enthusiasts and figures in placement bucks, and a com- illustration by Jackie Urbanovic earn enough to let many people live mitment to a major marketing cam- quite well. Right now, the game industry looks paign. The typical mall software outlet At times, the music and movie dull and played out and repetitive. We still has only 40 facings for computer industries look dull and played out and get the same damn formulas over and games, and there are at least 1,500 repetitive. You get the same damn for- over again. Yet another shooter. Yet entertainment titles published annually. mulas over and over, the same artists, another RTS game. Yet another racer. Anything that doesn’t fit the mold isn’t the same directors. But that never lasts, A title as original or offbeat as SIMCITY going to get exposure. and for one single reason: there’s a or BALANCE OF POWER or M.U.L.E. — Indie films work because there’s a sep- venue for independent work. Indie hell, or FROGGER — could not get funded arate distribution channel parallel to the one for conventional film. Indie music Greg Costikyan is a freelance game designer and writer. He has published 27 online, works because there are a million record CD-ROM, board, and role-playing games, three novels, and a slew of short stories. He stores that cater to a million different writes about games for a variety of web and print publications including Salon and tastes and a million small clubs where Happy Puppy, and recently completed an analyst’s report on the future of online you can play to build an audience. games for Goodreports.com. Visit his web site at http://www.costik.com. We’ve got nothing similar. We’ve continued on page 63.

GAME DEVELOPER NOVEMBER 1999 http://www.gdmag.com SOAPBOX continued from page 64. got to build it. 20,000 copies of a wonky little paper original, offbeat, cool product and How? As recently as 1991, a typical game called Paranoia through a wonky building the channel for its distribu- computer game cost around $250,000 little distribution chain cobbled tion — instead of shoveling the same to develop. Graphics and sound have together out of specialty hobby game old crap to the same old stores. improved a lot since then, but comput- stores and comic shops. I doubt I had Gaming needs an indie label — for er games haven’t gotten any better as 500 points of sale in North America. the sake of its own health, to act as games. You don’t need $1.5 million in It can be done. basic R&D for the entire field, and to development funding to develop a first- Some people are trying; Firaxis will find new gaming styles that can rate game; you can do it on a $250,000 be selling SID MEIER’S ANTIETAM! direct attract a large audience. Because to $400,000 budget. You just can’t get to consumers — no retail distribution. development costs continue to spiral shelf space for a low-budget game. Michael Berlyn is bravely struggling to upward faster than unit sales and we But at that level, you don’t need keep the text adventure alive through have to find a way to break that iron 100,000 unit sales. You can make direct sales (see http://www.cascade cycle. But most importantly, because money if you can get rid of 20,000 publishing.com). I’m tired of the same old same old and copies. And how tough can that be? But we need more. We need a com- want to play something really cool Hell, 12 years ago, I sold more than pany committed to publishing truly and new. Don’t you? ■

63

http://www.gdmag.com NOVEMBER 1999 GAME DEVELOPER