MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein...

41
MAY 2001 G A M E D E V E L O P E R M A G A Z I N E

Transcript of MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein...

Page 1: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

MAY 2001

G A M E D E V E L O P E R M A G A Z I N E

Page 2: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

G A M E P L A NL E T T E R F R O M T H E E D I T O R

O .K., so I’ve got to comeclean on this whole vio-lence thing. I don’t likeviolent videogames. I don’tlike violent movies much

either. My personal definition of violenceincludes gratuitous use of blood and gore.I don’t care if the blood is green, and Idon’t care if they are zombies, aliens, orspace marines — I’m just not interested inkilling things or seeing things killed. But Irespect that there are people out therewho do enjoy violent themes in games andmovies, and I don’t want to limit theirright to experience that. On the otherhand, when the focus is on competitionsuch as in COUNTER-STRIKE, I’m willing towave away my concerns.

But does playing violent games makepeople violent? I certainly don’t think so,not at our current stage of technology.However, every experience people have inlife has the potential to teach them some-thing. It’s part of being human: we try togeneralize every experience into a lesson orrule we can apply to life. So every experi-ence you have during the day has thepotential to educate.

One thing that a violent game can teach aperson is how to be a sharpshooter. Thosearcade games with the guns — they’re greattraining devices for learning how to hit tar-gets quickly and accurately. But does thismean that they’re training you to be vio-lent? This is a very fine distinction. If vio-lent games really trained people to act vio-lently, wouldn’t John Carmack or Threshhave gone postal by now?

Given that games can teach people, whyaren’t there more fun educational gamesavailable? Do you remember what it waslike to learn history, or physics? I remem-ber my experience, sitting in an uncomfort-able desk for hours at a time listening toan uninspired teacher drone on and on. Asan industry, we could be making gameswhich take the boredom out of school forthe next generation of students. Can youimagine playing a QUAKE 3–quality gamewhich has been designed specifically toteach you chemistry? Or art history?

I keep thinking about a good friend ofmine who is an incredible DANCE DANCE

REVOLUTION (DDR) player. Now, I neverwould have imagined this fellow boppingaround on a dance floor, but he recentlywon a Seattle-area DDR competition. As aresult of his excitement about DDR, he’sgotten into better shape, gained a largesocial circle, and improved his self-esteem.I doubt that DDR was specifically designedto produce these results, but it is a verypleasant side effect. Given that it is possi-ble for games to affect people in this man-ner, what kind of games could we createwith these potential results in mind?

Most of us think of games solely as aform of entertainment. But they are also aform of education. What is your gameteaching your players?

This Month

I ’m sure you’ve heard the statistics before:current top-selling PC games don’t even

utilize the bandwidth of the standard AGPbus, let alone get anywhere near AGP 4xperformance. This month, Dean Macri ofIntel shares some techniques you can use tooptimize your AGP bus utilization.

Gavin Dodd from Insomniac Gamesspent many cycles working out a uniquecrack protection scheme for Insomniac’stitle SPYRO: YEAR OF THE DRAGON. Hisresults? Preventing a fully cracked versionof SPYRO from spreading around theInternet for two months. If you’ve pub-lished CD-based titles, you know that thisis quite an accomplishment. Gavin shareshis techniques this month with the hopethat you too will be able to benefit fromhis research.

The movie Chicken Run was an animatedsensation. The game CHICKEN RUN was oneof the most elaborate cross-platform proj-ects yet, appearing on Dreamcast, Play-station, PC, and Game Boy Color. DaveFlynn and Dave Manuel from Blitz Gamesshare their experiences building a game onthis unique license in our Postmortem.

We hope you enjoy this month’s GameDeveloper!

Violence and Education

600 Harrison Street, San Francisco, CA 94107t: 415.947.6000 f: 415.947.6090 w: www.gdmag.com

PublisherJennifer Pahlka [email protected]

EDITORIALEditor-In-ChiefMark DeLoura [email protected]

Senior EditorJennifer Olsen [email protected]

Managing EditorLaura Huber [email protected]

Production EditorR.D.T. Byrd [email protected]

Editor-At-LargeChris Hecker [email protected]

Contributing EditorsDaniel Huebner [email protected] Lander [email protected] Peasley [email protected]

Advisory BoardHal Barwood LucasArtsNoah Falstein The InspiracyBrian Hook IndependentSusan Lee-Merrow Lucas LearningMark Miller Group Process ConsultingPaul Steed WildTangentDan Teven Teven ConsultingRob Wyatt The Groove Alliance

ADVERTISING SALESDirector of Sales & MarketingGreg Kerwin e: [email protected] t: 415.947.6218

National Sales Manager & Western Region, Silicon Valley & AsiaJennifer Orvik e: [email protected] t: 415.947.6217

Senior Account Manager, Eastern Region & EuropeAfton Thatcher e: [email protected] t: 415.947.6224

Account Manager, RecruitmentMorgan Browning e: [email protected] t: 415.947.6225

Account Manager, Northern CaliforniaSusan Kirby e: [email protected] t: 415.947.6226

Sales AssociateAaron Murawski e: [email protected] t: 415.947.6227

ADVERTISING PRODUCTIONSenior Vice President/Production Andrew A. MickusAdvertising Production Coordinator Kevin ChanelReprints Stella Valdez t: 916.983.6971

GAMANETWORK MARKETINGSenior MarCom Manager Jennifer McLean Strategic Marketing Manager Darrielle RuffMarketing Coordinator Scott LyonAudience Development Coordinator Jessica ShultzSales Marketing Associate Jennifer Cereghetti

CIRCULATIONGroup Circulation Director Kathy HenryDirector of Audience Development Henry FungCirculation Manager Ron EscobarCirculation Assistant Ian HayNewsstand Analyst Pam Santoro

SUBSCRIPTION SERVICESFor information, order questions, and address changest: 800.250.2429 or 847.647.5928 f: 847.647.5972e: [email protected]

INTERNATIONAL LICENSING INFORMATIONMario Salinast: 650.513.4234 f: 650.513.4482e: [email protected]

CMP MEDIA MANAGEMENTPresident & CEO Gary MarshallCorporate President/COO John RussellCFO John DayGroup President, Business Technology Group Adam K. MarderGroup President, Specialized Technologies Group Regina Starr RidleyGroup President, Channel Group Pam WatkinsGroup President, Electronics Group Steve WeitznerSenior Vice President, Human Resources Leah LandroSenior Vice President, Global Sales & Marketing Bill HowardSenior Vice President, Business Development Vittoria BorazioGeneral Counsel Sandra GraysonVice President, Creative Technologies Philip Chapnick

Game Developermagazine is

BPA approved

W W W . G A M A N E T W O R K . C O M6

A D I V I S I O N O F C M P M E D I A I N C .

Page 3: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

S A Y S Y O UC T H E F O R U M F O R Y O U R P O I N T O F V I E W . G I V E U S Y O U R F E E D B A C K . . .

Author Stresses Storyover Style

I nspired by the Game Plan column“Telling Stories” (February 2001), I

decided to write about an incident thatcontributes to thediscussion of games asan art form discussion.

I’m a game designer at Satama inTampere, Finland. In the last 20 years,I’ve witnessed the uprise of ever morevisually stunning graphics engines and thedownfall of story — I don’t necessarilymean an absence of story, but badly writ-ten dialogue, lame characterization, and alack of literary values. There is a complexand twisted story line in FINAL FANTASY

VII, but the dialogue is appalling.My mission as a game designer has been

twofold: to write an adventure game inFinnish for the Finnish-speaking audienceand to write it in a rich and elaborate way.For 20 months our team of four artists(myself, a graphic artist, an animator, anda sound designer) forged a very non-state-of-the-art, non-real-time-3D, non-force-feedback, sprite-based, top-down-viewrole-playing adventure game in the tradi-tion of Super Nintendo’s ZELDA. I don’twant to stress the low-tech aspect of thegame — it’s not the thing that made thisgame any good. We wish we could havemade this game in glorious real-time-3D,but we did not have that know-how orresources at our disposal. The game waswritten in Lingo (on Director), as that was

the programming language I was fluent in.Only a few weeks after our finished

game, GALILEI 2: ISLAND OF ADVENTURE,went public, the Finnish Ministry ofEducation awarded us with the annualSuomi award, given for a distinguishedcareer in arts, a notable artistic achieve-ment, or a promising breakthrough. It wasa great honor to be awarded, not so muchfor the personal glory, but as an acknowl-edgement for the whole industry. It wasthe first ever cultural award for a game inFinland. Personally, I’ve always seen gamesas an art form, but here was recognitionclear and strong that they could be elevat-ed to that status in the public eye. It hasbeen heartwarming to see that reviewersand the game players themselves havenoted and valued the game’s emphasis onstorytelling and clever dialogue. From thefeedback we’ve received, I’ve noted anoth-er interesting aspect: a majority of ourgame’s players are women. Apparently youdon’t have to make “games for girls,” justa game that’s intellectual and nonviolent.The rest will follow.

Thank you for your attention. I hopethis was good news to you too. I just hadto use this opportunity to tell about thisachievement as there has been so muchtalk about story and whether games willever be an art form of their own.

Henri Roth

Satama Interactive

via e-mail

Reader Questions NPR

I ’m a master’s student at Johns HopkinsUniversity, doing my thesis in the area of

real-time non-photorealistic rendering(NPR). Since research in NPR is still new,it’s difficult for me to evaluate the potentialand usefulness of NPR in games, especiallytechniques such as painterly, pen-and-ink,and watercolor, although cartoon renderingdoes seem to be gaining popularity. I readJeff Lander’s article “Graphics Program-ming and the Tower of Babel” (GraphicContent, March 2001), and I had somequestions. Are these “other” NPR tech-niques being used in games? I find it disap-pointing that “interactive frame rates” usu-ally means a few frames per second. Jeffdescribed methods of using Direct3D’s newvertex shaders as a means of achieving car-toonlike shading. Can this be extendedtowards other techniques? Since most NPRtechniques are basically texture-mappingtechniques, I don’t know if having this typeof hardware support will help much. I’mvery interested in real-time graphics ingames and would very much like to con-tribute something in this new and seeming-ly hot area.

David Ko

The Johns Hopkins University

via e-mail

CSend e-mail to [email protected], or

write to Game Developer, 600 Harrison St.,

San Francisco, CA 94107

8 m a y 2 0 0 1 | g a m e d e v e l o p e r

Kludge by Tiger Byrd and Daniel Huebner

There’sno way any-body’s going to

believe this.

Tell meabout it.

Especially thispart right here -- nowthat's just way tooover the top!

You guys checkingout the concept art?

No -- Theproduction schedule.

Playabledemo by E3?Whatever!

You have tosuspend disbelief in thisbusiness, but this is too

much.

Page 4: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

10 m a y 2 0 0 1 | g a m e d e v e l o p e r

I N D U S T R Y W A T C HJ

Sega restructuring.Sega president IsaoOkawa has helped to easesome of his company’srecent financial pain bygiving his stake in Segaback to the company as agift. Okawa gave up his12.5 percent stake in Segaon January 31, totalling19.87 million sharesworth more than $280million at the time of thetransaction. Okawa alsogave up stakes in compa-nies associated with Sega, including a 4.8percent share of CSK Corp. and a 3 percentstake in ASCII Corp., for a total stock gift toSega worth $566.3 million.

Sega is looking to save costs by makingjob cuts and will accept voluntary retire-ment from 300 employees as part of adownsizing plan related to its departurefrom the console business. The companysaid it will post a $11.2 million special lossfor these retirement allowances but addsthat in the long run the retirements willresult in $16.4 million in annual savings.

Sega’s decision to exit the hardwaremarket has also translated to layoffs forSega of America. The company has cutjobs in departments tied to the Dreamcastconsole, largely in the marketing andquality assurance areas.

Positive financial forecast. Things arelooking up for a number of the industry’sbiggest players. Activision reported incomeof $20.5 million on revenues of $264.5 mil-lion in the third quarter, slightly down fromlast year’s third-quarter result of $22.3 mil-lion in income on $268.9 million in rev-enue. Meanwhile, mergers and reorganiza-tion are starting to pay dividends for Info-grames. The company’s second-quarter rev-enues increased to $127.5 million from lastyear’s second-quarter revenues of $109.7million. Changes in income were impres-sive, as the company exchanged last year’ssecond-quarter loss of $118 million for thisyear’s net income of $16.5 million for thesame period. Infogrames’ second-quarterresults include its October 2 merger withInfogrames North America. For its part,THQ announced earnings results for its fis-cal fourth quarter which show net incomeimproving 45 percent to a record $21.5

million. Revenue for the fourth quarter alsobroke a company record, increasing 50 per-cent to $190.9 million. Ubi Soft’s fiscalthird-quarter results show consolidatedsales of $100.7 million, an improvement ofnearly 50 percent from last year.

Negative financials. Midway released itsresults for the fiscal second quarter, postinglower-than-expected earnings. The Chicago-based company lost $3 million on revenueof $76.9 million, down a whopping 48 per-cent from the $147.6 million in revenue forthe same period last year. 3DO is also feel-ing the pinch, revealing a fiscal third-quarterloss of $12.3 million on revenues of $29.9million, compared to a profit of $1.4 mil-lion on revenues of $41.2 million for lastyear’s third quarter. Both companies citedthe current slump in game sales as the causefor their losses and expect larger returns inthe coming quarters.

Game makers file suit against onlinepirates. Twelve game companies arebringing civil lawsuits against the operatorsof web sites alleged to be offering illegalgame downloads. The game companies(Activision, Capcom, Eidos, EA, Havas,LucasArts, Interplay, Midway, Microsoft,3DO, Sierra, and Nintendo) allege that thedefendants offered pirated copies of hun-dreds of titles on various “warez” sites onthe Internet. The suits seek court assistanceto shut down the offending sites and tobring monetary penalties that could rangeas high as $150,000 for each copyright vio-lated. “These cases target Internet warezand ROM sites where games can be down-loaded,” explained Doug Lowenstein, presi-dent of the Interactive Digital SoftwareAssociation, the trade group which repre-

sents game publishers. “Thoseengaged in piracy need to under-stand that they will be targeted forlegal action and that they will paya price for their illegal conduct.”

Ubi Soft acquires Blue Byte.Ubi Soft has acquired Germandeveloper and publisher Blue ByteSoftware. Privately held Blue Byte,which has 64 employees, is themaker of the SETTLERS and BATTLE

ISLE game series. The companywas founded in 1988 by the cur-rent head of the company, Thomas

Hertzler, and has operations in Germany,the United States, and the United Kingdom.The acquisition was consolidated into theUbi Soft accounts as of February 6, 2001,and Ubi Soft reports that it will have a pos-itive impact on its results in 2001.

Blizzard files Diablo movie suit. Bliz-zard Entertainment has filed suit to preventNew Line Cinema from releasing a movieunder the “Diablo” name. Blizzard con-tends that New Line is trying to use thepopularity of the DIABLO videogame fran-chise to promote its film, which is unrelatedto Blizzard’s game of the same name. Fur-thermore, Blizzard has plans to produce amovie of its own based on the DIABLO fran-chise and using the DIABLO brand. Blizzardwas granted a DIABLO movie trademark in2000, though New Line contests its validity.New Line’s Diablo film, which began pro-duction last December, features Vin Dieseland revolves around a drug lord known asDiablo. Blizzard is seeking an injunction toprevent the release or promotion of the filmunder the Diablo name. q

d a n i e l h u e b n e r | T H E B U Z Z A B O U T T H E G A M E B I Z

M E D P I 2 0 0 1 S O F T WA R EGRIMALDI FORUM

Monte Carlo, MonacoJune 26–29, 2001Cost: variablewww.reedexpo.fr/anglais/factsheet.html?salon=28

U P C O M I N G E V E N T S

CCAALLEENNDDAARR

Activision’s TONY HAWK 2 (left), Infogrames’ UNREAL TOURNAMENT (top right), and UbiSoft’s RAYMAN (bottom right). All three companies have posted impressive earningsdespite an overall slump in the market.

Page 5: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

C ubase VST/32 5 is Germandeveloper Steinberg’s flag-ship entry into the importantdigital audio sequencer mar-ket. It offers competitive

functionality (deep and robust MIDI editingalongside a high-resolution multi-trackaudio system) and some unique extras.Introduced in 1989, Cubase is certainly oneof the established players in the segment.Steinberg’s Virtual Studio Technology (VST)has become popular as a cross-platformfoundation for digital audio, with countlesscompatible effects plug-ins and virtualinstruments on offer from a number ofdevelopers. Cubase VST/32 5 claims animpressive feature set including audio reso-lutions up to 32-bit, Apogee UV22 dither-ing, four bands of parametric EQ, a dynam-ics processor, four insert effects, and eightaux sends per channel. It is available for PCand Mac; I looked at the PC version.

Now, there are certain problems withreviewing popular, mature, full-featured

products like Cubase. How does one delvedeep enough into such a huge applicationto give meaningful advice to prospectivebuyers? How does one secure the credibili-ty to critique an application used regularlyby professionals for high-end work? Howdoes one distinguish raw prejudice fromthoughtful analysis? Here’s how I solvethese problems: Cubase VST/32 5 is a fine,well-made application capable of solvingjust about any MIDI or audio recording,editing, mixing, or processing task it’s putto. It’s extremely powerful, sounds great,and is rock stable. Whether you actuallylike it and find it useful is a mostly person-al matter. Whatever you need, Cubase cando it, and do it very well. Go online(www.steinberg.net) and download thefully functional demo.

