Image
  • Writing
    • Andy Gavin: Author
    • About my Novels & Writing
    • All Writing Posts
    • The Darkening Dream
      • Buy the Book Online
      • Sample Chapters
      • Reviews
      • Info for Reviewers
      • Press Coverage
      • Awards
      • Cast of Characters
    • Untimed
      • Buy Untimed Online
      • Book Trailer
      • Sample Chapters
      • Reviews
      • Info for Reviewers
      • Press Coverage
      • Awards
      • Cast of Characters
    • Scrivener – Writer’s Word Processor
    • iPad for Writers
    • Naughty Dark Contest
  • Books
    • Book Review Index
    • Favorite Fantasy Novels
    • Andy Gavin: Author
    • The Darkening Dream
      • Buy the Book Online
      • Sample Chapters
      • Short Story: Harvard Divinity
      • Reviews
      • Info for Reviewers
      • Press Coverage
      • Awards
      • Cast of Characters
    • Untimed
      • About the Book
      • Buy Untimed Online
      • Book Trailer
      • Sample Chapters
      • Reviews
      • Info for Reviewers
      • Press Coverage
      • Awards
      • Cast of Characters
    • Naughty Dark Contest
  • Games
    • My Video Game Career
    • Post Archive by Series
    • All Games Posts Inline
    • Making Crash Bandicoot
    • Crash 15th Anniversary Memories
    • World of Warcraft Endgames
    • Getting a Job Designing Video Games
    • Getting a Job Programming Video Games
    • Naughty Dark Contest
  • Movies
    • Movie Review Index
  • Television
    • TV Review Index
    • Buffy the Vampire Slayer
    • A Game of Thrones
  • Food
    • Food Review Index
    • Foodie Club
    • Hedonists
    • LA Sushi Index
    • Chinese Food Index
    • LA Peking Duck Guide
    • Eating Italy
    • Eating France
    • Eating Spain
    • Eating Croatia
    • Eating Vietnam
    • Eating Australia
    • Eating Israel
    • Ultimate Pizza
    • ThanksGavin
    • Margarita Mix
    • Foodie Photography
    • Burgundy Vintage Chart
  • Other
    • All Posts, Magazine Style
    • Archive of all Posts
    • Fiction
    • Technology
    • History
    • Anything Else
  • Gallery
  • Bio
  • About
    • About me
    • About my Writing
    • About my Video Games
    • Ask Me Anything
  • Contact

Archive for PowerAnimator

Crash Bandicoot – Teaching an Old Dog New Bits – part 3

Mar28

This is the twelfth of a now lengthy series of posts on the making of Crash Bandicoot. Click here for the PREVIOUS or for the BEGINNING of the whole mess.

The text below is another journal article I wrote on making Crash in 1999. This is the third part, the FIRST can be found here.

_

The Crash Bandicoot Trilogy: A Practical Example

The three Crash Bandicoot games represent a clear example of the process of technology and gameplay refinement on a single platform.  Crash Bandicoot was Naughty Dog’s first game on the Sony Playstation game console, and its first fully 3D game.  With Crash Bandicoot 2: Cortex Strikes Back and Crash Bandicoot: Warped, we were able to improve the technology, and offer a slicker more detailed game experience in successively less development time.  With the exception of added support for the Analog Joystick, Dual Shock Controller, and Sony Pocketstation the hardware platforms for the three titles are identical.

Timely and reasonably orderly development of a video game title is about risk management.  Given that you have a certain amount of time to develop the title, you can only allow for a certain quantity of gameplay and technology risks during the course of development.  One of the principle ways in which successive games improve is by the reuse of these risks.  Most solutions which worked for the earlier game will work again, if desired, in the new game.  In addition, many techniques can be gleaned from other games on the same machine that have been released during the elapsed time.

In the case of sequels such as the later Crash games there is even more reduction of risk.  Most gameplay risks, as well as significant art, code, and sound can be reused.  This allows the development team to concentrate on adding new features, while at the same time retaining all the good things about the old game.  The result is that sequels are empirically better games.

Crash Bandicoot   –   how do we do character action in 3D?

Development: September 1994 – September 1996

Staff: 9 people: 3 programmers, 4 artists, 1 designer, 1 support

Premise: Do for the ultra popular platform action game genre what Virtua Fighter had done for fighting games: bring it into 3D.  Design a very likeable broad market character and place him in a fun, and fast paced action game.  Attempt to occupy the “official character” niche on the then empty Playstation market.  Remember, that by the fall of 1994 no one had yet produced an effective 3D platform action game.

Gameplay risk: how do you design and control an action character in 3D such that the feel is as natural and intuitive as in 2D?

When we first asked ourselves, “what do you get if you put Sonic the Hedgehog (or any other character action game for that matter) in 3D,” the answer that came to mind was: “a game where you always see Sonic’s Ass.”  The entire question of how to make a platform game in 3D was the single largest design risk on the project.  We spent 9 months struggling with this before there was a single fun level.  However, by the time this happened we had formulated many of the basic concepts of the Crash gameplay.

We were trying to preserve all of the good elements of classic platform games.  To us this meant really good control, faced paced action, and progressively ramping challenges.  In order to maintain a very solid control feel we opted to keep the camera relatively stable, and to orient the control axis with respect to the camera.  Basically this means that Crash moves into the screen when you push up on the joypad.  This may seem obvious, but it was not at the time, and there are many 3D games which use different (and usually inferior) schemes.

Technical risk: how do you get the Playstation CPU and GPU to draw complex organic scenes with a high degree of texture and color complexity, good sorting, and a solid high resolution look?