Cubase starts with a deficit — it uses adongle for copy protection. I know, musi-cians are criminals, and without a brutishand despotic lockdown the applicationwould be copied ruthlessly. This is exceed-

ingly unfortunate, but it’s hard to denythat it’s probably true. Otherwise, instal-lation was smooth and quick. Lots ofgood electronic documentation installsalong with the application, and so do acouple of useful demonstration and tutori-al songs. A well-written Quick Start guideis included in the package, beginning withchapters called “What is MIDI?” and“What is Digital Audio?” and runningthrough nicely organized examples ofmost major features of the software.Beginners are in good hands, and moreexperienced users moving over from otherapplications will find a handy reference tothe particulars of Cubase.

I tested Cubase in Windows 2000 run-ning on a 700MHz Pentium III with256MB RAM and a 30GB hard drive,decent, if not cutting-edge, computerhardware. But I had trouble getting mypro-level audio hardware to work underWindows 2000, so I finally decided to runCubase with a trusty Sound Blaster Live!doing MIDI and audio duty. This waslower-end than I would have preferred,but worked well. I was unable to assessCubase’s high-end audio features, but Icertainly believe they work as advertised. Idid several projects in Cubase: I edited thedemo songs, imported a video and its SFXtracks in order to work on MIDI musictracks, and created a loop-based piecewith lots of audio tracks. In each case, myresults aligned well with my expectations.The MIDI power is formidable. As foraudio, basic mixing processes sound great,the EQ and dynamics are clean and effec-tive, and other included effects (reverbsand such) are more than acceptable, if lessthan spectacular. The included analog-modeling synthesizer is a nice touch andgreat fun. But then, who cares aboutincluded effects when there’s an almostlimitless supply of VST-compatible effectsavailable? Cubase also supports DirectXformat plug-ins, so third-party supportwill not be a problem.

The meat of the work you do in Cubasetakes place in the Arrange window, andthis window works very well indeed.Track names are aligned down the leftside, their contents graphically across theright. MIDI and audio coexist happilyhere on the right side, and editing is easywith grid lines that can be turned on and

w w w . g d m a g . c o m 13

XXT H E S K I N N Y O N N E W T O O L S

P R O D U C T R E V I E W S

Cubase VST/32 5by andrew boyd

The Cubase VST/32 5 interface.

Page 6: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

XP R O D U C T R E V I E W S

14 m a y 2 0 0 1 | g a m e d e v e l o p e r

off, snap-to values that are quicklychanged, and easy color coding. Sliders inthe lower-right corner adjust the overallhorizontal and vertical zoom levels, andhorizontal zoom can also be adjustedindependently and arbitrarily per track.Expander buttons on the far left of thewindow open a section with functionaldetails of the selected track. Dragging afile from Windows Explorer imports it asan event. Right-clicking on an event opensa toolbar menu, and double-clickingopens the event in a specialized editor.This is all intuitive, informative, and con-textually appropriate.

And on the whole, using Cubase makessense enough. It didn’t take me long tofeel competent — but I never really settledin and got comfortable. It’s not the best-looking application for one thing (garishand busy to my eyes), and its operation isoften illogical, even inconsistent. Some-times a display window is a display win-dow, sometimes it’s an edit box, andsometimes it’s a drop-down list. There’sno consistent way to tell which. Why isthe Create Track command in the Struc-ture menu, while the Delete Track com-mand is in the Edit menu? Why are win-dows called Panels some times and Win-dows other times, and why are somethings that in most ways seem like Panelscalled Modules? There are probably rea-sonable explanations for all of these, but Iwas unable to discover them.

When a large number of windows areopen at once, the screen can get very clut-tered and confusing, and Cubase opens anew window for virtually every operation.For example, the mixer window has fourLED-style indicators labeled INS, DYN,FX, and EQ. Clicking on any of the fourindicators opens a channel-specific win-dow called the VST Channel Settings win-

dow. This is like a “fat channel,” or anexploded view, dedicated to the operationof a single channel. Here, an apparentlyidentical set of the indicators appearsagain, but now clicking on them generatesdifferent results. For instance, clicking onthe INS and FX indicators here has noeffect. But immediately to their right aretwo columns of buttons and knobs anddrop-down lists labeled Inserts and Sends.In the Inserts column, clicking on aneffect name drop-down list opens a win-dow where you choose your desired inserteffect. Clicking the On button illuminatesthe INS indicators in this window and onthe mixer. To adjust the parameters of theeffect, you click on the Edit button, whichopens another window. And so on.

For me, the flexibility this represents isovershadowed by the resultant visual chaosand the constant danger of adjusting thewrong parameters. A fat channel displaythat always and only shows the currentlyselected channel would be more usefulthan a screen full of them, all lookingalmost exactly alike. The title bar of eachVST Channel Settings window does con-tain the name of the channel it represents,but it’s easy to imagine naming two chan-nels the same thing — say, “guitar” — andthen really screwing up the settings on onebecause both VST Channel Settings win-dows are open and it isn’t clear uponwhich you are working.

I found it hard to create a workspacewherein I could easily glance at importantinformation. The INS indicator in themixer can show that one or more insertsare active on a channel but not how manyor which ones. The VST Channel Settingswindow can show which and how manyinserts are active and the effects assignedbut not any of the effects’ settings. Theeffects settings windows can show the set-tings for that particular effect but nothingelse about the channel. In a large mix withdozens of channels, each with EQ, dynam-ics processing, and three or four inserteffects, finding immediately relevant mixinformation becomes very frustrating.

Of course, a program like this has somuch to communicate that there willalways be particulars and idiosyncrasies inany scheme it uses. And it’s possible that Imissed things — it can take months toreally get into an application like this.

Nonetheless, I believe the inconsistenciesin the interface detract from Cubase’susability. Whether or not these are a prob-lem for you is, well, for you to decide.

If you’re a pro happily using one of theother digital audio sequencing packages,there may not be a compelling reason toswitch to Cubase. If you’re a beginner justgetting into large-scale digital music pro-duction, Cubase absolutely has a lot tooffer. It’s so powerful that you’re not likelyto push its limits anytime soon, and itshelpful documentation will speed you onyour way. Once you are accustomed to itsinterface, you might learn to love it, andthe support offered to its VST engine isphenomenal. If you’re a seasoned pro withreason to switch applications, Cubase isworth a look. It’s got the quality to runwith anything, and its depth of features isoutstanding. q

Cubase’s VST channel settings.

CUBASE VST/32 5 XXX

XXXXXXXXXXXX=XXX

excellent

very good

average

fair

don’t bother

STATSSTEINBERG MEDIA TECHNOLOGIES AG

Eiffestr. 596

20537 Hamburg, Germany

www.steinberg.net

PRICE

$799

SYSTEM REQUIREMENTS

PC: 200MHz Pentium, 64MB RAM,

Windows 95/98/2000; Mac: Power PC

200MHz, 64MB RAM, MAC OS 8.5 or

greater

PROS1. Incredibly deep and powerful MIDI and

audio functionality runs with the best.2. VST architecture guarantees huge

palette of after-market goodies.

3. Arrange window is a powerful way toenvision MIDI and audio data.

CONS1. Odd inconsistencies in interface slow

down workflow.

2. Bright and garish visuals causefatigue, confusion.

3. Dongle copy protection.

Page 7: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

16 m a y 2 0 0 1 | g a m e d e v e l o p e r

XP R O D U C T R E V I E W S

THE CHAOS GROUP’SPHOENIX 1.5

by steven thompson

C reating realistic fire effects in 3D hasalways been a challenge. The Chaos

Group stepped up to this challenge by cre-ating Phoenix, a 3DS Max plug-in distrib-uted by Digimation.Phoenix produces real-istic, natural fire effectsthat react to the move-ments and modifica-tions of their emitters.A single candle flame,a campfire, or a ragingfireball can be generat-ed quickly and easilywhile giving the user anastounding amount ofcontrol over the fire’scolor, shape, movement,and interaction withobjects in the scene. The latest version,Phoenix 1.5, adds some powerful new fea-tures to its already sophisticated toolset.Phoenix Lights, Phoenix Render Effect,and Phoenix Fractal Map give users moreediting power and reduce productiontime. The new version boasts improve-ments in speed and stability, better inter-active controls, and greater flexibility foremitters and deflector objects.

The most significant addition toPhoenix 1.5 is the Phoenix Light. Addinga single Phoenix Light to a scene creates aseries of lights for each flame object, orShapenode, within a Phoenix atmosphericeffect. The light can be attached to multi-ple atmospheres and can affect multipleemitters within each atmosphere. Forexample, let’s say you have two Phoenixatmospherics in a Max scene, one withtwo orange-colored torch flames andanother with two blue-colored torchflames. Adding one Phoenix Light to thescene and attaching it to both atmospher-ics enables all of the torch flames to emitlight based on the color of the flames.Because Phoenix Lights derive their colorfrom the parent flame, the intensity andcolor of the light emitted are based on adynamic fractal, which automatically pro-duces natural flickers from the flamesource. Need to tweak the color of aPhoenix Light? No problem. A color-cor-

rection swatch enables you to add colorcorrection to the light emitted from theflames. You can also choose whether thecolor is additive, subtractive, or a combi-nation of these.

A Phoenix Light works by automatical-ly placing a large number of lights alongthe splines that define the shape of the

flames. The num-ber and intensityof lights added tothe splines can becontrolled, so youcan balance renderspeed and quality.The huge advan-tage gained fromPhoenix Lights isthat users nolonger have to cre-ate scores of ani-mated lights tomimic the natural

light emitted from the fire effect. As youmight expect, render times for scenes con-taining Phoenix Lights can be a bit long,particularly if cast shadows are active.This can be remedied simply by reducingthe number of lights per spline and dis-abling the Cast Shadow parameter duringtest renders.

An important addition to Phoenix 1.5 isthe Phoenix Render Effect. The RenderEffect copies Phoenix render informationinto the appropriate G-buffer channel foruse in postproduction or with other Maxplug-ins such as Lens Effects. MaterialEffects ID, G-buffer ID, non-clampedcolor, Z-buffer, RGB color, UV, and cover-age channels are supported. Each channelalso has a number of common controlsthat can be flagged, such as brightnessand/or density, raytrace output (RT), andchannel clearing (CLR).

Want to make a fire that won’t take along time to render? Enter the PhoenixFractal Map. This new feature takesPhoenix’s Color Fractal and routes it to aprocedural map that can be applied to anymaterial mapping channel in Max. Thepurpose of this feature is to create quick,relatively distant, or small fires procedu-rally, without having to create a proces-sor-intensive 3D volumetric fire.

If you’re considering upgrading fromPhoenix 1.0, the Phoenix Light feature

alone is well worth the $50 upgrade cost.Tweaking the plethora of controls can betedious at times, but this comes with theterritory when you have so many editingoptions. Phoenix 1.5 is available for 3DSMax 3 at a list price of $395. Digimationpromises registered Phoenix users a freeupgrade for 3DS Max 4 when available.

XXXX | PHOENIX 1.5The Chaos Group (distributed by Digimation)

www.digimation.com

CODEPLAY’S VECTORCby brian sharp

C odeplay promotes VectorC as “a stan-dard C compiler that can automatically

create highly optimized code for PCs thatmake use of MMX, AMD 3DNow! andIntel Streaming SIMD extensions.” It sup-ports the specific instruction sets of a largevariety of processors, including the PentiumIII, Pentium 4, and Athlon. Its target marketis development where optimization is essen-tial, and games fall neatly into that domain.

VectorC is specifically designed to vec-torize generated code — to make use ofSIMD-style instructions on processors —which few other standard compilers pur-port to do as effectively. For game develop-ers who need a few more percentage pointsout of their code, VectorC could be a god-send if it performs as promised.

When I first read over the informationon Codeplay’s web site, I had some appre-hensions. The lack of a troubleshootingsection in the documentation was a bitconcerning. As it turned out, it wasn’t nec-essary. Installation of the compiler wastrivial, and configuring it to run withinMicrosoft’s Visual C++ was also a snap.Choosing compiler options was simpleenough, thanks to the great documenta-tion, which is written in a very straightfor-ward, readable style.

I started out with a C++ application andpulled hotspots out as C code and used theVectorC compiler on them. Unfortunately,the act of porting small sections of myC++ code to C proved harder than I’danticipated, which leads me to my mainconcern about VectorC: if you write inC++, it may be tricky to isolate sections ofyour code after you’ve written them and

XXXXXXXXXXXX=XXX

excellent

very good

average

fair

don’t bother

A scene lit with a single Phoenix Light.Natural-looking flickers are emitted as theflame moves.

Page 8: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

18 m a y 2 0 0 1 | g a m e d e v e l o p e r

XP R O D U C T R E V I E W S

apply this compiler to them. However,Codeplay claims that work on C++ sup-port is under way, so it may be that myconcern is short-lived.

I then decided that the most efficientway to test VectorC’s capabilities wouldbe with an existing, computationallyintensive application that was already pureC. I downloaded the source code to QUAKE