It took quite a while, a few clever tricks, and not a little bit of assembly writing and rewriting of the polygon engines.  One of our major realizations was that on a CD based game system with a 33mhz processor, it is favorable to pre-compute many kinds of data in non real-time on the faster workstations, and then use a lean fast game engine to deliver high performance.

Technical risk: how do the artists build and maintain roughly 1 million polygon levels with per poly and per vertex texture and color assignment?

The challenge of constructing large detailed levels turned out to be one of the biggest challenges of the whole project.  We didn’t want to duplicate the huge amount of work that has gone into making the commercial 3D modeling packages, so we chose to integrate with one of them.  We tried Softimage at first, but a number of factors caused us to switch to AliasPower Animator.  When we began the project it was not possible to load and view a one million polygon level on a 200mhz R4400 Indigo II Extreme.  We spent several months creating a system and tools by which smaller chunks of the level could be hierarchically assembled into a larger whole.

In addition, the commercial packages were not aware that anyone would desire per polygon and per vertex control over texture, color, and shading information.  They used a projective texture model preferred by the film and effects industry.  In order to maximize the limited amount of memory on the Playstation we knew we would need to have very detailed control.  So we created a suite of custom tools to aid in the assignment of surface details to Power Animator models.  Many of these features have since folded into the commercial programs, but at the time we were among the first to make use of this style of model construction.

Technical risk: how do you get a 200mhz R4400 Indigo II to process a 1 million polygon level?

For the first time in our experience, it became necessary to put some real thought into the design of the offline data processing pipeline.  When we first wrote the level processing tool it took 20 hours to run a small test case.  A crisis ensued and we were forced to both seriously optimize the performance of the tool and multithread it so that the process could be distributed across a number of workstations.

Conventional wisdom says that game tools are child’s play.  Historically speaking, this is a fair judgment — 2D games almost never involve either sophisticated preprocessing or huge data sets.  But now that game consoles house dedicated polygon rendering hardware, the kid gloves are off.

In Crash Bandicoot players explore levels composed of over a million polygons.  Quick and dirty techniques that work for smaller data sets (e.g., repeated linear searches instead of binary searches or hash table lookups) no longer suffice.  Data structures now matter — choosing one that doesn’t scale well as the problem size increases leads to level processing tasks that take hours instead of seconds.

The problems have gotten correspondingly harder, too.  Building an optimal BSP tree, finding ideal polygon strips, determining the best way to pack data into fixed-size pages for CD streaming — these are all tough problems by any metric, academic or practical.

To make matters worse, game tools undergo constant revision as the run-time engine evolves towards the bleeding edge of available technology.  Unlike many jobs, where programmers write functional units according to a rigid a priori specification, games begin with a vague “what-if” technical spec — one that inevitably changes as the team learns how to best exploit the target machine for graphics and gameplay.

The Crash tools became a test bed for developing techniques for large database management, parallel execution, data flexibility, and complicated compression and bin packing techniques.

Art / Technical risk: how do you make low poly 3D characters that don’t look like the “Money for Nothing” video?

From the beginning, the Crash art design was very cartoon in style.  We wanted to back up our organic stylized environments with highly animated cartoon characters that looked 3D, but not polygonal.  By using a single skinned polygonal mesh model similar to the kind used in cutting edge special effects shots (except with a lot less polygons),  we were able to create a three dimensional cartoon look.  Unlike the traditional “chain of sausages” style of modeling, the single skin allows interesting “squash and stretch” style animation like that in traditional cartoons.

By very careful hand modeling, and judicious use of both textured and shaded polygons, we were able to keep these models within reasonable polygon limits.  In addition, it was our belief that because Crash was the most important thing in the game, he deserved a substantial percentage of the game’s resources.  Our animation system allows Crash to have unique facial expressions for each animation, helping to convey his personality.

Technical risk: how do you fit a million polygons, tons of textures, thousands of frames of animation, and lots of creatures into a couple megs of memory?

Perhaps the single largest technical risk of the entire project was the memory issue.  Although there was a plan from the beginning, this issue was not tackled until February of 1996.  At this point we had over 20 levels in various stages of completion, all of which consumed between 2 and 5 megabytes of memory.  They had to fit into about 1.2 megabytes of active area.

At the beginning of the project we had decided that the CD was the system resource least likely to be fully utilized, and that system memory (of various sorts) was going to be one of the greatest constraints.  We planned to trade CD bandwidth and space for increased level size.

The Crash series employs an extremely complicated virtual memory scheme which dynamically swaps into memory any kind of game component: geometry, animation, texture, code, sound, collision data, camera data, etc.  A workstation based tool called NPT implements an expert system for laying out the disk.  This tool belongs to the class of formal Artificially Intelligence programs.  Its job is to figure out how the 500 to 1000 resources that make up a Crash level can be arranged so as to never have more than 1.2 megabytes needed in memory at any time.  A multithreaded virtual memory implementation follows the instructions produced by the tool in order to achieve this effect at run time.  Together they manage and optimize the essential resources of main, texture, and sound RAM based on a larger CD based database.

Technical/Design risk: what to do with the camera?

With the 32 bit generation of games, cameras have become a first class character in any 3D game.  However, we did not realize this until considerably into the project.  Crash represents our first tentative stab at how to do an aesthetic job of controlling the camera without detracting from gameplay.  Although it was rewritten perhaps five times during the project, the final camera is fairly straightforward from the perspective of the user.  None of the crop of 1995 and 1996 3D action games played very well until Mario 64 and Crash.  These two games, while very different, were released within two months of each other, and we were essentially finished with Crash when we first saw Mario.  Earlier games had featured some inducement of motion sickness and a difficulty for the players in quickly judging the layout of the scene.  In order to enhance the tight, high impact feel of Crash’s gameplay, we were fairly conservative with the camera.  As a result Crash retains the quick action feel of the traditional 2D platform game more faithfully than other 3D games.

Technical risk: how do you make a character collide in a reasonable fashion with an arbitrary 3D world… at 30 frames a second?

Another of the games more difficult challenges was in the area of collision detection.  From the beginning we believed this would be difficult, and indeed it was.  For action games, collision is a critical part of the overall feel of the game.  Since the player is looking down on a character in the 3rd person he is intimately aware when the collision does not react reasonably.

Crash can often be within a meter or two of several hundred polygons.  This means that the game has to store and process a great deal of data in order to calculate the collision reactions.  We had to comb through the computer science literature for innovative new ways of compressing and storing this database.  One of our programmers spent better than six months on the collision detection part of the game, writing and rewriting the entire system half a dozen times.  Finally, with some very clever ideas, and a lot of hacks, it ended up working reasonably well.

Technical risk: how do you program, coordinate, and maintain the code for several hundred different game objects?

Object control code, which the gaming world euphemistically calls AI, typically runs only a couple of times per frame. For this kind of code, speed of implementation, flexibility, and ease of later modification are the most important requirements.  This is because games are all about gameplay, and good gameplay only comes from constant experimentation with and extensive reworking of the code that controls the game’s objects.

The constructs and abstractions of standard programming languages are not well suited to object authoring, particularly when it comes to flow of control and state.  For Crash Bandicoot we implemented GOOL (Game Oriented Object LISP), a compiled language designed specifically for object control code that addresses the limitations of traditional languages.

Having a custom language whose primitives and constructs both lend them selves to the general task (object programming), and are customizable to the specific task (a particular object) makes it much easier to write clean descriptive code very quickly.  GOOL makes it possible to prototype a new creature or object in as little as 10 minutes.  New things can be tried and quickly elaborated or discarded. If the object doesn’t work out it can be pulled from the game in seconds without leaving any hard to find and wasteful traces behind in the source.  In addition, since GOOL is a compiled language produced by an advanced register coloring compiler with reductions, flow analysis, and simple continuations it is at least as efficient as C, more so in many cases because of its more specific knowledge of the task at hand.  The use of a custom compiler allowed us to escape many of the classic problems of C.

Crash Bandicoot 2: Cortex Strikes Back  –   Bigger and Badder!

Development: October 1996 – November 1997

Staff: 14 people: 4 programmers, 6 artists, 1 designer, 3 support

Premise: Make a sequel to the best selling Crash Bandicoot that delivered on all the good elements of the first game, as well as correcting many of our mistakes.  Increasing the technical muscle of the game, and improving upon the gameplay, all without looking “been there done that…” in one year.

For Crash 2 we rewrote approximately 80% of the game engine and tool code.  We did so module by module in order to allow continuous development of game levels.  Having learned during Crash 1 about what we really needed out of each module we proceeded to rewrite them rapidly so that they offered greater speed and flexibility.

Technical risk: A fancy new tools pipeline designed to deal with a constantly changing game engine?

The workstation based tools pipeline was a crucial part of Crash 1.  However, at the time of its original conception, it was not clear that this was going to be the case.  The new Crash 2 tools pipe was built around a consistent database structure designed to allow the evolution of level databases, automatic I/O for complex data types, data browsing and searching, and a number of other features.  The pipe was modularized and various built-in restrictions were removed.  The new pipe was able to support the easy addition of arbitrary new types of data and information to various objects without outdating old information.

We could never have designed such a clean tool program that would be able to handle the changes and additions of Crash 2 and Warped at the beginning of the first game.  Being aware of what was needed at the start of the rewrite allowed us to design a general infrastructure that could support all of the features we had in mind.  This infrastructure was then flexible enough to support the new features added to both sequels.

Technical/process risk: The process of making and refining levels took too long during the first game.  Can we improve it?

The most significant bottleneck in making Crash 1 was the overall time it took to build and tune a level.  So for Crash 2 we took a serious look at this process and attempted to improve it.

For the artists, the task of surfacing polygons (applying texture and color) was very time consuming.  Therefore, we made improvements to our surfacing tools.

For both the artists and designers, the specification of different resources in the level was exceedingly tedious.  So we added a number of modules to the tools pipeline designed to automatically balance and distribute many of these resources, as well as to auto calculate the active ranges of objects and other resources that had to be controlled manually in the first game.  In addition, we moved the specification of camera, camera info, game objects, and game object info into new text based configuration files.  These files allowed programmers and designers to edit and add information more easily, and it also allowed the programmers to add new kinds of information quickly and easily.

The result of this process was not really that levels took any less time to make, but that the complexity allowed was several times that of the first game.  Crash 2 levels are about twice as large, have integrated bonus levels, multiple branches, “hard paths,” and three or four times as many creatures, each with an order of magnitude more settable parameters.  The overall turn around time for changing tunable level information was brought down significantly.

Technical/Design risk: can we make a better more flexible camera?

The camera was one of the things in Crash 1 with which we were least satisfied.  So in order to open up the game and make it feel more lifelike, we allowed the camera to look around much more, and supported a much wider set of branching and transition cameras.  In addition, arbitrary parameterized information was added to the camera system so that at any location the camera had more than 100 possible settable options.