1 (ftp://ftp.idsoftware.com/idstuff/source/q1source.zip) and built it using the pure Cversions of functions — none of the hand-written assembly — with relative easeunder Visual C++ 6. In release mode, itran fairly correctly, with only a few minorrendering artifacts.

The real test, then, was to build QUAKE 1with VectorC. I was impressed: it generatedfour errors, but other than that, it built cor-rectly. It took five minutes to move fromthe Visual C++ compiler to the VectorCcompiler and address all the resultingissues. While QUAKE had some artifacts athigh optimization levels, at lower levels itran correctly on the first shot.

My end test was to pit my Visual C++ 6executable against my VectorC executablebuilt at optimization level 3 (on a scalefrom 0 to 10, 10 being the most robustlyoptimized). I recorded a quick demo. Theresults were 59.7 frames per second fromthe Visual C++ executable, to 63.3 framesper second from the VectorC executable, anot-insignificant speed gain from a rela-tively low optimization level. I was pleasedwith how quickly I was able to producegood results.

A potential drawback of VectorC is thatthe Professional Edition is rather expen-sive at $750. However, there is a SpecialEdition (which lacks Pentium 4 andAthlon optimizations) available for only$80. Overall, VectorC is a novel andpromising compiler. If your game couldstand to be faster, it’s almost certainlyworth trying out the Special Edition ofVectorC and perhaps then upgrading ifyour results are good. Games writtenentirely in heavily object-oriented C++might not be able to benefit quite as easilyfrom VectorC, but with a C++ version ofthe compiler in the works, even that prob-lem will hopefully be resolved soon.

XXX | VECTORC | Codeplay |www.codeplay.com

AVID’S SOFTIMAGE XSI 1.5by david stripinis

S oftimage is back. That’s my reactionto Softimage XSI 1.5. Rich with new

features and refinements to existing ones,this is a major release of Avid’s 3D produc-tion tool. My only logical assumption isthat all these features were originallyintended for version 1.0, before marketforces hastened its release.

Most significant in this release is theaddition of a complete suite of polygonand subdivision surface tools. XSI 1.0 hadvirtually no polygonal modeling support,short of simple primitives and importedmodels. This has been rectified in a mostimpressive manner. Artists have the abilityto modify existing geometry or build it ver-tex by vertex. Whenever a componentobject (an edge, point, or polygonal face) isselected, right-clicking will bring up a con-text-sensitive set of operations, speeding upmodeling quite a bit. The toolset seemsvery similar to those offered by WingedEdge Technologies’ products, includingpowerful beveling, extrusion, and polygon-bridging. XSI is not restricted to closedshells, however, which is of great benefit togame artists trying to optimize every singlepolygon of a model.

Refinement of detail within a model is abreeze, with an impressive edge-splittingtool and multiple methods of subdividingcomponents. One fault was the lack of anykind of automated symmetry tool, whichenhances the modeling of polygonal charac-ters. This addition, as well as a way to selectedge loops, would put XSI in a position tohonestly claim the role as the premier polyg-onal modeling tool available to artists today.

All these pretty polygons would be use-less without textures, and XSI’s ability toapply texture coordinates to polygonalmodels is nearly as powerful as its facilityat creating the models themselves. Many ofthe same hotkeys and transformation toolswork in the texture editor, although I wasquite disheartened to see the powerful pro-portional modification tool did not. XSIalso handles multiple UV channels, whichsome next-generation consoles and PCproducts support.

The other major modeling addition issubdivision surfaces. Support for bothCatmull-Clark and Doo-Sabin surfaces are

included and can be changed via theProperty Editor at any point. Subdivisionsurfaces are created by selecting a polygo-nal object and pressing a button. XSIretains a connection between the twoobjects, so editing the original alters theresulting surface. XSI also provides fullyvariable creasing of both vertices andedges. One major pitfall is the apparentinability to work with a wireframe controlobject and a shaded resultant surface.

Other additions to the modeling func-tions of XSI include the capability to domore precise modeling, with the additionof snapping tools and reference. Many ofthe NURBS tools have been expanded, par-ticularly in the area of curve editing. Inci-dentally, NURBS geometry can also beconverted to polygons.

One interesting addition is the head gener-ator. Along with bipedal skeletons of varyingcomplexity and full-body models of bothmale and female forms, there are simplepolygonal heads. The quality is that of astock model collection but with the capabili-ty to edit parameters such as the cheekbonesor the muscle tension of the neck. While notsuitable for a main character, it does providea simple and adequate method for addingvariety to background characters.

After polygons, the most glaring absencefrom version 1.0 was a dopesheet. A dope-sheet allows easy access to keyframes, andthankfully, Avid has included one in thisrelease. Also included is a spreadsheet pro-viding access to channel data for any num-ber of objects at the same time.

One other nice addition to the interfaceis the ability to launch a web browserwithin a viewport. Being able to have aweb tutorial available without togglingbetween applications is a really nice fea-ture. In fact, in everything from the newtutorial book, which lies flat even whileopen, to the video walkthroughs of fea-tures, Avid has gone out of its way to makeXSI approachable to users of every level.

With powerful polygonal tools, strongsupport for subdivision surfaces, enhance-ments to the user interface, and user-inspiredtweaks, this is a worthy successor to the her-itage of the Softimage product line. Softim-age is back, and I couldn’t be happier.

XXXX | SOFTIMAGE XSI 1.5 | Avid |www.softimage.com

XXXXXXXXXXXX=XXX

excellent

very good

average

fair

don’t bother

Page 9: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

20

P R O F I L E Sm a r k d e l o u r a | T A L K I N G T O P E O P L E W H O M A K E A D I F F E R E N C E

fter working with game developers for years atNichimen Graphics, Dave Aronson recently stepped

into the role of program manager for Direct3D andOpenGL at Microsoft. We caught up with him in

Seattle to talk about the future of these two APIs.Game Developer. So, what do you do at Microsoft?Dave Aronson. I’m a program manager in the D3DX team, doing

work with content creation tool companies and input from ourgraphics advisory board. My background has been dealing with cus-tomers and trying to make that pipeline work. We’re finding thatusers’ expectations for OpenGL are much different from those forDirect3D, which is kind of shocking, but there are different levels ofexpectations and desires.

GD. In the game community, there is a perception that theOpenGL Architectural Review Board moves at a glacial pace, andpeople are frustrated that new graphics features aren’t being incor-porated into the core OpenGL quickly enough.

DA. I’d say probably the majority of people who use OpenGLaren’t game people. I’m just pulling these numbers out of the air, butI would guess 90 percent of the Direct3D customers are game com-panies. With OpenGL, it’s probably more like 30 percent.

GD. Are you worried at all about cross-platform compatibility orare you just concentrating on Win32?

DA. On the Direct3D side or the OpenGL side? On the Direct3Dside there are some issues with it being cross-platform. As we moveforward into things like .NET, things change. For cross-platformtitles people use OpenGL, and that’s one of the major reasons whypeople use OpenGL versus Direct3D. It’s our concern to make theWindows platform experience better, but as Microsoft’s businessgrows outside of the Windows platform, anything is a possibility.

GD. Which game platforms have you worked on?DA. I did 3DO for about a week. Part of the Game Exchange 1

libraries would take data and convert to Saturn, N64, Playstation,3DO, or PC. So you could have the same animation playing on allof them. I did a little Playstation 2 work before I left Nichimen —right now I’m not doing anything with Playstation 2 or Gamecube,but I still talk to people who are doing that stuff. I don’t think cross-platform game development is going to go away right now.

GD. It’s more important now than ever. With so many platforms,you have to do multiple SKUs in order to recoup your costs.

DA. It’s difficult moneywise and development-time-wise. Gamestake longer and longer to create. You can no longer sit in yourgarage, just two of you cranking out a game, one guy doing art andone guy doing programming. I’m sure that games are going to becoming out on every platform, but it will require significant work —it’ll be interesting to see what types of trade-offs people make.Obviously PC and Xbox games will be an easier transition thangoing from PC to PS2 or Gamecube.

GD. There’s so much built into Direct3D now, things like N-meshes and progressive meshes, that if you do a PC title with

Direct3D, and youwant to port to aconsole besidesXbox, it’s going tobe trouble.

DA. I think youwill end up havinglots of differences between systems, where some systems can paint alot of polygons really fast so they can do more polygons, whereassome systems can do cooler things with each polygon. I vote for thesystems that can do cooler things with the polygons versus morepolygons in general. It’s kind of like the multi-texturing trade-offthat happened a few years ago, you can either precombine the tex-tures or just have lots of textures going on at the same time.

GD. You mentioned D3DX. What’s that? DA. I don’t think a lot of people have known about D3DX, but

it’s something that makes a huge difference between Direct3D andother APIs. Basically it’s a set of utilities that help the gaming experi-ence, like single-skinning functions, shader helpers, font utilities, andso on. There haven’t been any other toolsets that I know of thatpartner along with the API. D3DX will be a huge factor in makingPC games look awesome.

GD. All of Direct3D and D3DX are used for Xbox, right?DA. I can’t comment too much on what they have specifically, but

they certainly started off with Direct3D and they have access to theD3DX stuff, so hopefully what they choose is pretty close to whatwe have, because we think that it’s pretty clean.

GD. But you guys basically split the tree?DA. Basically we work with them, and hopefully Xbox will be in

the DirectX space, so a lot of the same stuff could be used. Whetheror not they choose to use it is up to them.

GD. Is it hard to support both Direct3D and OpenGL?DA. In my mind I see it as pretty clear, because they’re different

markets. Game developers involved with OpenGL have work todo if they really want it to be a game API. The hardware and soft-ware vendors that are traditionally in the OpenGL market can’treally do what they need to do using Direct3D right now. AsDirect3D gets more features, those delineations are disappearing.I think you’re probably looking at very few things now thatDirect3D can’t do, and a lot more things that Direct3D can do ontop of OpenGL.

GD. Where do you think graphics are going from here? Graphicshardware is getting very advanced.

DA. You’re going to see more programmability — but it’s goingto be the same phenomenon as with console games. In the firstyear, the games are pretty good but they’re only a little differentfrom what came before. Then developers figure it out and do someamazing stuff. We’ll see things that are completely programmable,then people will go, “It’s not as good because they didn’t use thetraditional ways.” So we need to find that happy medium. q

Dave AronsonDirecting Direct3D

ABOVE. Microsoft’s Dave Aronson.

m a y 2 0 0 1 | g a m e d e v e l o p e r

Page 10: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

w w w . g d m a g . c o m 23

L ong before the first humanused mathematics to calcu-late the area of a circle or thespeed of a falling rock, peo-ple recorded their experiences

and feelings through artistic expression.Early man used the materials in his sur-roundings for utilitarian purposes as wellas to express his developing humanity.History was recorded with ornate carv-ings on stone and wood. Elaborate paint-ings deep within caves told of both signif-icant conquests and the frustrations ofeveryday life.

Like many programmers, I often findmyself digging deep into my forebrain, try-ing to get in touch with this primitive artis-tic aptitude. I want to get beyond my ratherutilitarian duties and express more basicartistic emotions. My artistic friends oftenclaim I must have had that part of my brain

removed early in my life. At that point Igrab my big caveman club and go do someartist-bashing of my own.

Still, the urge to create persists. Thismonth, I am going to try to re-create imagesin the style of these early cave paintings.The dominant feature of this type of draw-ing is the charcoal sketch lines that definethe outline of the object. We have run intothis before in the cartoon rendering systemthat I described in this column last year(“Return to Cartoon Central,” August2000). When implementing the ink lines for

the cartoon system, I simply rendered all ofthe back-facing edges of the mesh and reliedon the Z-buffer to sort the rendering out.That gave adequate though not particularlyflexible or stylistic results. In order to createthe more random, hand-drawn look, I willneed to calculate the actual edges that makeup the silhouette of the object.

Tracing the Outline

L et me recap what makes up a silhou-ette edge. A triangular mesh is obvi-

j e f f l a n d e r G R A P H I C C O N T E N T

J E F F L A N D E R | When not trying to make fire in his cave on the

hill, Jeff can be found trying to evolve into someone more artistic at

Darwin 3D. Send him your evolutionary accomplishments at

[email protected].

Images from Deep in theProgrammer’s Cave

Images from Deep in theProgrammer’s Cave

Page 11: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

ously composed oftriangles. Each tri-angle is made ofthree edges whichconnect the threevertices of the tri-angle. In a closed,regular mesh, eachedge of the trian-gle is shared withanother triangle.For an edge to beon the silhouetteof the object, oneof the trianglesthat share the edgemust be facing theviewer and the other must be facing away.Once I have determined the two faces thatshare an edge, I can calculate whether it ison the silhouette easily by looking at theface normals.

So the first step is to create an edgedatabase that contains all the edges in themesh that could possibly make up the sil-houette. I will need to store two indicesinto the model vertex list. These indiceswill point to the two endpoints of theedge. In addition, I want to store the nor-mals for each of the two faces to whichthe edge is connected.

Given a triangular mesh, I can gothrough each triangle and generate thisedge database. I want to make sure thateach edge is only represented in the data-base once. That means I need to be awarethat the order of vertices is most likelyreversed in the second connected triangle.

Once I have collected all the edges intothe database, I have the complete poten-tial silhouette edge pool for the model. Asyou can see in the clock in Figure 1, thereare quite a few edges in the model. In thisparticular image, there are 444 edges. Itshould be apparent, however, that manyof them couldn’t possibly be part of thesilhouette. For example, some of the edgeson the front face of the model are clearlynever part of the silhouette, so I don’twant to consider them. If the normals ofthe two triangles that share an edge areequal, the two triangles are planar, andthat edge cannot be part of the silhouette.

I still may actually want to draw thatedge in some cases. For example, if theedge makes up a boundary between two

different textures or materials, I maywant to always draw the edge if it iswithin view. However, most of the time,this is not the case.

So, I now have established my first rulethat will reduce the number of edges Ihave under consideration. If the adjoiningtriangles are planar, the edge is rejected. Ican test for this condition by seeing if thedot product between the two triangles isequal to one. If they are, the edge can bedumped. On the clock model, this simpletest drops the edge count from 444 edgesdown to 256.

You might be tempted to reject theedge if the angle between the adjacenttriangles is very small, say two or threedegrees. That seems pretty close to pla-nar. However, let me use an example toexplain why that will not work. Let’sassume we have a model of a cylinderwith five divisions along its length. Nowscale the vertices at the center of thecylinder so that they are slightly largerthan the two ends. Scale the vertices atevery other division along the cylinder sothey smoothly interpolate to the two endcaps. This should give you an object thatis roughly cigar shaped. If the scaling isnot great, the connected angle betweentriangles along the length will not begreater than two degrees. As you can seein Figure 2, the problem is that if youview the cylinder along its length, eventhis slight angle will create the need for asilhouette edge along the length. It’s clearthat even the slightest change in anglegreater than zero degrees could potential-ly create the need for a silhouette. So it is

probably better to eliminate only com-pletely planar edges.

To Draw or Not to Draw

N ow that I have my database of edges, Ineed to decide what should be drawn

for a given view. As I said earlier, I can usethe edge-triangle normals to determine if anedge is on the silhouette.

I can find the angle between the viewerand the triangle face by using the dot prod-uct. The dot product of the triangle normaland the view vector is equal to the cosineof the angle between them. You may betempted simply to use the Z-axis as theview vector. However, due to the perspec-tive projection normally used in 3D view,this will yield visual problems as the objectgoes to the edges of the display. To coun-teract this problem, the view vector is usu-ally defined as the vector from a point onthe edge in question to the eye vector.

This gives me a couple of mathematicequations:

where N1 and N2 are the shared trianglenormals, E is the eye point, and V is apoint on the edge in question.

As a trivial test, I know that I probablyalways want to draw “hard” edges if theyare facing the view. A hard edge is an edgewhere the angle between the adjacent tri-angle, or “crease angle,” is greater than adefined amount. I usually find that 60degrees works pretty well for defining hard

dot N E V

dot N E V

1 1

2 2

= • −( )( )= • −( )( )

m a y 2 0 0 1 | g a m e d e v e l o p e r24

G R A P H I C C O N T E N T

FIGURE 1 (left). A mesh clock and its edge database. FIGURE 2 (right). Slightly nonplanar edges rejected (A); Completelyplanar edges rejected only (B).

Page 12: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

edges; however, this value can be set foreach model. For nondeforming models,this test can also be done ahead of timeand the edge flagged if it is a hard edge.

This gives me three tests to determine ifI should draw an edge. I should do so if:• dot1 > 0 and dot2 < 0 (the edge is on the

silhouette),• dot2 > 0 and dot1 < 0 (the edge is also on

the silhouette), or• The edge is “hard” and dot1 < 0 or dot2

< 0 (at least one of the connected trian-gles is facing forward).That will render the set of edges which

are hard or make up the silhouette. Thenext step is to give the lines a form of ran-dom, sketched feel.

Wiggle It Just aLittle Bit

T o create the look of someone sketch-ing in a more natural manner, I want

to vary the lines a bit. The first step tocreating more natural-looking lines is todraw the edges multiple times, randomlyoffsetting the end positions slightly eachtime. Just this simple step helps a greatdeal. However, it also adds another prob-lem. Since each edge is considered sepa-rately, these random offsets are appliedto each edge. The result is a slightly ran-dom but very chaotic effect, as each edgemay no longer be connected to the nextone. That is not generally how peoplesketch objects, though it creates a prettyinteresting look that may be useful insome applications.

In order to re-create a look more similarto human sketches, I need to consider morethan the single edge. I need to look for along series of edges combined to create alarger stroke that I can draw all at once.

To create organized strokes from a setof unorganized edge data is going to takesome data shuffling. I could look for con-nected edges and start drawing themtogether; however, that method wouldcreate unorganized strokes that wanderall over the model. The look I am tryingto achieve is much more organized. Anartist would probably not sketch linesthat start at random and wander.

In order to organize the strokes in somemanner, I made some assumptions. Myvirtual artist will tend to draw strokes

from top to bottomand from left toright. That seems avalid assumptiongiven the westernstyle of writing. So,the first step is toorganize all theedges in this manner.If the dominantdirection of an edgeis top to bottom, Iwill then organizethe index pointers sothe vertex indices gotop to bottom. Like-wise, if the dominant edge direction is sideto side, I will then organize the indices leftto right.

Now I begin the automatic search forstrokes — you can think of each edge ashaving a head and a tail which correspondto the first and second vertex index. I startat any point in the edge database and lookat an edge. I then attempt to move back-ward up the stroke to find a potentialstarting point. This is accomplished bysearching the edge database for an edgewith a tail index value that is equal to thehead index value of my current edge. If Ifind the edge that is ahead of the currentone, I need to make sure it should be partof the same stroke.

The dot product is used once again tosee if a candidate edge should be part ofthe same stroke. The test determines theangles between the two edges. If the anglebetween them is less then a given value (Ihave found that 36 degrees works well), itshould be considered part of the currentstroke. At this point, the search for thehead of the stroke continues until eitherno other edges can be found or the anglebetween them is too severe. The currentedge is then marked as the head of thecurrent stroke.

Once the head of a stroke is deter-mined, the system works its way downthe stroke looking for the end using thesame method of finding the next edge andseeing if it qualifies. Once this is finished,I have a complete stroke. I should notethat this routine could be easily modifiedto limit the maximum stroke length to adefined value. For example, a certainartistic style may limit the length of a sin-

gle stroke to a few edge segments. Mycurrent implementation allows strokes ofarbitrary length as long as the strokesteps obey the angle rules.

Stroke results for meshes vary greatlydepending on the mesh layout. However,fairly long strokes of more than eightedges are typically achieved. In Figure 3,you can see a typical model with a strokethat has been identified along the back ofthe buffalo object.

Stroke Man, Stroke Man

O nce I have built my list of possiblestrokes from the edge database, I can

start drawing. Now I can use the randomjitter that I discussed earlier on each ver-tex along the length of a stroke. This willgive the random look to each pass but stillkeep the strokes as one continuous move-ment. I can compute a new random jittereach frame or precompute it and store itin the edge structure. Both methods haveinteresting properties. If I compute the jit-ter randomly each frame, the strokes willlook different every frame. While this cre-ates an interesting “constantly beingdrawn” type of effect, there is a real prob-lem with frame-to-frame coherence. Theconstant movement is a bit distracting. Ifthe jitter is precomputed, the model lookscorrect as it moves and turns; however,the random effect is less noticeable. Sinceit is easy to do, it makes sense to haveboth methods available.

I should say another word about frame-to-frame coherence. This is an importantissue with regards to artistic renderingtechniques. It is quite easy to come up

m a y 2 0 0 1 | g a m e d e v e l o p e r26

G R A P H I C C O N T E N T

FIGURE 3. The stroke on the back of the buffalo.

Page 13: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

with a technique that creates a very inter-esting style when viewing a static scene.However, when the model or the viewchanges, the effect can be overwhelmed bythe frame-to-frame changes. It is impor-tant to deal with this issue when workingon a technique.

When researching this idea, I looked at acouple of papers that calculated the strokelines by doing image processing computa-tions on the 2D rendered frame buffer (seeFor More Information). This method limitspotential overdraw issues and allows forlonger stroke lengths that don’t follow theactual topology of the model. However,frame-to-frame artifacts are particularlynoticeable using this technique.

Rendering the strokes allows for agreat deal of opportunity to create differ-ent forms of effects. The most direct andsimple method is to draw the strokes withsimple line primitives. I found that it isinteresting to change the color and thetransparency value for the line at variouspoints along the stroke. This gives a morenatural look to the drawn line.

Another improvement is to go beyondsimple line primitives and actually drawpolygon primitives along the length of thestroke. Using this method, it’s possible tovary the stroke width along its length. Thestroke polygons are created by building atriangle strip whose vertices are offset fromthe mesh vertices in the plane of the screen.This displacement vector can be determinedby taking the cross product of the edge andthe view vector. This is very similar to thebillboard method used to create texturedsprites that always face the viewer in a 3Dgame. The amount of displacement alongthe length of the stroke can then be varied,and a “stroke texture” can even be appliedto the object. Since we have already deter-mined that the edge is in view at this point,very few additional polygons are added tothe render using this method.

Listen Up,You Degenerate

I said earlier that this system works forclosed, regular meshes. That means

that each triangle edge is connected toexactly one other triangle. There are noedges that are only connected to one tri-angle and no edges connected to more

than two triangles. In most cases, this is agood thing to create for a variety of rea-sons. It is just good 3D modeling, andyou should encourage all 3D artists tocreate models this way. However, devel-opers live in the real world. Not all mod-els are created equal. You will run intodegenerate triangles in models.

How do you deal with this? The easyanswer is to identify where the problem isand have the artist fix it. This may notalways be possible, so we should deal withthe problem. If an edge has only one tri-angle attached, what should I do? It islikely that this is something we would liketo draw if it is visible. So, one approach isto mark it as “draw if seen,” just as I didwith the hard edges. The other approachis never to draw those edges. Whateverlooks best for your model will work fine.

For edges that connect to more thantwo triangles, the easiest solution is toadd a second entry in the edge databasefor the extra triangle and connect it toone of the other triangles. Or, to be morethorough, you could have three entries inthe edge database to cover all possibili-ties. It will all work out, so don’t sweat ittoo much. While degenerate triangles maybe a bigger problem in other algorithmsthat use silhouettes, such as shadowing,for this application it shouldn’t matter.

Adding SomeMore Detail

I can still combine the stroke renderingsystem with another system for filling

in the details of the model. In fact, I real-ly need to draw the object to some extentif I want it to look exactly correct. Thesilhouette algorithm detects edges even ifthey are behind or covered by other partsof the object. As long as they are silhou-ettes relative to the viewer, the system willdraw them. Since everything is drawnwith its correct Z information, I can usethe Z-buffer to cover up the parts thatshould be covered.

I can simply render the triangles of theobject first, writing into the Z-buffer butnot writing any color information. Or,another option is to actually draw the fillcolors. For a cartoon system with thistype of stroke line, you will want to drawthe paint colors.

For the cave painting example in Figure3, I used my cartoon painting system todraw shading slightly translucent on onlythe highlights. I then set the rest of thepaint to render completely transparent.This writes to the Z-buffer but doesn’tchange the colors, and the stroke comesout correct.

Climbing Out of theDark

N ow we have a nice system for render-ing artistic-style drawings with multi-

ple ink strokes. There are some places wherewe can do some more work. The currentsystem looks at all the potential edges everyframe. This could be a bit costly for a largedetailed model. A better approach would beto store the results from the previous frameand test those edges first.

Another optimization method would beto precompute which edges are visible fromvarious angles and store them in index lists.Then, by comparing the current view anglewith the precomputed lists, the amount oftesting needed could be greatly reduced.

Once an optimized method for comput-ing silhouette edges is created, it can beused for things other than artistic renderingstyles. The computation of an accurate sil-houette is also very helpful when trying toshadow objects in a 3D environment — butthat will have to be the topic for anotherday. Until then, explore the sketch render-ing system by grabbing the demo andsource code off the Game Developer website at www.gdmag.com. q

28 m a y 2 0 0 1 | g a m e d e v e l o p e r

G R A P H I C C O N T E N T

B Northrup, J.D., and Lee Markosian. “Artistic

Silhouettes: A Hybrid Approach.” Proceed-

ings of the First International Symposium

on Non-Photorealistic Animation and

Rendering (NPAR 2000). pp. 31–37.

See www.cs.brown.edu/research/

graphics/research/art/artistic-sils.

B Curtis, Cassidy. “Loose and Sketchy Anima-

tion.” SIGGRAPH 98 Technical Sketch. See

www.cs.washington.edu/homes/cassidy/

loose.

FOR MORE INFORMATION

Page 14: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

O hhh, the pain . . . O.K., it’s not that bad, butbuilding a game font isn’t usually at the top ofmost game artists’ “favorite things to do” list. It issomething that will certainly take up a portion oftime in the development cycle. Depending upon

the complexity of the user interface and the requirements of thegame, it can balloon into one of those tasks which seems to eat updays of your production schedule. A logical approach to determin-ing the needs of your game and a good production plan can makethe process much more palatable.

So what is a game font? Well, it loosely describes a set of celsthat translate to a specific set of keyboard inputs, allowing for textor keyboard-based input and display in a game environment. Somegames will bypass the use of cels by utilizing a TrueType font forin-game interfaces. TrueType is a digital font format that was origi-nally designed by Apple Computer. It is a vector-based file that isefficient in storage and processing. One of the key things it con-tains is “hinting” information, allowing the designer to give hintson defining which pixels are used to create the letter form at verysmall sizes and create the best character bitmap shape. (I’ll talkmore about hinting later in the column.)

One of the things that a TrueType font doesn’t do is give you theability to have a multi-colored font, or a font with a drop shadowor any number of bitmap tricks that can be created in a paint pro-gram. In order to explore this, let’s take a closer look at TrueTypefonts and some of the ramifications you might need to think aboutbefore choosing them for your game.

I Found It . . . It’s Free!

W hy wouldn’t you simply choose or build a good TrueTypefont for your game and be done with it? Well, there are

several things to consider before going down that path. One of thefirst issues to become familiar with is the copyright on the font.While it is easy to download hundreds and hundreds of TrueTypefonts off the Internet in a matter of an hour or two, that doesn’tconstitute legal ownership.

Many of the fonts available on the Internet are specifically copy-righted, and the owners want a piece of the action. The last thingany developer wants is to have a suit leveled against them for usinga custom font that they were sure was a freebie based upon theinformation they got off of “www.these_fonts_are_free.com.” Oneof the big problems with these readily accessible fonts is that theirorigins may be difficult to track. Don’t assume that a font is free,

even if you’ve found it on several font web sites under the free sec-tion. While some sites make an effort to be legal and fair, some donot. I discovered in one case, after some research, that a font I wasinterested in had originated from a company whose sole businesswas to create, copyright, and sell custom fonts. None of the sites Ivisited indicated the font was anything other than free.

Another problem with a large percentage of the “free” fonts onthe Internet is that they don’t really do you much good when itcomes to localization. Many of those that are available are simplydisplay type fonts which contain the numbers and upper- and low-ercase letters, but not much else. The characters needed for localiza-tion in other languages are oftentimes left out. You may find thatyour free font needs to have a large number of characters added.

Localization Considerations: ThosePesky Umlauts and Other Doohickeys

O ne of the primary goals of a game font is to allow the prod-uct to be localized or converted to a foreign language with

as little pain as possible. Sure, it’s easy enough to make the text fitin the right spots in English, but what happens in the Germantranslation? How about French? Italian?

The other big advantage of a text-driven font is flexibility.Imagine a game GUI where you’ve made 30 custom-sized but-tons with the word “accept” embedded into the artwork. If thedesigner decides to change the word to “O.K.,” you’ve got somePhotoshop work to do. If, on the other hand, the text is code-driven and placed over the background artwork, then a 15-sec-ond search and replace in a text file is all that is needed toupdate the design.

One thing you should consider avoiding is text that is incorpo-rated or embedded into the art. The main reason is that each assetthat contains text will need to be tracked and touched for everylanguage conversion. This may not seem to be that big of a dealat first, but if your game ends up being a big hit, you can bet that

w w w . g d m a g . c o m 31

m a r k p e a s l e y A R T I S T ’ S V I E W

M A R K P E A S L E Y | Mark hangs his hel-

met at Gas Powered Games, where he’s the

art director on a real-time 3D RPG called

DUNGEON SIEGE. Drop him a line at

[email protected] or visit his web site at

www.pixelman.com.

Page 15: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

the marketing department will want to leverage it intoevery possible country. This generally means that as soonas the game is released to market, the localization processwill begin in earnest. The more custom rework there is tobe done, the longer each language conversion takes, andthe more chance there is for errors to be introduced intoyour artwork. As someone who once converted an entireinterface to Japanese (I don’t speak or write the language),I can assure you that this is not a pleasant task.

As a rule, try to keep most of the interface and gamegraphics free of embedded text. In some cases, however,it is unavoidable. If you limit such occurrences as muchas possible, you will be better off. If you do embed thetext, keep an up-to-date spreadsheet of which assets con-tain text. This will make tracking down those pesky filesmuch easier. Also, keep your base Photoshop files in lay-ers, with the text separated in its own layer. This willmake it easier for the artist involved with converting thefiles to the new language. As an added bonus, it allowsyou just a bit more control over how much alterationoccurs to the art. If all someone is doing is replacing atext layer, then they won’t have much of a chance todegrade or alter your textures.

Character Sets, Single-Bytes,and All That Technical Stuff

I n order to explain a little about what’s going on underthe hood of a game font, we need to understand some

of the basics. So what exactly is a character set? In tech-nical terms, it is a set of glyphs or shapes that representthe letters which make up a font. Certain languages havespecific glyphs that make up the necessary shapes for thatfont to be read.

Characters are represented by what are known as charactercodes. These codes are generated and stored when a user inputs(using the keyboard) a document. Most of the Western Europeantranslations can be covered by the use of a single-byte characterset which provides 256 character codes (see Figure 1). This setgenerally contains the Latin letters, Arabic numerals, punctuation,and some drawing characters.

However, 256 characters falls well short of what is necessaryfor users of a single font for the Far East, which may need asmany as 12,000 characters. In order to provide the necessarycharacter codes, double-byte or multi-byte character sets(DBCS/MBCS) are used. These sets are a mixture of single-byteand double-byte character encoding and provide more than65,000 character codes.

Unicode is a 16-bit encoding method which covers many of thecharacters used in general text interchange throughout the world.All Unicode values are double-byte, which simplifies the way aUnicode-based system reads a string of text. While it is easier todeal with than the multi-byte character sets (according to a pro-grammer I know), it is incompatible with the APIs of Windows95 and Windows 98. Because of this, it may be a few yearsbefore a 100 percent Unicode game will come out.

Building Your Own TrueType Font

A fter determining that you will be using a single-byte char-acter set, you will most likely consider creating your own

TrueType font. After all, that would solve your copyright issueand give you the creative freedom to customize your font asneeded, right? (Insert dramatic pause here.) Well, you will wantto consider this carefully.

Creating a useful TrueType font is no small undertaking. Fontdesign is an art in itself and requires a lot of attention to detail aswell as a firm understanding of good design principles. Ratherthan mathematical precision, a well-designed font relies on visualequality. Each letterform is considered for its balance, and subtlealterations are made to create a visual equality among the letters.In addition, for the font to be usable and, more importantly, read-able at the lower resolutions common in game interfaces, it willneed to have hinting.

All of these subtleties take time and a keen eye in graphic design.In addition, you will need to get a font-specific program such asMacromedia Fontographer in order to create the font easily. Onceyou have it, you will need to spend some serious time not onlyfamiliarizing yourself with the various specialized glyphs in your

m a y 2 0 0 1 | g a m e d e v e l o p e r32

A R T I S T ’ S V I E W

012345678910111213141516171819202122232425262728293031

3233343536373839404142434445464748495051525354555657585960616263

!"#$%&'()*+,-./0123456789:;<=>?

6465666768697071727374757677787980818283848586878889909192939495

@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_

96979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127

`abcdefghijkl

mnopqrstuvwxyz{|}~

128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159

ccƒ„

…†‡ˆ

‹Œ

‘’“”•–

—˜

›œ

Ÿ

160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191

¡¢£¤¥§

¨©ª«¬

®-º±

´µ¶˙¸

˚»

¿

192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223

ÁÀÂÃÄÅÆÇÈÉÊËÌÍÎÏ

ÑÒÓÔÕÖ

ØÙÚÛÜ

ß

224225226227228229230231232233234235236237238239240241242243244245246247247249250251252253254255

àáâãäåæçèéêëìíîï

ñòóôõö÷øùúûü

ÿ

FIGURE 1. An example of an ANSI character code chart that contains the charactersused for Western European translation.

Page 16: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

m a y 2 0 0 1 | g a m e d e v e l o p e r34

A R T I S T ’ S V I E W

character set, but also getting a firm control of the program. Onceyou’ve gotten to the stage of actually creating the letterforms, youwill then need to start considering kerned pairs and hinting.

Hinting

S o what exactly is hinting and what does it do? The easiestway to think about it is to consider what happens to a font

when it is rasterized or converted to a bitmap for display on yourscreen. The vector information is converted to a bitmap and anti-aliased to provide a smooth line that defines the letter. This is afairly straightforward process until the font size is reduced downto a small size. Once you get into the 10- to 14-point range, thedefinition of where the lines go is more difficult for the programto determine when it converts the vector information to a bitmap.At a certain point, a choice needs to be made concerning wherethe pixel is placed on the underlying rasterization grid. This iswhere hinting comes into play.

A hint is technically a mathematical instruction added to the fontthat distorts the character’s outline before it is converted to abitmap. These modification hints allow the designer to have a fairlyhigh level of control over the resultant bitmap shape of the letter.

Without this type of control, features that define the font (lineweight, widths, serif details) can become inconsistent, irregular,and sometimes even missed entirely. This can have a dramaticeffect on how legible the font is. In Figure 2, you can see howthe letter would reduce down if it were simply scaled to theappropriate size and rasterized. The second image shows howthe hinting alters the letter shape so that the placement of thepixels is controlled. This, in turn, causes the font to be muchmore legible at a small size.

As you might guess, this sort of customization on a letter-by-let-ter basis can become a substantial time sink. If you are dealingwith a larger publisher, they may already have purchased rights touse some fonts in their products. This doesn’t lend itself to a cus-tom look, but it can save time and money if the font isn’t too crit-ical of an element in the overall design.

Building a Bitmap Font

A nother alternative is to consider building a bitmap font.These are usually created by rasterizing a font, which can

contain multiple colors and alpha transparency. The font is thendivided into cels which are linked to the character code via pro-gramming code. The good news is that it’s done in a paint pro-gram and is a fairly straightforward process.

There are a couple of different ways to create your font. Thefirst is simply to make a character set that contains every charac-ter needed for translation to the Western European countries. Thisentails rasterizing each of the 256 characters and laying them outin a base file. The exact layout is something you will be workingdirectly on with the UI programmer. A pixel is usually used todefine one side or corner of the cel that encloses the letter (seeFigure 3). These cels are then linked to the character codes.

If your game is a graphics-hardware-only solution, then consid-eration must be given to laying out the various characters so that

they fit on power-of-two texture maps. Again, this may be han-dled via a cut-up routine that the programmer establishes, or youmay need to lay them out on a custom basis.

In our example font (see Figure 4), each of the 256 charactercels needs to be accounted for and laid out on a 256×256 texturemap. The first 32 slots are blank, so oftentimes you can simplystart with cel 32 and continue from there.

Another method that can save on space is to have a text filethat is linked to the bitmap file. The text file contains nothingmore than the string of characters in the same order as they arefound on the bitmap font file. The advantage to doing it thisway is that the precise order of the cels need not be adhered to.It also allows you to add characters as needed without breakingthe code. This is also an excellent way to deal with multiple fontsizes if you only need a few specific letters. The downside is thatorganization begins to go out the window, and tracking twoassets that need to maintain an exact match can quickly turninto more of a headache than you might think.

Leading and Kerning in aBitmap Font

O ne of the disadvantages of a bitmap font is that kerning (thespacing between letter pairs) is usually not done. Because

kerning requires quite a bit more coding to accomplish, it usuallyends up on the cutting room floor. When dealing with a cel, youcan define how much spacing a specific letter gets on one side, but

FIGURE 2 (above). This is anexample of how hinting works.The first character image on theleft hasn’t been fitted to the under-lying grid, giving a poor patternand an awkward letter. However,the second image on the right isfitted to the grid, resulting in abalanced letterform.FIGURE 3 (left). A close-up of the celthat defines the “B” character.

Page 17: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

35

you won’t be able to get a customized kerning look. What thismeans is that your font will be generically spaced, usually with oneor two pixels between each letter, regardless of what’s next to it.

While this isn’t the ideal solution visually, it is one of thosethings that we’ve become accustomed to seeing in games. If youhave some free time on your hands, and the UI programmerwants to get fancy, you can make specific kerned pairs of letters,such as lowercase double ls (ll) or double os (oo). The code isthen set up to detect any of the unique letter combinations thatyou have custom spaced, and replaces the standard-spaced let-ters with your kerned pair.

Hopefully, this has given you a bit of insight into creating agame font. I’ve done quite a few of them over the years, andeach time it’s a bit different. Each program and each program-mer working on the UI approaches the problem differently fromthe production standpoint. If you take the opportunity to planthe process out and do some research first, it can save you a lotof wasted time later. q

A R T I S T ’ S V I E W

FOR MORE INFORMATION

Macromedia Fontographerwww.macromedia.com/software/fontographer

Microsoft Typographywww.microsoft.com/typography

TrueType Font Specificationwww.msdn.microsoft.com/library/toc.asp?PP=/library/toc/specs/specs12.xml&tocPath=specs12

FIGURE 4. An example font laid out to fit onto a 256×256 texture map. Notethe pixels that define the cel borders. These are usually in a unique colorso that the code can recognize the border pixels.

w w w . g d m a g . c o m

Page 18: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

M any games being written today take advantage of

graphics cards that support hardware transformation

and lighting when available. But some of these games

also have vertex data that is modified dynamically for

performing techniques such as multiple-bone skinning

of meshes. Ironically, when modifying the vertex data dynamically on a per-frame basis, a

significant speedup can sometimes be gained by modifying more of the data. In this arti-

cle we’ll take a look at accelerated graphics port (AGP) memory and the interaction

between the processor, the chipset, and the graphics card. In the process, we’ll learn

about write-combining memory and how to avoid partial writes which can slow down

your AGP updates. When we’re

finished, you’ll have an under-

standing of these terms and how

to use this information to

achieve performance increases of

up to 20 percent or more in

your games. Let’s start by exam-

ining what AGP memory is.

m a y 2 0 0 1 | g a m e d e v e l o p e r36

F A S T A G P W R I T E S d e a n m a c r i

D E A N M A C R I | Dean is a technical mar-keting engineer within the Solutions Enabling

Group at Intel. He enjoys working withmathematical aspects of 3D graphics and per-formance optimization techniques. Dean wel-comes e-mail on anything 3D-related and can

be reached at [email protected].

CPU

Graphics Card

Chipset Memory

Memory Bus(Front-Side Bus)8B/s * Bus Speed

PCI133MB/s

AGP>1GB/s

cache

FIGURE 1. PC architecture with AGP 4x support.

Fast AGP Writesfor DynamicVertex Data

Fast AGP Writesfor DynamicVertex Data

Page 19: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

w w w . g d m a g . c o m 37

Illus

trat

ion

by J

uan

Alv

arez

Page 20: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

AGP History

I ntroduced with the Intel Pentium II processor in 1997, theAGP interface provides a high-speed mechanism for video

cards to access main system memory. Debuting at 266MB/s peaktransfer speed, the current specification, known as AGP 4x,allows for a peak transfer rate of 1,067MB/s, eight times fasterthan the standard PCI bus found in desktop systems. Figure 1depicts the architecture of a PC with support for AGP 4x. Noticethat the graphics card has a direct pathway along the AGP bus,through the chipset to the system memory. For a system with a133MHz front-side bus, the AGP bus speed is equivalent to thememory bus speed but still falls short of the 3.2GB/s peak busspeed of Pentium 4 processor–based RDRAM systems.

In addition to the high transfer speed, requests on the AGP buscan be pipelined, whereas the PCI bus only supports sequentialtransfers with a special case for bursting. Figure 2 shows the bene-fit of pipelined access as provided by the AGP specification. ThePCI bus requires that the data D1 arrive from the memory requestfor address A1 before it can submit a memory request for addressA2. In a more efficient manner, the AGP bus can accept memoryrequests for addresses A2 through An while waiting for data itemD1 to arrive. In this fashion, data items D2 through Dn arrivemuch sooner than in the nonpipelined scheme such as that provid-ed by the PCI bus. Something we’ll talk about later is a burstoperation that both the AGP and the PCI buses support. In aburst operation, a small number of data items (four to eight) can

be sent across the bus with a single memoryaddress request.

The AGP bus also provides an additional eight“sideband” address lines to allow more overlap-ping of previous data and addresses on the main32 wires with new addresses and requests, forfurther performance improvement. We won’tneed to know any more about the underlyingprotocol and addressing scheme of the AGPspecification, but the description just providedshould help us better understand what’s going onunder the hood of the machine. What will be

essential is to realize that the graphics card uses the AGP interfaceto access data in the system’s main memory. It’s this data in mainmemory that we’re going to look at in detail.

Prerequisites for AGP Memory

F or applications to be able to take advantage of the benefitsof the AGP bus, the operating system and the hardware

must perform several housekeeping tasks. First, because systemmemory is being used primarily for typical applications, therecan be considerable fragmentation based on what applicationsare running and what particular memory allocations haveoccurred. A request to allocate 256KB of memory for the graph-ics card to access via the AGP bus could result in several small,noncontiguous chunks of main memory being allocated. Tomake this appear as one contiguous 256KB piece of memory tothe graphics card, the chipset, which controls the communicationbetween the processor and main memory as well as the PCI bus,has something called a Graphics Address Remapping Table(GART). The GART maps a linear range of virtual memoryaddresses to multiple 4KB physical addresses in main memory.Figure 3 shows an example of a region of linear memory visibleto the graphics card, with the memory being mapped to a non-contiguous set of pages in physical memory. The amount ofmemory available for remapping by the GART is often deter-mined by a setting in the BIOS known as the AGP aperture.Values vary from system to system, but there is usually a maxi-mum limit of half the available system memory.

We’ve addressed the tasks the chipset must perform. Now,because the graphics card will be accessing the memory regularlyand performance is critical, the operating system must make surethat memory which will be accessed by the AGP bus is notswapped out to disk. The operating system does this by lockingthe pages of memory. Finally, because current processors haveone or more levels of cache to improve performance of typicalapplications, something must be done to make sure the graphicscard sees the most up-to-date data. To achieve this withoutrequiring the graphics card to “snoop” the caches of the proces-sor, the memory being used for AGP transfers is marked as notcacheable, or uncacheable, by the processor. This uncacheablememory is the heart of what we’re going to look at to achieveperformance improvements in 3D applications. To understand it,we need to examine a feature which Intel processors have carriedfor several generations.

m a y 2 0 0 1 | g a m e d e v e l o p e r38

F A S T A G P W R I T E S

LinearVirtual

MemoryAddresses

FragmentedPhysicalMemoryAddresses

GART

A1 D1

D1 D2 D3 D4 Dn

D2PCI A2

AGP A1 A2 A3 A4 An ……

Memory Latency

FIGURE 2 (top). AGP pipelining versus PCI transfers.FIGURE 3 (bottom). Remapping of memory addresses through the GART.

Page 21: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

Memory Types

S tarting with the Pentium Pro processor, Intel processors haveprovided a mechanism for changing the access characteristics

of regions of memory via a set of registers known as the MemoryType Range Registers (MTRRs). These registers are not accessibleto a normal application and can only be changed by the operatingsystem or a device driver. However, the drivers that support AGPmemory use the MTRRs to provide the right characteristics to thememory being accessed by the graphics card. Let’s look at the var-ious options that can be selected using the MTRRs.

Table 1 shows the most common memory types used by cur-rent systems. Most of the memory in a system is marked ascacheable memory, with one of two schemes for synchronizingcache memory with main memory: write-back or write-through.With write-back cacheable memory, both read and write cachemisses cause cache line fills. However, write-back memory onlywrites cache lines back to main memory when they are beingevicted due to contention with another memory access or explic-itly by being invalidated by the processor. Write-back memoryprovides the best performance possible, because in many casesthe processor can do many operations on the data in the cachebefore ever writing out to main memory. However, this requiresthat any device with access to main memory be able to snoopmemory accesses in order to maintain system memory and cachecoherency. Write-through memory still performscache line fills on read misses but never onwrite misses. All writes are written to acache line (assuming a cache hit) andthrough to main memory.

Interesting things happen when memory ismarked as uncacheable. All reads and writesgo directly to system memory, bypassing thecaches. As you can imagine, this slows down bothread and write accesses, leading one to wonder whymemory would ever be marked as uncacheable. Let’sanswer this question by revisiting something we brieflytouched on previously. Sometimes, devices other than theprocessor need to fetch data from main memory.The obvious example would be the graphicscard fetching data from main memory via theAGP bus. In doing so, there needs to be away to make certain that data writes doneby the processor appear in the actual mainmemory, not just in the data caches to

which only that processor has access. Additionally, the graphicscard may also write to main memory, so the processor needs to becertain that if it reads from the memory, it sees the actual datawritten by the graphics card and not some old data stored in thedata caches. By marking memory as uncacheable, we can be cer-tain that the data the graphics card sees is identical to what theprocessor sees and vice versa.

To further complicate things (but to improve performance insome cases), memory can be marked using a fourth type: write-combining. Write-combining memory is uncacheable but with atwist. When writing to write-combining memory, there are a fewbuffers internal to the processor where data writes are temporarilystored. The number of buffers varies with each new processor, withfour on the P6 family of processors (Pentium Pro, Pentium II, andPentium III) and six on some later versions of the Pentium IIIprocessor and on the Pentium 4 as well. More buffers means per-formance improves, because you can disperse your writes a bitwithout causing an eviction. Let’s take a closer look at these write-combining buffers to see what advantages they bring to the table.

Write-Combining Buffers

W hen discussing the AGP bus, we mentioned burst opera-tions supported by the PCI bus and the memory bus. In a

burst operation, rather then sending one memory address forevery eight bytes of data, it’s possible to send one memory addressfor one full cache line of data (32 bytes on the P6 architecture and

64 bytes on the Pentium 4 architecture). The datatransfer still only happens on a 64-bit bus, but thetransfers can happen more quickly because there’s

no need to wait for additional memory addresses.This bursting operation is used by write-backcacheable memory when it flushes a cache line outto main memory, so write-back cacheable memoryalways achieves the highest write throughput possi-ble. For uncacheable memory, the write-combining

buffers offer a means to achieve benefit fromburst transfers of data.

When software writes to memory that ismarked as write-combining, the processor

will begin to fill one of the write-combin-ing buffers (remember there are four orsix of these). It’s possible to think of thewrite-combining buffers as a very small,fully associative cache that is never filled

w w w . g d m a g . c o m 39

Memory Type Cacheable? Fill Cache on Read?

Fill Cache on Write?

Use Write-CombiningBuffers?

Uncacheable (UC) No N/A N/A No

Write-Combining (WC) No N/A N/A Yes

Write-Back (WB) Yes Yes Yes No

Write-Through (WT) Yes Yes No No

Table 1. Common memory types selectable with MTRRs.

Page 22: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

from main memory. As you write data, the buffers are filled, andyou can even read back the bytes just written without doing a fetchfrom main memory. You can also rewrite bytes that you’ve alreadywritten without causing an eviction. When you try to write data toa memory address that isn’t represented by one of the buffers, how-ever, one of the existing buffers will be evicted to main memory.This is where the magic happens. If every byte in the buffer (32bytes for P6 processors, 64 bytes for the Pentium 4 processor) hasbeen modified, then the buffer is transferred to main memory viaone burst transaction. If not every byte has been modified, then theprocessor writes the buffer out eight bytes at a time.

You’re probably beginning to see that if you modify 31 consec-utive bytes and don’t modify the 32nd, then it will take four bustransactions on P6-family processors to evict the data. The sameeviction could have happened with one transaction if you had justwritten data to the 32nd byte (of course, you’ll want to write theappropriate data for your application). On Pentium 4 processors,the worst case is even worse in terms of the number of transac-tions. If you modify 63 bytes rather than 64, it will take eight bustransactions rather than one — ouch. Fortunately, the high speedof the bus on Pentium 4 processor–based systems alleviates someof the pain. What we see, though, is that to achieve maximumperformance, it’s essential you modify every byte of a write-com-bining buffer.

The last thing to mention about write-combining memory isthat it is weakly ordered versus strongly ordered uncacheablememory that isn’t write-combining. Weakly ordered means that ifyou write out bytes 1, 4, 3, and 2 in that order, they won’t neces-sarily get written to main memory in that order. In fact, theyprobably won’t. This is due to the buffering performed by thewrite-combining buffers. Weakly ordered memory is fine for the

types of data being sent across the AGP bus. For devices that per-form memory-mapped I/O, however, writes would need to bestrongly ordered so that they appear on the bus in the exactorder that the program wrote them. To guarantee that all thewrite-combining buffers get written to main memory, severalinstructions are available, including SFENCE and MFENCE, CPUID, and afew others. Rest assured that the API (for example, MicrosoftDirectX) that gives you the AGP memory will manage the task ofmaking sure that all of your write-combining transactions havebeen committed to memory before allowing the AGP device toread the memory.

Experimenting with Write-CombiningMemory

W e’ve covered enough of the low-level details of AGP andwrite-combining memory. Now let’s see how to create a

sample application which demonstrates the benefits of ensuringthat the write-combining buffers are utilized properly. We’ll alsosee the deleterious effect of causing multiple bus transactionsdue to partially filled write-combining buffers. The techniquesI’m going to describe here are specific to DirectX 8 under Win-dows 98. There seems to be something unexpected happeningbehind the scenes on Windows 2000 which may be related tothe operating system, drivers, or both, so I won’t cover thathere. I’m also assuming that you understand how to use theDirectX APIs. If not, you can find the essential information atwww.microsoft.com/directx.

In a DirectX 8 Direct3D application, three basic types of dataresources can be allocated in AGP memory: vertex buffers, indexbuffers, and textures. Under DirectX 7 it was possible to requestAGP memory specifically. Using DirectX 8, however, there aresome guidelines that the application can make, but the API anddrivers ultimately determine where the resources are allocated. Forour example, we’re going to be allocating a vertex buffer that wewould like to reside in AGP memory. To do this, we must takecare of several things. First, we need to be creating a vertex bufferthat will be used by a graphics card which supports hardwaretransformation and lighting (currently, only the GeForce cardsfrom Nvidia and the ATI Radeon card fulfill this requirement).Otherwise, the DirectX API won’t allocate the vertex buffer inAGP memory, because it would severely limit the performance ofthe transformation and lighting pipeline. So, when we use theCreateDevice() method of the IDirectX8 interface, we need to specifyeither D3DCREATE_MIXED_VERTEXPROCESSING or D3DCREATE_HARDWARE_VERTEX-PROCESSING to be able to have the graphics card do the transforma-tion and lighting of the vertices.

Next, we need to include the usage flags D3DUSAGE_DYNAMIC andD3DUSAGE_WRITEONLY when calling the CreateVertexBuffer() method ofthe IDirect3DDevice8 interface. These flags indicate, respectively, thatwe’re going to be changing the data in the vertex buffer regularlyand that we’ll only be writing to the buffer. Additionally, we needto tell DirectX to allocate the buffer in the default memory pool(D3DPOOL_DEFAULT). With these restrictions, we should get a vertexbuffer allocated in AGP memory. For our example, we’ll use a ver-tex structure that contains information for vertex position, normal,

m a y 2 0 0 1 | g a m e d e v e l o p e r40

F A S T A G P W R I T E S

LISTING 1. D3DVERTEX structure from DirectX 7.

typedef float D3DVALUE;

typedef struct _D3DVERTEX {

D3DVALUE x; /* Homogeneous coordinates */

D3DVALUE y;

D3DVALUE z;

D3DVALUE nx; /* Normal */

D3DVALUE ny;

D3DVALUE nz;

D3DVALUE tu; /* Texture coordinates */

D3DVALUE tv;

} D3DVERTEX;

pDx8Device->CreateVertexBuffer(

mVertexSize*mNumVertices,

D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY,

D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1,

D3DPOOL_DEFAULT,

&mpVertexBuffer);

LISTING 2. Creating the sample vertex buffer in AGP memory.

Page 23: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

and one set of texture coordinates, as shown in Listing 1. I’ve cho-sen this format for two reasons: it’s the D3DVERTEX structure that wasused by previous versions of DirectX, and more importantly, it’sexactly 32 bytes, which is the size of one cache line on P6-familyprocessors and half a cache line on the Pentium 4 processor.

Listing 2 shows a code snippet for creating a vertex buffer usingthe flags just described. In the example, pDx8Device is a pointer tothe IDirectX8Device interface, mVertexSize is the size of the vertextype (32 bytes), mNumVertices is the number of vertices the bufferwill be able to hold, and mpVertexBuffer will contain the pointer tothe IDirectX8VertexBuffer interface when the function returns.

When we lock the vertex buffer, the pointer we receive should

point to memory that is uncacheable and write-combining. Usingthe memory pointer returned from the Lock() method of the ver-tex buffer, we can now experiment with modifying the data inthe vertex buffer. I created a simple program that renders a sin-gle, highly tessellated sphere using a vertex buffer allocated inAGP memory. At every frame, I lock the vertex buffer that holdsthe vertices of the sphere and move the positions of the verticesalong the direction of their normal using a simple sine wave.Granted, this same task could have been accomplished using ascale, but I just wanted a simple test to experiment with the per-formance impact of vertex buffers in AGP memory. This programis available on www.gdmag.com. Using a copy of the original

w w w . g d m a g . c o m 41

FIGURE 4 (top). Test application results on a Pentium III processor with two different graphics cards.FIGURE 5 (bottom). Test application results on a Pentium 4 processor with the same two graphics cards.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 160

100

90

80

70

60

50

40

30

20

10

0

Nvidia GeForce 2 GTS 64MB ATI Radeon DDR 64MB

Pentium 4 Processor 1.5GHz

Floating Point Values Modified for Every Two Vertices

Fram

es P

er S

econ

d -

Nor

mal

ized

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 160

100

90

80

70

60

50

40

30

20

10

0

Nvidia GeForce 2 GTS 64MB ATI Radeon DDR 64MB

Pentium III Processor 600MHz

Fram

es P

er S

econ

d -

Nor

mal

ized

Floating Point Values Modified for Every Two Vertices

Page 24: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

vertex data for the sphere stored in sys-tem memory, I create a temporaryset of modified coordinates andthen update the positions of thedata in the vertex buffer. To dothis, I lock the vertex buffer atevery frame. Then, I calculate newX, Y, and Z positions for the verticesone at a time and store these in a temporary ver-tex structure along with the original normal vectorand texture coordinates for the vertex. Finally, dependingon a variable that indicates the number of floats (4-byte values)to touch, I use a small piece of assembly code that uses therepeatable string move operation on DWORDS (rep movsd) to copy thesystem memory copy to the actual vertex buffer. This enables meto experiment with touching one float (just the X coordinate ofthe vertices), two floats (X and Y coordinates), and up to eightfloats (the entire vertex structure). I also provided a mechanismto skip every other vertex. Because the size of the write-combin-ing buffers on the Pentium 4 processor is 64 bytes, this enabledme to see what happens when half of the 64-byte buffers aremodified but not the entire buffer.

Results

U sing the test application just described, I used the displayedframe-rate counter to do a visual comparison with different

parameters. Figures 4 and 5 show the results on two different sys-tems with two different graphics cards. The X-axis of the chartsshows how many consecutive floating-point values are modifiedper vertex. The Y-axis of the charts shows the frames per second,normalized according to the frame rate when none of the vertexdata is modified. As you can see from the charts, the frame ratedrops dramatically with the number of bus transactions requiredto write out a partially filled write-combining buffer. But when thebuffers are completely filled, performance picks up. You can alsosee the size of the write-combining buffers, because on the PentiumIII system we see performance pick up when eight floats (32 bytes)and 16 floats (64 bytes) are modified. On the Pentium 4 system,we only see performance pick-up when 16 floats are modified.

Checking for Partial Writes UsingVtune Analyzer

I also wanted to define a more rigorous test so that you, as agame developer, could have somewhere to go to see if your

application is suffering from partial writes of write-combiningbuffers. To do this, I used the Intel Vtune Performance Analyzer5.0. There isn’t space here for a full tutorial on using VtuneAnalyzer, but I’ll give a quick description of how to use it to checkfor partial writes of write-combining buffers. For more informa-tion on Vtune Analyzer, see the For More Information box.

When running Vtune Analyzer on a P6-family processor orPentium 4 processor, it’s possible to count events that occur in theprocessor. (Note: mobile processors — those found in laptops —don’t support the event-counting mechanism.) The most common

event to count is the number of CPU cycles orclock ticks that have elapsed. Other eventsinclude the number of instructions executed,number of L1 cache hits, and many more. ForP6-family processors, we’re interested in the“External Bus Partial Write Transactions”event. This event occurs, obviously enough,every time a partial write happens on thebus. Because all writes to write-back,cacheable memory are performed one com-

plete cache line at a time, this event typicallyonly occurs when a write to uncacheable memory

has happened. On the Pentium 4 processor, an eventspecific to write-combining memory, “Write WC Partial,” is theone to check. Using these events, you’ll be able to determine ifyour application is causing a significant number of partial writes tooccur.

Wrapping Up

W e’ve seen the performance implications of partial writes towrite-combining memory and learned how to avoid the

problems just by moving a little extra data, which is pretty coun-terintuitive. I encourage you to examine programs where youmodify vertex buffer data on a per-frame basis and see if you maybe causing partial writes to write-combining memory. Thespeedup can be significant, as we’ve seen. And the same tech-niques apply to other resources allocated in AGP memory. Ifyou’re modifying textures regularly and seem to be touching dataa few bytes at a time, then maximizing your use of the write-com-bining buffers could improve your performance considerably. q

m a y 2 0 0 1 | g a m e d e v e l o p e r42

ACKNOWLEDGEMENTS

I’d like to thank Pete Baker, Kim Pallister, and Will Damon for their valuable

input into this article.

FOR MORE INFORMATION

Microsoft DirectX

www.microsoft.com/directx

Intel Developer Site

http://developer.intel.com

Intel Vtune Performance Analyzer

http://developer.intel.com/software/products/vtune

Nvidia GeForce 2 GTS

www.nvidia.com/products/geforce2gts.nsf

ATI Radeon 64MB DDR

www.ati.com/na/pages/products/pc/radeon64_ddr/index.html

F A S T A G P W R I T E S

Page 25: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

w w w . g d m a g . c o m 43

Page 26: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

m a y 2 0 0 1 | g a m e d e v e l o p e r44

S E C U R I T Y g a v i n d o d d

Keeping thePirates at Bay

Implementing Crack Protection for

SPYRO: YEAR OF THE DRAGON

Page 27: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

o you’ve worked 10- to 12-hour days for the past two years, trying

to make your latest game the best ever. You even added copy pro-

tection to try to stop the pirates, but within a few days of release

there are already crack patches flying around the Internet. Now anyone

can help themselves to your hard work, without so much as a

“please” or “thank you.”

This is what happened to Insomniac’s 1999 Playstation release,

SPYRO 2: RIPTO’S RAGE. Even though it had good copy protection, it

was cracked in a little over a week. So when we moved on to SPYRO:

YEAR OF THE DRAGON (YOTD), we decided that something more had to be done to try to

reduce piracy. The effort was largely successful. Though a cracked version of YOTD

has become available, it took over two months for the working patch to appear,

after numerous false starts on the part of the pirates (the patch for the European

version took another month on top of that). The release of patches that didn’t work

caused a great deal of confusion among casual pirates and plenty of wasted time

and disks among the commercial ones.

Two months may not seem like a long time, but between 30 and 50 percent of

most games’ total sales occur in that time. Approximately 50 percent of the total

sales of SPYRO 2, up to December 2000, were in the first two months. Even games

released in the middle of the year rather than the holiday season, such as Eidetic’s

SYPHON FILTER, make 30 percent of their total sales in the first two months. If YOTD

follows the same trend, as it almost certainly will, those two to three months when

pirated versions were unavailable must have reduced the overall level and impact

of piracy. On top of this, since YOTD was released in Europe one month after the

U.S., those two months protected early European sales from pirated copies of the

U.S. version.

So why did it take so long to crack YOTD when a patch was available for SPYRO 2 so

quickly? The difference was that SPYRO 2 only had copy protection, while YOTD

added crack protection. The crack protection complemented the copy protection by

checking for alterations to the game, rather than just making sure the game was

run from an original disk. This extra layer of protection slowed down the crackers

significantly, because removing the copy protection had to be done without trig-

gering the crack protection. Basically, YOTD is booby-trapped — one wrong bit and

it will blow up in your face. This article will explain the techniques that we used in

YOTD, what we learned from using them, and some ideas about how to take our

techniques even farther. However, I will not go into explicit detail, as most of the

coding involved is relatively simple. Crack protection is more about out-thinking

the crackers than out-coding them. A great advantage of any method of protection

is novelty. Even a new implementation will give an advantage over simply reusing

code, regardless of whether it was successful in previously delaying a crack.

w w w . g d m a g . c o m 45

G A V I N D O D D | Gavin started work atPsygnosis in 1992. There he worked on manygames which he probably wouldn’t want tomention (except for JOHNNY MNEMONIC onSega CD which he is perversely proud of) andmost of which never saw the light of day. The only notable products he worked on atPsygnosis were COLONY WARS and COLONY

WARS: VENGEANCE. In 1999 he moved on toInsomniac Games to work on SPYRO 2 andSPYRO: YEAR OF THE DRAGON. Now he isworking on a PS2 game he isn’t allowed totalk about, so don’t even ask. Gavin can bereached at [email protected].

Page 28: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

Defining the Problem

F rom the very beginning we recognized that nothing is uncrack-able. Many different software and hardware techniques have

been used in an attempt to stop piracy; as far as I know every oneof them has been bypassed or cracked. Our goal was to try to slowthe pirates down for as long as possible.

First we looked at the copy protection: was there any way toreduce its vulnerability to cracking? We could call the copy protec-tion multiple times throughout the game, making it harder tobypass. Unfortunately, the copy protection requires exclusive accessto the CD for about 10 seconds, which is an eternity when you arewaiting for a level to load. So that was out of the question.

Then we looked at how a typical crack is made. Most cracksfor Playstation games replace the boot executable with an “intro”

that proclaims the prowess of the crackers and allows cheats to beactivated. This intro is concatenated with a copy of the patchedexecutable and compressed so that the total file size is no largerthan the original file. The new file bears little resemblance to theoriginal boot program. This difference gives us the opportunity toreload the boot executable sometime after startup, causing severecorruption if it has been altered in this way. As with the previousoption, this solution suffers from the problem of adding to theload time. It is also vulnerable to the pirates finding some otherspace on the disk to hide their crack, leaving the original boot fileuntouched. While this solution might have slowed the piratesdown for a few more days, it didn’t seem like it was the answerwe were looking for.

We decided that we needed a thorough way of detecting at runtime that the game had been cracked. When we could reliablydetermine whether the game had been modified, we could stop thegame anytime we found a discrepancy. We also needed a methodthat didn’t require access to the disk. It should just check the codein memory, unlike the standard copy protection or our option ofreloading the boot program. This would allow us to place thecheck anywhere in the game, making it much harder to remove.

So now we had a definite goal, an approach that should signifi-cantly improve the protection for YOTD.

Checksumming

F inding out if a block of data has changed in any way is actu-ally pretty easy. Techniques have been used for error detec-

tion for years and are well documented. Just search for “check-sum” on the Internet. For YOTD, we decided to use a CRCchecksum: it’s robust, simple, and fast.

The checksum was calculated bitwise rather than using tables,as tables would be an easy point for a cracker to attack. We tookcare to hide and protect the checksum values as well. If thesecould be found and altered easily, a cracker would simply replacethe checksum with a new value that matched the cracked data,

which is far easier than removing the code. For the same reasonwe didn’t use functions to calculate checksums, we inlined thecode as much as possible. If the code was in a function, it wouldonly have to be removed once. The inline code would have to beremoved as often as it was used.

We used a few slightly different implementations to stop sim-ple pattern searches from being used to find the checksum code.To what degree this survived compiler optimization we don’tknow. To make our lives easier we made macros. These could besprinkled around the code and mixed in with other tasks, whichwould make it much more difficult to spot where the checksumwas being calculated.

Unfortunately, because checksums are designed to detect errorsand not modification, they cannot offer full protection againstmodification. The checksum value for any block of data can be

made to add up to any value by modifying the same number ofbits that are used for the checksum. In other words, if the check-sum is 16 bits, altering 16 bits in the data can make the check-sum match any value.

To deal with this, multiple checksums were applied to the samedata. Each checksum used a different start offset into the data,and stepped through the data by different amounts. This meantthat overlapping and interleaved sections of data were check-summed at different points, making it almost impossible to alteranything and still have all the checksums add up. I could haveused different checksum algorithms for the same effect, but inthis case I didn’t have time to implement more than one method.

We used the fact that altering a small number of bits can giveyou any checksum value to our advantage. By inserting the correctvalue into the middle of the data, the checksum could be made toequal any predetermined value. This meant the checksum valuecould be hard-coded and therefore become part of the data beingchecksummed. This is bewildering to even think about, let alonetry to crack.

Since the game used multiple code overlays (or DLLs), theycross-checked each other as much as possible. This furtherreduced the chance that any section could be altered withoutbeing spotted. If any overlay noticed a discrepancy, it altereddata in the core such that no subsequent checksum would bevalid. This meant that if an alteration was detected in one over-lay, then other overlays loaded later would know about it. Thismade it difficult for the cracker to spot what actually triggeredthe protection, as I’ll explain later.

Obfuscation

N ow that the meat of YOTD’s crack protection had beenimplemented, it was time to move on to the second stage —

slowing down the crackers as much as possible. We had alreadytried to make the protection as difficult as possible to understand,mixing in the checksum code with regular game code, and using

m a y 2 0 0 1 | g a m e d e v e l o p e r46

S E C U R I T Y

“Basically, SYPRO: YEAR OF THE DRAGON is booby-trapped — one wrong bit and it will blow up in your face.”

Page 29: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

different implementations so that it would be hard to understand.We thought that if the crackers couldn’t understand what we haddone, it would be a lot harder for them to crack the game. Wewanted to make it hard enough to reduce the pool of people capa-ble of cracking it. If there are only a couple of pirates withenough skill to crack a game’s protection, it might take them aweek or two to get around to it. Unfortunately, with YOTD beingsuch a high-profile game, this was probably wishful thinking.

Thus we wanted to make the job of cracking YOTD time-con-suming and tedious. If we could just keep the crackers busy atfinding the protection, that’s time taken away from them workingout how to remove it. Again, we were trying to reduce the pool ofpeople available who could crack the game. Not every crackerwould have enough time available to make the crack; it probablyisn’t anyone’s day job. On this note, it’s worth pointing out thatfor most crackers this is a hobby. If they get bored, they may wellgive up. We tried to make the crackers have to wade through plen-ty of chaff before finding the protection. There were a couple oftechniques we tried to achieve this.

First of all, if the crackers know what they are looking for, theyoften don’t even have to boot up the game to find the protection.They can simply search the disk and sometimes even edit the pro-tection right there and then. Simply doing an XOR of as much ofYOTD’s code as possible before burning it to the CD means thatthis technique will not work. It also makes it difficult to match updata in memory with its source on the disk. We worked under theassumption that code can’t be modified if it can’t be found.

Second, we made it as difficult as possible to debug. If you’veever had to debug code that behaves differently when you tracethrough it, you know how much of a pain debugging can be. Weused trace traps to make the code behave differently if breakpointshad been placed. The checksum helped with this, as any softwarebreakpoints used would alter the checksum. Rebooting the debug-

ger and the game takes time, and the more often we could forcethe cracker to do this, the more of their time we were wasting.

Perversely, though, the harder a crack is to make, the more funit is for the cracker to make it. It’s a challenge, and therefore fun.Paradox, the cracking group who produced the working patch forYOTD, even thanked the “Sony coders” who added such interest-ing protection to the game. The more difficult the crack, the moreeffort they will put into making it.

It’s the same with the length of time it takes to produce. Thelonger that the game has been out without a crack, the more pres-tige there is in being the first to produce one. Again, this meansmore effort will be put into producing it.

Taking Action

O f course, all of this effort is worth nothing if the game does-n’t do anything once a crack is detected, but this needs to be

handled carefully. If the game just halts as soon as any modifica-

tion is detected, the cracker would soon find and remove all theprotection. However, if we wait too long to react, too much of thegame would be playable even if an incomplete crack was used. Tobalance this, we used as many layers of protection as possible,which occurred at different points during the game. In YOTD wehad four layers, including the copy protection.

The copy protection stopped the game very early. When thiswas removed, the game appeared to work for some time. Weassumed that the crackers generally don’t play the games theycrack very much, they just play until the point where the protec-tion they know about kicks in. Then they release a crack, believ-ing it to be complete.

To play on this, we designed the game to break in ways thatweren’t immediately obvious. Most of the protection is “off-cam-era,” affecting levels other than the one currently being played.In YOTD the object of the game is to collect eggs and gems,which are then used to open later parts of the game. The protec-tion removed eggs and gems, so that the player could not makeprogress. We tried to make the game unplayable for any lengthof time, while at the same time making it difficult to determineexactly where things had gone wrong. If errors accumulatedslowly until the game broke, the cracker would not notice suchbehavior so easily.

Other, more obvious protection was done less frequently. Call-backs were corrupted, which made the game crash in odd ways.The European version changed languages randomly. Some ofthese actions break the game and others are just an annoyance tothe player, but if the game is difficult or frustrating to playbecause of the failed crack, this can be more effective than break-ing completely.

By making the game behave in as many odd ways as possible,we hoped to cause a lot of confusion. The pirates wouldn’t knowif the crack didn’t work, whether they had just failed to apply the

crack correctly, or if the disk had failed to burn correctly. Thepeople who didn’t play a lot of the game wouldn’t notice thatanything was wrong and claim that the crack worked. This hap-pens more than you would think. A lot of people pirate more outof habit than anything else, booting up the game to have a lookbefore moving on quickly. All of this would help to delay a com-plete crack from being made, because no one would be sure that itwas required.

The Costs

Implementing all of this protection takes time and resourcesaway from actually developing the game. For YOTD those

costs were as follows:Programmer time. One programmer was required for three to

four weeks. The programmer spent this time adding the copy pro-tection, integrating the anticrack protection into the game, andwriting tools to mask the data and generate checksums. For about

w w w . g d m a g . c o m 47

“If the crackers know what they are looking for, they often don’t evenhave to boot up the game to find the protection.”

Page 30: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

six months prior to actually writing any code, some time wasspent thinking of methods for protecting the game and what to dowhen a crack was detected. This was slightly less than two per-cent of the total programmer time budgeted for the game.

Game data preparation. The game data needed additional prepa-ration before a disk could be burned. The game’s WAD file had tobe run through tools to generate checksums and mask data. Thisadded about an hour to the burn cycle, making it about threehours long. The extra steps involved also made this process moreprone to error, though this diminished over time as we becameused to it and automated what we could.

Debugging. Any version of the game with protection includedwas very difficult to debug, as any software breakpoints wouldtrigger the protection. Beyond a certain point, hardware break-points were turned off by the copy protection. This effectivelymeant that any debugging had to be done by the programmerwho implemented the protection (me) on production versions ofthe game.

Testing. The protection was designed to produce effects almostindistinguishable from bugs, so testing was also affected. If anyfalse positives occurred in the protection, they could be reportedincorrectly. For this reason a very thorough debugging plan wasproduced just for the protection. Every location that could trig-ger protection was listed, along with how long it would take totrigger, what the exact effect would be, and where you had tolook to see the effect. Testers had to visit the locations, wait therequired amount of time, and then look to see if the protectionhad been triggered. Having any of the protection give a false pos-itive was obviously our biggest worry. Therefore all the protec-tion was set up on a compile-time switch so that it could beturned off at any time if we weren’t absolutely sure that the pro-tection was reliable (and believe me, there were a few momentswhen it didn’t seem to be).

After the Crack

I n the end, rather than trying to remove all the checksum code,the crackers simply found a way to bypass it. I’m not exactly

sure how, but I know YOTD was vulnerable because the copyprotection was only run once, at boot time. I assume the crackbypassed the copy protection and then restored the data to itsoriginal state. Any checksums performed after this point wouldnot find any alterations (and any checksums before this wereremoved by the crackers).

While the protection on YOTD was reasonably effective, therewere definitely things that we could have done better. If we hadbeen able to check the data on the disk and run multiple copyprotection checks, then it would have been a lot more difficult forthe crackers. As I mentioned at the beginning of this article, therewere practical reasons why these approaches could not be appliedto YOTD. Maybe if the protection had been integrated into thegame earlier, these difficulties could have been overcome.

Also, too much of the game could be played with a partialcrack. This was a balancing act, though. If the protection hadkicked in faster, perhaps the crackers would have realized soonerthat they hadn’t been successful with the first crack. But in the

end, we were perhaps a little too cautious. We could havereduced the amount of the game that could be played with anincomplete crack.

What We Learned

W ere all our efforts worth it? Yes. While the effects of crackprotection against piracy are extremely difficult to meas-

ure, we certainly caused a great deal of confusion. Until the crackcame out, YOTD was the most talked about game on the copyingforums. People wasted disks, blamed the cracking teams, andclaimed that the cracks that didn’t work were O.K., just becausethey hadn’t seen anything go wrong. People were saying nastythings about Insomniac and Sony because they couldn’t “backup” the game. Some people even thought it was funny when thefairy character, who normally offers players helpful advice, insteadtold them they were playing a modified game. There is also aneffect on future piracy to consider: at the very least we made afew people think twice about buying a cheap copy of a game.

We’ve gained valuable knowledge about what works and whatdoesn’t. Layering protection that doesn’t kick in immediately isdefinitely a very effective protection. If nobody thinks a crack isrequired, they won’t be working on one. Even when they do workon the crack, it takes them longer. The crackers apparently spentquite some time play-testing YOTD before they released the finalcrack, just to make sure they didn’t get burned twice.

Unfortunately, the crack protection is weaker once the copyprotection has been run. The cracker only needs to remove thecode that runs the copy protection. Once it has been run, the orig-inal code can be restored, and the checksum will be correct. If thisis only in one place, it is easier to attack. To combat this, the copyprotection needs to be run as often as practical from independentcopies of the code.

If there is space, put multiple copies of the game data on thedisk. The cracker will have to find out which one is used or alterthem all. Either way, you’ve slowed them down. An extension tothis would be to actually use multiple copies of the data, eitherloading a random selection or loading using a pattern based onwhen the data is being loaded. If some of the copies are maskeddifferently and some are never used, the cracker will have to findand alter them all to ensure that the crack is complete.

Even better than masking the data is compressing it, whichoffers many advantages over simple masking. The relationshipbetween compressed and uncompressed data is much less obvi-ous, the file sizes are different, and any cracked data has to becompressed or else it won’t fit back on the disk. This means thecracker has to find out what compression was used, and if youcustomize the algorithm for your data, they may have to write acompression program just to be able to make the crack.

Looking back at the choices we made, we could have imple-mented multiple copy-protection checks throughout the course ofthe game. Unfortunately, this isn’t always possible or practical,depending on the method of protection used (especially if mini-mizing load times is a primary concern). An alternative is to checkthe source data on the disk. Of course you can’t check the entiredisk, but all the executables can be checked, along with the table

m a y 2 0 0 1 | g a m e d e v e l o p e r48

S E C U R I T Y

Page 31: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

of contents and boot information. This is something YOTD failedto do and is probably how it was cracked.

Reality Check

W e may not be able to stop the pirates, but we can haveenough of an impact to make pirating a much less attrac-

tive option. Given the choice of buying a game or waiting two tothree months for a pirated version, a lot of pirates are going tostart buying games. Or at least they’ll buy their favorite ones.

There is also an advantage in numbers; the more games thatadd effective protection, the greater the benefit is for all games.Crackers have limited resources, and the longer that they’re tiedup on each game, even if it’s only for a few weeks, the fewercracks they can produce.

Games that implement just a standard copy protection schemecan be cracked in less than a day. Sometimes a tool is even avail-able which does it in seconds. Any game that takes longer thanthis because of added protection will be put in line until thecracker has time to deal with it. The longer that line is, thelonger it will take for any given game to be cracked. The trick isto keep your game from reaching the front of that line for aslong as possible. q

w w w . g d m a g . c o m 49

FOR MORE INFORMATION

If you are interested in learning more about how the copying com-

munity works and how cracks are made, try looking at the cracking

groups and forums. Here are a few starting points.

www.paradogs.com

www.cdrom-guide.com

www.gamecopyworld.com

www.megagames.com

The following links are not to crackers but to “homebrew” program-

mers who make console demos. Still, techniques and tools made for

the hobby scene always end up migrating to the crackers.

www.uic-spippolatori.com/psx/tute/faq.html

www.hitmen-console.org

http://napalm.intelinet.com

Page 32: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

B y the end of 1999 it was becoming increasingly unviable forthird-party publishers to continue to support the Nintendo64. Like many independent developers, Blitz Games sufferedbecause of this, but it was the cancellation of one of ourN64 projects that indirectly led to our decision to approach

the CHICKEN RUN games.Earlier in the year, we’d had much success with an original Nintendo 64

title called GLOVER. Work was well under way on a sequel for both the N64and Playstation when both projects were pulled by the publisher, leaving

more than 20 people without a game to work on. This happens to manydevelopers, of course, but Blitz never likes to put people out of work ina situation like this. The search was on for a new project to keep thesetwo teams occupied and self-sustaining.

At around the same time, our chief executive and co-founder,Philip Oliver, was at an industry dinner in London and got talking(in the men’s restroom, of all places) to an industry friend. Hementioned that he might have a very attractive project coming up

that would be right up Blitz’s alley if only we had the resourcesavailable. Philip was naturally very interested, and a meetingwas soon set up where we learned that the interactive license inquestion was Chicken Run.

Dreamworks (which owns the Chicken Run license togetherwith Aardman and Pathe) had been looking for an interactive

D A V E M A N U E L | Dave has been with Blitz Games since 1997. He joined thecompany after doing a degree in graphic design and a master’s degree in computeranimation. He has worked on a range of Blitz titles, including GLOVER, and was cre-ative manager for the CHICKEN RUN titles. He is currently a project manager for anupcoming Xbox title.D A V E F L Y N N | Dave has been with Blitz Games since 1997. He joined the compa-

ny after spending numerous years writing and selling his own software while study-ing multimedia at university. He has industry experience spanning back to

1993 and has worked on a range of other Blitz Games titles and was ateam leader on CHICKEN RUN. He is currently an artist for an upcom-ing Playstation 2 title.

m a y 2 0 0 1 | g a m e d e v e l o p e r50

P O S T M O R T E M d a v e m a n u e l a n d d a v e f l y n n

Blitz Games’

CHICKENRUN

CHICKENRUN

Page 33: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

w w w . g d m a g . c o m 51

G A M E D A T A

PUBLISHER: Eidos InteractiveFULL-TIME DEVELOPERS: 24BUDGET: Around $1 million plus the cost of thelicenseLENGTH OF DEVELOPMENT: 9 monthsRELEASE DATE: November 2000PLATFORMS: Playstation, Dreamcast, PC (�2),Game Boy ColorHARDWARE USED: 450MHz Pentium IIIs with64MB RAM, respective development kitsSOFTWARE USED: 3D Studio Max, Photoshop 5.0,Painter, Visual SourceSafe, InstallShield, VisualC++, BinkNOTABLE TECHNOLOGIES: Jobe: in-house 3D tex-turing package; Egg: in-house world-creationpackage, written specifically for the CHICKEN

RUN games.

Chicken Run images ™ & © 2000 Dreamworks LLC,

Aardman Chicken Run Ltd. and Pathe Image. CHICKEN

RUN games designed, developed and licensed by Blitz

Games Ltd. CHICKEN RUN games published under

license by Eidos Interactive, THQ, and Activision.

licensee for some time but had so far drawn a blank. This was partly because they werekeen to have a finished game for release for the Christmas 2000 holiday period in orderto capitalize on the last major push for the Playstation 1, but that left less than a year inwhich to develop the game. We had to act fast and make some tough decisions. We hadmore than 20 people back at the office without any work, but we had the opportunityto venture into new territory for a developer — paying to become a licensee ourselves.After much deliberation, we picked up the full interactive rights for the Chicken Runproperty and set about putting the games together.

Although we knew we had the manpower to produce the three main console versionsof the game (on Playstation, PC, and Dreamcast), we decided to subcontract some of theother versions that were produced. We realized that, as well as supporting a console-stylegame, the PC audience would also be interested in a multimedia-type package. So weapproached Activision (which had just sold record numbers of the TOY STORY ACTIVITY

CENTER) and a developer called Absolute (which had worked with Aardman, the studiobehind both Chicken Run and the Wallace and Gromit films, previously on severalWallace and Gromit multimedia packages), and contracted them both to produce theCHICKEN RUN PC FUN PACK in time for the U.S. and U.K. movie release date. We alsodecided that a Game Boy Color version of the game could work well, so we prepareddetailed design documents and approached specialist Game Boy Color programmers tofollow our design. The finished game, although different from the main console versions,was ready for release at the same time and published by THQ.

If we were going to hit the pre-Thanksgiving/Christmas release slot with the threeversions that we were developing in-house, we needed to put a pretty aggressive sched-ule in place, which is what we did. The GLOVER Playstation team got to work on thePlaystation version of CHICKEN RUN, with the plan to convert to PC and Dreamcastlater in the project. Meanwhile, the GLOVER 2 N64 team got stuck into the next-genera-tion versions, planning to produce a Playstation 2 title initially, followed by Xbox andGamecube versions.

That’s not the end of the story, though. Although we had the rights to develop thegames, we still needed a publisher on board to get the finished titles to market. So whilethe teams put together a detailed schedule and got started on the work, the senior manage-ment team began to make their way around the major publishers with the first playabledemo in order to get a deal signed up. We were always confident that the Chicken Runmovie would be a smash hit because we’d seen plenty of Aardman’s work before, such asthe Wallace and Gromit series, which is very popular in the U.K. Many of the American

Page 34: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

publishers were yet to be convinced,though, and it initially proved to be anuphill struggle. A deal was eventuallysigned with Eidos on the night before E32000, and everything was in place.

What Went Right

1.Becoming a Chicken Run licens-ee. One of the most successful

aspects of the project was the fact that weourselves were a licensee of the property,rather than just a third party commissionedby a publisher. We have a five-year deal forthe interactive rights for the property, andthis gave us a much higher degree of con-trol than on any previous project. We obvi-ously had consultation and approvalprocesses with Dreamworks, Aardman,and our publisher Eidos to consider, butthe project-management freedom whichbeing a licensee gave us was liberating.

The whole deal was obviously a veryrisky move, as we carried the license feeand the whole of the development costsourselves, but in the end the risk paid off.We were one of the first independent devel-opers to pay for a license option ourselves,and we’ve gained a lot of respect withinthe industry for going down this route. Itwas hard work trying to sell the game topublishers in this way, but we’ve learned a

lot from the process and now know how toapproach it better if the opportunity comesup again.

In addition to the learning process,which was worthwhile in itself, the successand public awareness of the movie hasgiven us a much higher profile than wehad before. Last year was our most suc-cessful year to date and one which saw thebiggest lineup of games in the company’shistory, but the global popularity ofChicken Run has helped establish us fur-ther and raised our profile in an ever-growing range of areas. Although thecompany has been around just over10 years now, there’s a distinct feel-ing that we’re really starting tomake our name. Being a ChickenRun licensee has helpedstrengthen that position andimprove our reputation forcreating quality games.

2.Getting greatsupport. If you’re

a longtime reader of thesePostmortems, you may have drawnthe conclusion that producing a movie-licensed game can be really problematic.The film’s producers are frequently reluc-tant or simply unable to release muchinformation about the product, and

52

P O S T M O R T E M

The interior of one of the chickens’ work huts in various stages of modeling and texturing.

m a y 2 0 0 1 | g a m e d e v e l o p e r

Page 35: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

53

while the game needs to be tied into themovie closely, it’s often impossible to getmuch information out of the studio. Often,little more than a preliminary movie scriptis offered to the development team onwhich to base the look, feel, and gameplayof the games, but in our case we had noend of help from Dreamworks and in par-ticular Aardman themselves.

The team at Aardman was very helpfulright through the project and provided uswith a wealth of source materials on whichto base our designs for the virtual chickenfarm. As Aardman’s base is a mere hour’sdrive away from ours, they showed us thesets for the movie down at their studios, letus see scripts and storyboards, and also letus have full style-guide reference materialsand snippets from the finished film to usein FMV sequences throughout the game.

The great thing was that because themovie is an animated feature, the film’sproduction work took even longer thanproducing a game usually does. By thetime we came on board, a lot of the mate-rials and footage was already available.Our team was also able to see rough cutsof the movie well ahead of release. Thislevel of support ensured that everyoneworking on the project had a good viewof how the finished movie product wouldeventually appear in cinemas worldwide.

3.Making theright game-

play decisions.It’s always tricky

to take a linear moviestory line and make itinto an interesting interac-tive experience. It wasespecially tough in thiscase, as the film is essen-tially about failure almostright up to the last scene.We realized that to makethe game enjoyable therehad to be an element ofplayer success much earli-er on in the game, so itwas important that weinclude plenty of opportu-nities for at least some ofthe chickens to escape atvarious points. To do this,we decided to include anumber of amusing sub-games that would alsoadd replay value to thegame, whereby the player could free agroup of chickens in one go after buildinga contraption of some sort.

Complete contraptions. It was these sortsof contraptions that we also felt were keyto the movie’s (and therefore the game’s),distinctive humor. The array of weird andwonderful devices that the chickens createand use in the movie led us to employ asimple but effective find-and-collect ele-ment to the main gameplay, and we werehappy at how well this worked.

Chicken Gear Solid. The other majorgameplay decision we made early on thatwas vital in re-creating the real feel of themovie was to include stealth elements. Thefilm’s Great Escape overtones naturally ledus to implement the same idea, and payhomage to the likes of METAL GEAR SOLID

in the game. We used several MGS-styleelements (such as the radar style and

characters creeping along walls) inthe early designs, and thesehelped give the characters aslightly more heroic edge asthey pitted themselvesagainst guard dogs, search-

lights, and the evil Tweedys.Although a few reviewers actual-

ly accused us of stealing METAL

GEAR’s idea, most realized we werepoking gentle fun at a genre in thesame way that Aardman uses subtlevisual in-jokes in its movies.

The main plus point in our game-

play decision-making was the fact thatalthough we were guided strongly by themovie’s visual appeal (discussed in the fol-lowing section), we didn’t make the mis-take of following the proceedings so slav-ishly as to cripple the developmentprocess. In the end, the game was praisedfor being similar to the film while stillbeing imaginative and creative.

4. Faithfully re-creating theatmosphere of the movie.

Aardman is known for its perfectionistapproach to its work and is rightly verykeen to make sure that any use of its char-acters, environments, or story lines is treat-ed sympathetically. Luckily for them, Blitzis a company that recognizes the value ofstrong intellectual property, and we havemuch experience taking established charac-ters and giving them an interactive spin.Above all, we were keen to make sure thatthe CHICKEN RUN games were somethingmuch more than your average movie tie-inand that they extended the experience andthe longevity of the film.

Character-building. As we’ve saidalready, the movie has a very distinct lookand feel, and not just because the maincharacters are all made out of plasticene.It is these characters, though, that arealways the strongest element in anyAardman production, and we were keento make sure that anyone who had seenthe movie would instantly recognize the

Ginger and Babs discuss their next move in one of the many cutsequences.

w w w . g d m a g . c o m

Page 36: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

look and personality of any of the charac-ters in the game. This was a difficult feat,because lip-synching and facial anima-tions, which would have achieved this eas-ily, are near-impossible on the Playstation.We therefore worked closely withAardman to create realistic bodymovements and gestures thatwould accurately convey thepersonality of each of thecharacters. Many of themovements we wanted thechickens to do in the gamewere things that they’dnever had to do in thefilm, but the Aardmananimators were again onhand to advise our ownanimation teams withtips on how the charac-ters were originallybrought to life.

We did a detailed studyof each chicken, but insome cases we only had afew hundred polygonsfor each one, so we care-fully combined a mix of bodygestures with animated tex-

tures to create just the right feel. The plas-ticene look of the characters was thenachieved by our expert texture artists. Theyworked with subtle but highly detailedbitmaps, which were combined with some

advanced lighting techniques coded intothe game.

Moonlight serenade. Anotherchallenge the team faced was

that a large chunk of themovie takes place at nightin the moonlit farmyard,

and these moody condi-tions are tricky to trans-late into an interestinggaming environment. Thedark and hostile environ-ment we saw in themovie was very distinc-tive, and the chickens areconstantly on the lookoutfor guard dogs, or theTweedys as they plot theirescape. We knew we couldintroduce that stealthy feelto the gameplay as we’vealready discussed, but wealso needed to create avisual feel that supported it.

Once again, it was Aardman’s help thatenabled us to do this so convincingly.Along with their original plans of thefarmyard, they also let us have source stillsand production shots of the set. Fromthese we were able to create the final lay-out of the gaming environment. Eachbuilding was located exactly where it wasin the film, but we also gave each one adetailed interior and populated it with col-lectibles, chickens, and plenty of otherenvironmental details.

Lighting the way. Lighting was anotherkey element of the environmental design.The blue-tinged moonlit sections workedreally well in the end, despite some initialconfusion as to how the game’s lightingeffects should be implemented. For muchof the level lighting we used an in-housetool that enabled us to have low-level con-trol over all aspects of texturing and light-ing on a per-polygon basis. Each of themeshes was painted with Gouraud light,which let us create atmospheric areas ofdeep shadow as well as the piercing lightof the farm’s spotlights. We added animat-ed scenic models to many scenes, as wellas a host of other smaller touches, such asflickering candles and smoke drifting from

54 m a y 2 0 0 1 | g a m e d e v e l o p e r

P O S T M O R T E M

Stealth and cunning play a major role in the CHICKEN RUN titles. Characters sneak around the huts at night in METAL GEAR SOLID style (top left), avoid thespotlights and Mr. Tweedy’s flashlight in the farmyard (right), or negotiate a tractor puzzle in the toolshed (bottom left).

Page 37: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

stoves, in order to convey the Aardmanfeel authentically.

5. Including voices. The inclusionof character voices was a bone of

contention for some time during the courseof the project. Many on the team wereunconvinced at first that voices could havesuch a major impact on the finished prod-uct, but our development director, AndrewOliver, insisted they be implemented. Inretrospect, we all admit that he was rightto force our hand, because the charactervoices ended up providing that final pieceof character expression that would other-wise have been lacking.

As we mentioned in the previous point,it is the characters in Aardman’s workthat are its strength, and it’s their humor-ous phrases and expressions that reallycomplete the picture. Once it was finallyagreed that we would include voices inthe game, the work began in earnest tosecure voice talent to record the extensivescript we’d drawn up. We managed tosecure a few of the original actors, but formany of the characters we began a longsearch for sound-alikes, which then hadto be approved before any recording

could begin. There was much confusionover whether or not we would be able touse all of the key character voice talentfrom the film in the game, and we wentto great lengths to try to secure it. Weended up having to use some sound-alikes, but once again we learned somevaluable lessons in how to control thistype of input into a game.

All our effort was well worthwhile, andthe voices add that finishing touch to thefinal game. The voices give the charactersmore life and personality than simple textdialogue would have provided.

What Went Wrong

1.Attempting too many versions.We’d been very excited about the

CHICKEN RUN project, and after assigningso much of the company’s money to buyingthe rights, we were naturally keen to makethe most of it. We initially planned to pro-duce a number of titles on a range of plat-forms. The idea was to have Playstation,PC, and Dreamcast versions ready forrelease in time for Christmas 2000, then tofollow them in 2001 with Playstation 2,Xbox, and eventually Gamecube versions.

Unfortunately, this wasn’t to be the case.As we mentioned earlier, we had trouble

at the start of the project convincing manypublishers that the movie would be a suc-cess. Even though we were eventuallyproven right, we then had trouble convinc-ing them that interest in the propertywould extend beyond Christmas 2000. Wehad full designs in place for the next-gener-ation versions and had a team working onthem, but it soon became apparent that thework on these games was in danger ofjeopardizing the earlier-release titles. As itwas looking increasingly unlikely that wecould secure publisher support for thenext-generation versions anyway, we decid-ed that work should stop on these gamesand that the two teams should be mergedin order to guarantee the production of thePlaystation, PC, and Dreamcast versions.

It’s a valuable lesson to have learned,but perhaps it was inevitable that havingpaid out for the interactive rights wewould try to throw as many people intoproduction on as many different versionsas possible. As we said in the first part ofthe “What Went Right” section, what wehave learned from CHICKEN RUN on alllevels is valid. If we are ever in the same

m a y 2 0 0 1 | g a m e d e v e l o p e r56

P O S T M O R T E M

The level layouts are very faithful to the movie, whether it’s the chicken coop itself (bottom right) or the farmyard outside the wire (left). It’s all tied togeth-er with cutscenes and conversations with the game’s key characters (top right).

Page 38: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

58

position again, we’ll be much more realis-tic with our goals of what we can do witha license opportunity of our own.

2.Having too short a schedule.The major problem throughout the

project was time, or rather a lack of it. Wehad nine months in which to produce allthree versions of the game, and by moststandards these days that is an extremelyshort project. We didn’t want to skimp onany aspects of the game, but at the timethe team merger was first suggested it wasbecoming more and more obvious thatsomething had to give. Combining the staffhelped enormously, but at the same timewe had to make some hard decisions aboutexactly what would remain in the gameand what might have to go.

Removing sections of a game midwaythrough the development process wasnever going to be a popular move, butwhen the game was assessed in April it wasdecided that a large section set in theTweedys’ pie machine would have to be

cut. This obviously caused afew ructions with the mod-elers that had started workon it. Nevertheless, this

section was chosen for a num-ber of reasons, not the least ofwhich was that it had the leastamount of already completedwork in place.

Once these decisions hadbeen made, though, the teamwas able to carry on with theproject with a much greatersense that the whole packagewas achievable. It was still amassive amount of hard workand determination from theteam that actually brought thegames to completion on time. Ifthere’s one thing we’ll take fromthis project on to the next one,it’s that we need more than nine months.

3.Re-creating the scale of themovie. As we said in the “What

Went Right” section, we tried to re-createthe whole movie’s environment, along withsome new areas, as faithfully as possible.Still, the scale of the farmyard is somethingthat was never going to be easy to getacross. We were keen to make sure that asplayers guided a small chicken across thecoop and the farmyard, they got a real

sense of how large and foreboding theirsurroundings were. As we explained,

we achieved a lot of this withatmospheric visual touches,

but we also wanted to letplayers explore the

entire farmyard ifthey wanted to in

order to give themthe sense of scaleof the place.

The Play-station’s limited

memory caused usto struggle with

displaying the farmin its entirety, so we

had to split it into anumber of separate sec-

tions and stream them infrom the CD one at atime. This process workedreally well and enabled us

to create a feeling ofseamless exploration

across the entirefarm. It also permit-

ted a much higher polygon count for eachhut and room interior that was displayed.

4.Merging two teams into one.When two groups of development

staff, one of which has already spent afew months working on a project, arebrought together to complete the project,it’s inevitable that there’ll be some ten-sion. Not surprisingly, this was the casewith CHICKEN RUN. As we’ve already dis-cussed, merging the teams was essential ifall the planned Thanksgiving 2000 releas-es were to be delivered on time. However,when the moves came, not everyone onthe teams was completely happy, andmorale problems began to surface.

Part of the problem was that the twoteam leaders had distinctly different mana-gerial styles, and as a consequence the cre-atives in their teams were used to workingin different ways. The nature of the shortschedule also meant that this transitionperiod was considerably more rushed thanit would have been if it had occurred dur-ing a longer project.

Once again, we learned some valuablelessons from this team-merging, not theleast of which was that it’s better to sortout the team structure before simply mov-ing desks about the building. Many of thestaff were unsure of the new structure orhow it would affect them and their work,so at first productivity suffered slightly.However, with some determined reorganiz-ing and fresh planning of the task at handwe were able to pull off what at firstseemed impossible — finishing all threeversions of the game on time.

m a y 2 0 0 1 | g a m e d e v e l o p e r

P O S T M O R T E M

Nick and Fetcher, the wily Cockney rats, tackle the infamous piemachine.

Page 39: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

w w w . g d m a g . c o m 59

It’s easy to say that you’ve learned fromyour mistakes, but in this case we havealready implemented a new approach tostaffing. We are now approaching thegames that we currently have in develop-ment in a much more flexible way. Teamstructure and identity are just as importantas ever, but with new systems in place wecan now apply several teams to one gameproject as they’re needed without toomuch upheaval.

5. Starting testing and bug-fixingtoo late. CHICKEN RUN’s short

timescale affected us in many ways, butone factor that proved significant was thatthe development work on the Playstationversion was scheduled to beyond alphastage. This meant that a lot of the play-testing and then bug-fixing couldn’t bestarted until much later than we wouldhave liked.

Play-testing always brings up a hugerange of suggestions for improvement, andthis was the case with CHICKEN RUN. Sev-eral ideas to make the game more playablewere suggested, including modifying the fly-ing-machine section at the end of the game.This was a significant element to alter, andwe were reluctant at first to embark on

such a major change so late in the project.Eventually, the work was done, and it madethe final version much better. In turn, how-ever, it brought up a whole raft of newbugs to work through at a late stage.

We also encountered problems when westarted to identify bugs. We were using aninternal spreadsheet system for recordingall bugs, but this wasn’t compatible withthe system our publisher was using.Because of the unusual nature of how thisproject worked (in that we were the licens-ee and were essentially just selling a fin-ished product to Eidos), the whole bug-testing scenario was unclear for sometime. If it had been possible for all partiesto register bugs into the same system, thenit might have been possible to smooth outthe bug-recording and -fixing issues. In aproject with an already very tight sched-ule, this would have been a big helptoward lessening the growing tension inthe final weeks of development.

Inspiration andDetermination

T he key factor throughout this projectwas the importance of time, and very

major problems and changes ultimately

came about because we were working to anine-month schedule. In retrospect, theteam is pleased with the results, andalthough the game is perhaps a little shortfor a hardcore game player, the target audi-ence has loved it. There are always prob-lems in every project, and there are alwaysthings to learn as each game progresses. Wehad many more unknown quantities thanusual when we took on CHICKEN RUN, andwe all recognize that the project could soeasily have failed. The reason it didn’t was acombination of hard work and sheer deter-mination, enabling us to win through. Inaddition, the whole Chicken Run propertyis one that really excited everyone here atBlitz, and the chance to work with some ofthe world’s best animators was somethingthat kept a lot of the team going througheven the hardest times. Becoming a licenseefor a property such as Chicken Run was aninteresting new move for us, but one whichwas ultimately a great success, leading us toconsider similar interactive licensing oppor-tunities for the future. We consider our-selves very lucky that we were able to havelearned some valuable lessons while stillmanaging to put out a well-received andhighly playable game on time for three dif-ferent platforms. q

Rocky dashes into the egg store to avoid the evil Mrs. Tweedy (left). Ginger’s safer inside one of the huts (bottom right) than in the glare of a flashlight(top right).

Page 40: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

m a y 2 0 0 1 | g a m e d e v e l o p e r64

S O A P B O X c h r i s h e c k e r a n d c a s e y m u r a t o r i

Software Patents Should Be Abolished

Whether software patents are ethically wrongor not is a matter of philosophy. However,even if you don’t believe patenting softwareis wrong from an ethical standpoint, youmust agree that if a thing is not working as

intended, and if it is in fact operating to the contrary of what it’sintended to do, then that thing must either be fixed or thrown out.

We strongly believe software patents are unethical, but they alsofail miserably to work as intended. Worse yet, they are detrimentalto the game industry and to the software industry in general. Wefear software patents will spell the end of freedom and innovationin game programming if we continue on our current course.

We hope that after reading this short article and following upwith the references yourself, you will come to the same conclusionwe have, and will join us in trying to dismantle the incredibly bro-ken patent system.

Intent vs. Reality

Software patents do not work as intended on anumber of levels. Patents — limited-time

exclusive rights to an invention — areallowed under the U.S. Constitution aslong as they “promote the progress ofscience and useful arts.” Unfortunately,software patents do not accomplish thisgoal in practice, and hard evidence isemerging that they actually hinderprogress for both the patent holders andfor others in the industry.

James Bessen, from an organizationcalled Research on Innovation, andEric Maskin, a Harvard and MIT eco-nomics professor, have written a papercalled “Sequential Innovation, Patents,and Imitation.” In this paper, Bessenand Maskin look at the various ratio-nales and conventional wisdom forpatents, and build economic modelsfor these theories. They then comparethe theories and models with datafrom the computer industry. The soft-ware industry is a good empirical testcase for patents, because software

patents were not legal until the early 1980s. So, the authors lookat R&D spending and other metrics from the time before softwarepatents until after they’re well established.

Their results are not surprising to any programmer unluckyenough to have dealt with software patents: Software patents didnot spur progress and competition in the computer industry. Theindustry did not experience a wave of innovation after softwareintellectual property law was strengthened, as defenders of softwarepatents have implied. In fact, Bessen and Maskin found that R&Dhas stagnated relative to pre-software-patent times, especiallyamong the companies that patented most.

This is vitally important research. The patent debate is rife withassertions and assumptions, but here is some actual data showingthat software patents have had the opposite of their intended effect.As David Brotz, principal scientist at Adobe, testified, “It is clear tome that the constitutional mandate to promote progress in the use-ful arts is not served by the issuance of patents on software.”

Given this data, even if you don’t agree with us that softwarepatents are inherently unethical (the topic for another Soapbox), asa logical person you still must conclude that they need drastic fix-ing or elimination. Unfortunately, laws are not changed by the

publication of a research paper, regardless ofhow important its results are. Laws are

changed by people who have a vestedinterest in an issue lobbying Congress.That’s why it’s important that you, as agame developer, learn more about thisissue and become active.

Here are a few more brief reasonswhy software patents don’t work:

“Nonobvious” to whom? The vastmajority of software-patent criticismfocuses on absurdly obvious algorithmsand techniques being granted patents. Alot of these are quite hilarious in howthey violate the U.S. Patent and Trade-mark Office’s own criterion of being“nonobvious to a person having ordi-nary skill in the art.” However, there’san incredibly serious side to these anec-dotes. Patents which will affect yourability to develop games are beinggranted every day by underpaid and

technically unsavvy Illus

trat

ion

by D

wig

ht A

llott

Page 41: MAY 2001twvideo01.ubm-us.net/o1/vault/GD_Mag_Archives/GDM_May... · 2013-07-16 · Noah Falstein The Inspiracy Brian Hook Independent Susan Lee-Merrow Lucas Learning Mark Miller Group

S O A P B O X

continued from page 64

patent examiners. Do you really want the future of your companyor career to be decided by an examiner who has only eight hours toreview a patent application?

Patents don’t protect small inventors. Another myth is thatpatents protect small inventors from being crushed by large com-panies. The numbers do not bear this out. Applying for a patent isexpensive, and prosecuting or defending a patent is astronomical-ly expensive; Stanford law professor Lawrence Lessig says it takes$1.2 million on average to litigate a patent.

Bad resource allocation. As Lessig, a lawyer himself, says,“Awarding [obvious] patents . . . siphons off resources from tech-nologists to lawyers — from people making real products to peo-ple applying for regulatory privilege and protection.” Brotz said,“An industry that still generates tremendous job growth throughthe start ups of two guys in a garage will not continue to growwhen a room for a third person, a patent attorney, needs to bemade in that garage.”

The references we’ve provided cover many more reasons soft-ware patents are a bad idea. The truth is, software patents do farmore harm than good, and they are forming a noose around ourindustry as you read this. Please read up on the issue and do whatyou can to help eliminate software patents. q

C H R I S H E C K E R | Chris ([email protected]) is editor-at-large of Game Developer. C A S E Y M U R A T O R I | Casey ([email protected])is the lead developer on Granny, RAD Game Tools’ licensable character animation system and 3D toolkit.

F O R M O R E I N F O R M AT I O N

The League for Programming Freedomhttp://lpf.ai.mit.edu/Patents/patents.htmlhttp://lpf.ai.mit.edu/Patents/against-software-patents.html

A pro-patent rebuttal of the LPF essaywww.heckel.org/Heckel/ACM%20Paper/acmpaper.htm

Bessen and Maskin’s paperwww.researchoninnovation.org/patent.pdf

The IGDA is forming a Software Patents Committeewww.igda.org