If the two games are compared side by side, it can be seen that the overall layouts of Crash 2 levels are much larger and more complicated.  The camera is more natural and fluid, and there are numerous dynamic camera transitions and effects which were not present in the first game.  Even though the Crash 2 camera was written entirely from scratch, the lessons learned during the course of Crash 1 allowed it to be more sophisticated and aggressive, and it executed faster than its predecessor.

Optimization risk: can we put more on screen?

Crash 1 was one of the fastest games of its generation, delivering high detail images at 30 frames per second.  Nevertheless, for Crash 2 we wanted to put twice as much on screen, yet still maintain that frame-rate.  In order to achieve this goal we had one programmer doing nothing but re-coding areas of the engine into better assembly for the entire length of the project.  Dramatically increasing performance does not just mean moving instructions around; it is a complex and involved process.  First we study the performance of all relevant areas of the hardware in a scientific and systematic fashion.  Profiles are made of cache latencies, coprocessor parallel processing constraints, etc.  Game data structures are then carefully rearranged to aid the engine in loading and processing them in the most efficient way.  Complicated compression and caching schemes are explored to both reduce storage size (often linked to performance due to bus bandwidth) and to speed up the code.

Simultaneously we modularized the game engine to add more flexibility and features.  Crash 2 has more effects, such as Z-buffer-like water effects, weather, reflections, particles, talking hologram heads, etc.  Many annoying limitations of the Crash 1 drawing pipeline were removed, and most importantly, the overall speed was increased by more than two-fold.

In order to further improve performance and allow more simultaneous creatures on screen, we re-coded the GOOL interpreter into assembly, and also modified the compiler to produce native MIPS assembly for even better performance.

Technical risk: if we can put more on screen, can we fit it in memory?

We firmly believe that all three Crash games make use of the CD in a more aggressive fashion than most Playstation games.  So in order to fit the even larger Crash 2 levels into memory (often up to 12 megabytes a level) we had to increase the efficiency of the virtual memory scheme even more.  To do so we rewrote the AI that lays out the CD, employing several new algorithms.  Since different levels need different solutions we created a system by which the program could automatically try different approaches with different parameters, and then pick the best one.

In addition, since Crash 2 has about 8 times the animation of the first game, we needed to really reduce the size of the data without sacrificing the quality of the animation.  After numerous rewrites the animation was stored as a special bitstream compressed in all 4 dimensions.

Design risk: can we deliver a gameplay experience that is more than just “additional levels of Crash?”

We believe that game sequels are more than an opportunity to just go “back to the bank.”  For both of the Crash sequels we tried to give the player a new game, that while very much in the same style, was empirically a bigger, better game.  So with the increased capacity of the new Crash 2 engine we attempted to build larger more interesting levels with a greater variety of gameplay, and a more even and carefully constructed level of difficulty progression.  Crash 2 has about twice as many creatures as Crash 1, and their behaviors are significantly more sophisticated.  For example, instead of just putting the original “turtle” back into the game, we added two new and improved turtles, which had all the attributes of the Crash 1 turtle, but also had some additional differences and features.  In this manner we tried to build on the work from the first game.

Crash himself remains the best example.  In the second game Crash retains all of the moves from the first, but gains a number of interesting additional moves: crawling, ducking, sliding, belly flopping, plus dozens of custom coded animated death sequences.  Additionally, Crash has a number of new control specs: ice, surfboard, jet-pack, baby bear riding, underground digging, and hanging.  These mechanics provide entirely new game machines to help increase the variety and fun factor of the game.  It would be very difficult to include all of these in a first generation game because so much time is spent refining the basic mechanic.

Technically, these additions and enhancements were aided by the new more flexible information specification of the new tools pipeline, and by additions to the GOOL programming language based on lessons learned from the first game.

Crash Bandicoot: Warped!  –   Every trick in the book!

Development: January 1998 – November 1998

Staff: 15 people: 3 programmers, 7 artists, 3 designers, 2 support

Premise: With only 9 months in which to finish by Christmas, we gave ourselves the challenge of making a third Crash game which would be even cooler and more fun than the previous one.  We chose a new time travel theme and wanted to differentiate the graphic look and really increase the amount and variety of gameplay.  This included power-ups, better bosses, lots of new control mechanics, an open look, and multiple playable characters.

Technical/Process risk: the tight deadline and a smaller programming staff required us to explore options for even greater efficiency.

The Crash Warped production schedule required that we complete a level every week.  This was nearly twice the rate typical of Crash levels.  In addition, many of the new levels for Warped required new engines or sub-engines designed to give them a more free-roaming 3D style.  In order to facilitate this process we wrote an interactive listener which allowed GOOL based game objects to be dynamically examined, debugged, and tuned.  We were then able to set the parameters and features of objects in real-time, greatly improving our ability to tune and debug levels.  Various other visual debugging and diagnostic techniques were also introduced as well.

Knowledge from the previous game allowed us to further pipeline various processes.  The Crash series is heavily localized for different territories.  The European version supports five languages, text and speech, including lip sync.  In addition, it was entirely re-timed, and the animation was resampled for 25hz.  The Japanese version has Pocketstation support, a complete language translation, and a number of additional country specific features.  We were able to build in the features needed to make this happen as we wrote the US version of the game.  The GOOL language was expanded to allow near automatic conversion of character control timing for PAL.

Technical/Art risk: could the trademark look of the Crash series be opened up to offer long distance views and to deliver levels with free-roaming style gameplay?

In order to further differentiate the third Crash game, we modified the engine to support long distance views and Level of Detail (LOD) features.  Crash Warped has a much more open look than the previous games, with views up to ten times as far.  The background polygon resource manager needed some serious reworking in order to handle this kind of increased polygon load, as did the AI memory manager.  We developed the new LOD system to help manage these distance views.  These kinds of system complexities would not have been feasible in a first generation game, since when we started Crash 1, the concept of LOD in games was almost completely undeveloped, and just getting a general engine working was enough of a technical hurdle.

Similarly, the stability of the main engine allowed us to concentrate more programmer time on creating and polishing the new sub-engines:  jet-ski, motorcycle, and biplane.

Gameplay risk: could we make the gameplay in the new Crash significantly different from the previous ones and yet maintain the good elements of the first two games?

The new free-roaming style levels presented a great gameplay challenge.  We felt it necessary to maintain the fast-paced, forward driven Crash style of gameplay even in this new context.  The jet-ski in particular represented a new kind of level that was not present in the first two games.  It is part race game, part vehicle game, and part regular Crash level.  By combining familiar elements like the boxes and creatures with the new mechanics, we could add to the gameplay variety without sacrificing the consistency of the game.

In addition to jet-ski, biplane, and motorcycle levels, we also added a number of other new mechanics (swimming, bazooka, baby T-rex, etc.) and brought back most of Crash 2’s extensive control set.  We tried to give each level one or more special hooks by adding gameplay and effect features.  Warped has nearly twice as many different creatures and gameplay modes as Crash 2.  The third game clocked in at 122,000 lines of GOOL object control code, as compared to 68,000 for the second game and 49,000 for the first!  The stability of the basic system and the proven technical structure allowed the programmers to concentrate on gameplay features, packing more fun into the game.  This was only possible because on a fixed hardware like the Playstation, we were fairly confident that the Warped engine was reasonably optimal for the Crash style of game.  Had we been making the game for a moving target such as the PC, we would have been forced to spend significant time updating to match the new target, and would have not been able to focus on gameplay.

Furthermore, we had time, even with such a tight schedule, to add more game longevity features.  The Japanese version of Warped has Pocketstation support.  We improved the quality of the boss characters significantly, improved the tuning of the game, added power-ups that can be taken back to previously played levels, and added a cool new time trial mode.  Crash games have always had two modes of play for each level: completion (represented by crystals) and box completion (represented by gems).  In Warped we added the time trial mode (represented by relics).  This innovative new gameplay mode allows players to compete against themselves, each other, and preset goals in the area of timed level completion.  Because of this each level has much more replay value and it takes more than twice as long to complete Warped with 100% as it does Crash 2.

Technical risk: more more more!

As usual, we felt the need to add lots more to the new game.  Since most of Crash 2’s animations were still appropriate, we concentrated on adding new ones.  Warped has a unique animated death for nearly every way in which Crash can loose a life.  It has several times again the animation of the second game.  In addition, we added new effects like the arbitrary water surface, and large scale water effects.  Every character, including Crash got a fancy new shadow that mirrors the animated shape of the character.

All these additions forced us to squeeze even harder to get the levels into memory.  Additional code overlays, redundant code mergers, and the sacrifice of thirteen polka dotted goats to the level compression AI were necessary.

Conclusions

In conclusion, the consistency of the console hardware platform over its lifetime allows the developer an opportunity to successively improve his or her code, taking advantage of techniques and knowledge learned by themselves and others.  With each additional game the amount of basic infrastructure programming that must be done is reduced, and so more energy can be put into other pursuits, such as graphical and gameplay refinements.

If you liked this post, follow me at:

My novels: The Darkening Dream and Untimed
or the
video game post depot
or win Crash & Jak giveaways!

Latest hot post: War Stories: Crash Bandicoot

Related posts:

  1. Crash Bandicoot – Teaching an Old Dog New Bits – part 2
  2. Crash Bandicoot – Teaching an Old Dog New Bits – part 1
  3. Crash Bandicoot – An Outsider’s Perspective (part 8)
  4. Making Crash Bandicoot – part 1
  5. Crash Bandicoot as a Startup (part 7)
By: agavin
Comments (181)
Posted in: Games, Technology
Tagged as: Andy Gavin, Central processing unit, Console Games, Crash Bandicoot, Crash Bandicoot 2: Cortex Strikes Back, Crash Bandicoot 3: Warped, game, Jak and Daxter, Naughty Dog, Platform game, Playstation, PowerAnimator, pt_crash_history, Video game console, Video Games

Making Crash Bandicoot – part 3

Feb04

PREVIOUS installment, or the FIRST POST.

Crash in the Jungle

While all this art design was going on, I, and then in January 1995, Dave, struggled to build an engine and tool pipeline that would make it possible to render these grandiose cartoon worlds we had envisioned on paper. Since during fall of 1994 Jason was also the only artist, he frantically generated all the source material and banged on my head to make sure it would look incredible.

Our motto was “bite off more than we could chew, then figure out some crazy complicated way to make it work.”

The Playstation had this oddball 512×240 video mode that everyone else ignored, it wasn’t standard (320×240) and ate up video memory others wanted for textures. But it looked SHARP and we found the machine was really good at rendering shaded, but un-textured, triangles. In fact, just as fast in the 512 mode as 320. Jason pointed out — he’s always been the master of seeing the intersection between art and tech — that since polygons on 3D characters our size were just a few pixels, shaded characters actually looked better than textured ones. So we went with more polys on the characters, less texture. This was a highly usual approach, but had lots of advantages. The characters popped, like cartoons are supposed to, we had lots more polygons to work with, and it worked around the Playstation’s lack of texture correction or polygon clipping.

Since the soul of good Animation, is…. drum roll please… animation! We were obsessed with making ours look like that really good Disney or Looney Tunes stuff. In those days, most people used a simple skeleton system with “1 joint” weighting, and very few bones. This gives a very stiff look, so we went instead with vertex animation. This allowed us to use the more sophisticated 3-4 joint weighting available in PowerAnimator, which the Playstation had no hope of matching at runtime (until the PS2), instead we stored the location of every vertex, every frame at 30 frames a second. No one else had the guts, as while this was easy to render, it required inventing some totally hardcore assembly language vertex compressors. First me (three times), then Dave (twice), then finally Mark took a crack at it. Mark’s was the best — being the best assembly programmer of us three — but also the most complicated.

Complexity became the name of the game at Naughty Dog.

We also wanted vast and detailed worlds. Dave, Jason, and I had done a bunch of research “post Doom” on visibility calculation. And Dave and I were convinced that extensive pre-calculation of visibility could allow the renderer to handle A LOT more polygons. So we did experiments in free roaming camera control and settled on branching rail camera + pre-calculation = gorgeous visuals.

The Evolve-o-Ray

The idea was that the camera would follow along next to, behind, or in front of the character, generally looking at him, moving on a “track” through the world. Dave and I experimented with pre-calculating the visibility and sort (the Playstation had no z-buffer, and hence no easy way to sort polygons) ahead of time on the SGI workstations the artists used. Although painful and expensive, this worked really well. As long as you could never SEE more than a set number of polygons (800 for Crash 1, 1300 for Crash 2 or 3) from any given position we could have perfect occlusion and sort, with no runtime cost. We conceived of using trees, cliffs, walls, and twists and turns in the environment to hide a lot of the landscape from view – but it would be there, just around the corner.

So we decided to use an entirely SGI and IRIX based tool pipeline. In fact the game itself even ran on the SGI (with terrible keyboard control). This meant buying programmers $100,000 SGIs instead of $3,000 PCs. Gulp again. No one else did this. No one. And at the time, when a 50mhz Pentium with 8-32 megs of RAM was typical, our 250mhz 64 bit SGIs with 256 or 512 megs of RAM opened up totally different computational possibilities. By 1997 I had 4 gigs of ram in my machine! Of course some of those computational possibilities were so brutal that I had to code tools to distribute the calculations out to the video hardware, and chop it up onto all the office machines, where processing could be done in parallel 24 hours a day. Levels often took several hours to process on our 5-8 machine farm!

This was not easy in 1995!

I also concocted a crazy algorithmic texture packer that would deal with the fact that our gorgeous 512×240 mode left us with too little texture memory. And the even crazier – way crazier – virtual memory system required to shoehorn the 8-16 meg levels the artists created into the Playstation’s little 2megs of RAM. Dave meanwhile had to invent insane bidirectional 10x compressors to help get the 128meg levels down into 12, and figure out some tool for managing the construction of our gigantic 3D worlds.

Our levels were so big, that our first test level, which never shipped and was creatively named “level1” or “the jungle,” couldn’t be loaded into Alias PowerAnimator even on a machine with 256megs. In fact, it had to be cut up into 16 chunks, and even then each chunk took 10 minutes to load!

So Dave created a level design tool where component parts were entered into a text file, and then a series of 10-15 Photoshop layers indicated how the parts were combined. The tool, known as the DLE, would build each chunk of the level and save it out. Artists tweaked their photoshop and text files, ran the tool, then loaded up chunks to look for errors. Or they might let the errors pass through the 8 hour level processing tool, there to possibly pick up or interact with new (or old) programmer bugs. If one was lucky, the result wouldn’t crash the Playstation.

But the craziest thing I did was create a new programming language – with Lisp syntax – for coding all of the gameplay. It had all sorts of built in state machine support (very useful with game objects), powerful macros, dynamic loading etc. It was also highly irregular and idiosyncratic, and in true Naughty Dog fashion “powerful but complicated.”

 

Jason says:

 

The secret to Crash’s success was its Art.  And the secret to its Art was its Programming. [ Andy NOTE: well, and the F-word ]

Andy and Dave broke a lot of rules.  First and foremost, they didn’t follow PlayStation’s library restrictions.  Other developers often complained that Crash was using some sort of secret Sony library.  That is the exact opposite of the truth.  The truth is that Crash used as little as it could of Sony’s library and the programmers basically hacked everything right to the hardware.

Years later Sony tried to create a game called Harry Jalapeño to compete with Crash.  No, I am not making that up.  Besides the name fail, the internal team in San Francisco also utterly failed to create the complex worlds and characters that we created in Crash.  Let me repeat – an internal Sony team couldn’t create Crash.  Let the rumors of “insider information” forever rest.

Hitting the hardware directly was against the rules.  But by the time Sony saw the results they needed a Mario killer.  It was too late for them to complain.

It is easy to underestimate the value of the pre-occlusion and vertex animation hacks.  But let me tell you, this was everything.

The occlusion meant more polygons in the background, and more polygons meant we could do the levels.  Without it we NEVER could have made the world look as good as it did.

Our occlusion worked on a texture level.  That is, if we had a giant polygon with a fern texture on it (think many leaves but lots of empty space) the occlusion could actually get rid of polygons behind the leaf part of the texture but leave the polygons seen through the alpha channel holes.  No other game had that kind of detail in occlusion, and it paid off immensely. Given how small ground polygons could be in the distance, a little fern action went a long way.

We were up against the polygon draw limit at every twist and turn in the game.  We wanted to have as much distance and detail visible as possible, but the minute we went over that limit the game started getting “hitchy.”  We’d build a level over night (really 4am-11am, the only times the office was ever empty) and come in to see the results.  Wherever we had too many polygons we’d add some leaves or whatever to occlude some distance.  Wherever there were more polygons available to draw we’d pull leaves out.

And remember, more foreground (boxes, enemies, platforms) meant we had to have less background.  So just when you had a level perfectly balanced, someone (usually me or Mark) would determine that the level was too hard or easy and we’d have to add a platform or enemy and the level builder (usually Bob Rafei or Taylor Kurosaki) would have to start balancing the background poly count over again.  It was so cruel.

We couldn’t see the result of any change for at least 12 hours, so if we made a mistake we’d make a tweak and then we’d have to repeat the process.   No level was “done” till the game shipped.

Crash was 512 polygons in the first game, with textures only for his spots and his shoelaces, and his model didn’t change much through the 3 platform titles.  It took me a month to settle on the perfect 512.   As Andy said, we went with non-textured polygons instead of textured ones on most of the characters.  Instead of texture, we used corner colors to create the textures that seemed to be there.

There were many advantages to this strategy.  The simplest was that we got more polygons.  But we also solved a texture stretching and warping issue inherent in the PlayStation’s renderer that tended to make textures look terrible.  Since you spent most of your time looking at the character, and he could get quite close to the camera, avoiding texture mess meant a lot for visual quality.

And there was another important issue solved by using polygons instead of textures.  The PlayStation tended to render every polygon as a pixel, no matter how small it got.  Had Crash’s pupils been texture, they might have disappeared when the got smaller than a pixel.  But by making the pupil 2 polygons (a quad), they almost always showed up as long as the total eye, including whites, was more than a few pixels tall.  Subtle, but trust me, it made the game so much more clean looking.  It’s the small things that matter.

The most important advantage of our character system was vertex animation.  I cannot imagine the torture that other game developers went through trying to bend the low polygon arms and legs of their characters using nothing but bone weighting!  When the bones failed for us, and they often did in a character with <1000 polygons, we just grabbed vertices and yanked them around until things were fixed.  This is why Crash doesn’t bend and fall apart when animating.  It meant more mobility and stretchability.

In some of the most stretched or bent poses, we just pulled vertices by hand and forgot the bones altogether, which brought us two additional abilities that nobody else had. [ Andy NOTE: this allowed the same animation techniques then at use at Pixar into our little effort ]

The first is that the characters in Crash had different facial expressions on every single frame.  Forget bones.  I just pulled the vertices until I had what I wanted.  It doesn’t sound like a big distinction, but I could go from a huge smile full of teeth to a whistle mouth that was toothless or no mouth at all just by collapsing vertices on top of each other to make zero volume polygons.   Thus Crash had a more expressive face than any other character had ever had before, and this created emotion that gamers hadn’t felt before.

It was that opening sequence, when Crash pulls his flat face out of the sand, shakes it off, looks confused, leaps up, looks at the camera and does his great big goofy smile that SOLD Crash as a character.  No 2d game could afford the art, and no other 3d game had the facial animation that our vertex system brought.  And thus the main character transformed from emotionless “vehicles” to an emotive friend.

Before Crash characters had no emotion (Pacman, and even Mario), or one dimensional emotions (Sonic was “fast”).  Crash had facial emotions that let him speak to you and gave him personal range.  Crash wasn’t any one emotion.  Crash was Crash.  For example, you could see Crash acting like a mime.  Sonic and Mario weren’t capable expressing even a mimes range of emotion until after Crash came out.  “Itsa me, Mario” just doesn’t cut it, especially when Mario’s face didn’t even animate as he said it!!

Of course it wouldn’t be until much later that the game industry got fully 3 dimensional characters, like Daxter, who had full personalities, and could go beyond mime and do, for example, a scene from Shakespeare, but in their very own way.  But that’s a story for another time. [ Andy NOTE: and when we got there we had to build a special “face engine” and “eye engine” to do it ]

The second thing that vertex animation allowed is total warping of the character beyond bones.  If I wanted Crash to become a balloon, I just animated a keyframe of him wrapped around a sphere (shoes and face usually un-stretched!) and the game tweened to it.  If I wanted to smash him flat into his shoes I just folded his legs and body up into his face and cleaned up the resulting frames as it went.   The animators were free to do anything, and we did.   Again, helped endear Crash as a character.

That made Crash’s characters feel more like the Loony Toons than the stiff 3d bone creatures of the day.  I still have a signed copy of Disney’s “The Illusion of Life,” by Frank Thomas and Ollie Johnson, two of the greatest animators of all time.  It’s dog-eared and beat up.  Bob, Taylor and I read it, absorbed it, and tried to live it.

Again, all this was only possible thanks to some incredibly crafty programming from Andy, Dave, and Mark.

CONTINUED HERE WITH PART 4 or

If you liked this post, follow me at:

My novels: The Darkening Dream and Untimed
or the
video game post depot
or win Crash & Jak giveaways!

Latest hot post: War Stories: Crash Bandicoot

Crash was never suave

Related posts:

  1. Making Crash Bandicoot – part 2
  2. Making Crash Bandicoot – part 1
By: agavin
Comments (123)
Posted in: Games
Tagged as: Andy Gavin, Animation, Crash Bandicoot, Crash Bandicoot (series), Dave Baggett, Games, Hardware, Jason Rubin, Looney Tunes, Playstation, PowerAnimator, pt_crash_history, SGI, Silicon Graphics, Video game, Video Games
Watch the Trailer or

Buy it Online!

Buy it Online!

96 of 100 tickets!

Find Andy at:

Follow Me on Pinterest

Subscribe by email:

More posts on:



Complete Archives

Categories

  • Contests (7)
  • Fiction (404)
    • Books (113)
    • Movies (77)
    • Television (123)
    • Writing (115)
      • Darkening Dream (62)
      • Untimed (37)
  • Food (1,484)
  • Games (100)
  • History (13)
  • Technology (21)
  • Uncategorized (16)

Recent Posts

  • Mes Ami – C’est Mort
  • Robo Eats – Szechuan Place
  • Providence Chef’s Table 2022
  • OOToro Double
  • Robo Eats – Anarbagh
  • Fred loves N/Naka
  • Major Major Major
  • Far East – Beijing Tasty House
  • Home Sweet Spicy Home
  • Quick Eats – Bafang

Favorite Posts

  • I, Author
  • My Novels
  • The Darkening Dream
  • Sample Chapters
  • Untimed
  • Making Crash Bandicoot
  • My Gaming Career
  • Getting a job designing video games
  • Getting a job programming video games
  • Buffy the Vampire Slayer
  • A Game of Thrones
  • 27 Courses of Truffles
  • Ultimate Pizza
  • Eating Italy
  • LA Sushi
  • Foodie Club

Archives

  • March 2023 (12)
  • February 2023 (11)
  • January 2023 (14)
  • December 2022 (11)
  • November 2022 (13)
  • October 2022 (14)
  • September 2022 (14)
  • August 2022 (12)
  • July 2022 (9)
  • June 2022 (6)
  • May 2022 (8)
  • April 2022 (5)
  • March 2022 (4)
  • February 2022 (2)
  • January 2022 (8)
  • December 2021 (6)
  • November 2021 (6)
  • October 2021 (8)
  • September 2021 (4)
  • August 2021 (5)
  • July 2021 (2)
  • June 2021 (3)
  • January 2021 (1)
  • December 2020 (1)
  • September 2020 (1)
  • August 2020 (1)
  • April 2020 (11)
  • March 2020 (15)
  • February 2020 (13)
  • January 2020 (14)
  • December 2019 (13)
  • November 2019 (12)
  • October 2019 (14)
  • September 2019 (14)
  • August 2019 (13)
  • July 2019 (13)
  • June 2019 (14)
  • May 2019 (13)
  • April 2019 (10)
  • March 2019 (10)
  • February 2019 (11)
  • January 2019 (13)
  • December 2018 (14)
  • November 2018 (11)
  • October 2018 (15)
  • September 2018 (15)
  • August 2018 (15)
  • July 2018 (11)
  • June 2018 (14)
  • May 2018 (13)
  • April 2018 (13)
  • March 2018 (17)
  • February 2018 (12)
  • January 2018 (15)
  • December 2017 (15)
  • November 2017 (13)
  • October 2017 (16)
  • September 2017 (16)
  • August 2017 (16)
  • July 2017 (11)
  • June 2017 (13)
  • May 2017 (6)
  • March 2017 (3)
  • February 2017 (4)
  • January 2017 (7)
  • December 2016 (14)
  • November 2016 (11)
  • October 2016 (11)
  • September 2016 (12)
  • August 2016 (15)
  • July 2016 (13)
  • June 2016 (13)
  • May 2016 (13)
  • April 2016 (12)
  • March 2016 (13)
  • February 2016 (12)
  • January 2016 (13)
  • December 2015 (14)
  • November 2015 (14)
  • October 2015 (13)
  • September 2015 (13)
  • August 2015 (18)
  • July 2015 (16)
  • June 2015 (13)
  • May 2015 (13)
  • April 2015 (14)
  • March 2015 (15)
  • February 2015 (13)
  • January 2015 (13)
  • December 2014 (14)
  • November 2014 (13)
  • October 2014 (13)
  • September 2014 (12)
  • August 2014 (15)
  • July 2014 (13)
  • June 2014 (13)
  • May 2014 (14)
  • April 2014 (14)
  • March 2014 (10)
  • February 2014 (11)
  • January 2014 (13)
  • December 2013 (14)
  • November 2013 (13)
  • October 2013 (14)
  • September 2013 (12)
  • August 2013 (14)
  • July 2013 (10)
  • June 2013 (14)
  • May 2013 (14)
  • April 2013 (14)
  • March 2013 (15)
  • February 2013 (14)
  • January 2013 (13)
  • December 2012 (14)
  • November 2012 (16)
  • October 2012 (13)
  • September 2012 (14)
  • August 2012 (16)
  • July 2012 (12)
  • June 2012 (16)
  • May 2012 (21)
  • April 2012 (18)
  • March 2012 (20)
  • February 2012 (23)
  • January 2012 (31)
  • December 2011 (35)
  • November 2011 (33)
  • October 2011 (32)
  • September 2011 (29)
  • August 2011 (35)
  • July 2011 (33)
  • June 2011 (25)
  • May 2011 (31)
  • April 2011 (30)
  • March 2011 (34)
  • February 2011 (31)
  • January 2011 (33)
  • December 2010 (33)
  • November 2010 (39)
  • October 2010 (26)
All Things Andy Gavin
Copyright © 2023 All Rights Reserved
Programmed by Andy Gavin