Unreal Technology FAQ

Tim Sweeney
Epic MegaGames, Inc.
http://www.epicgames.com/

Last Updated: 06/08/00

This document is a trade secret of Epic MegaGames, Inc.

Q. Why did the Unreal team choose C++ for engine development, given that most game development is done in C?

A. Game developers have typically trailed mainstream software developers in utilization of programming tools by three to five years. Witness the lag time in the move from assembly language to C; from DOS to Windows; and now from C to C++. This is most likely due to the of game programming teams to be small and thus less susceptible to the problems of large-scale software development than applications programming teams.

In the era of game engines leading up to Quake, C has proven to be a sufficient language for development. The primary challenge of these products was extracting speed from slow PCs. The codebases were small and fairly simple. The programming teams were two or three guys.

For the generation of game technology that begins with Unreal, 3D hardware and faster PCs resolve many of the speed challenges. At the same time, increased user expectations and feature gains shift the primary programming challenge to managing large codebases and generationally improving a technology, rather than performing a ground-up rewrite of the technology with each new project. C++, and object-oriented programming in general, provides a solid foundation for large projects.

Application developers moved from C to C++ about five years ago in order to reap the benefits of increased development efficiency. As things evolve from simple to complex over time, game developers also need to move to new tools which enable them to manage that complexity.

Q. Why is object orientation useful  in a game?

A. Because many game concepts are inherently object-oriented. For example, all actors in the world share a set of common functionality, such as the ability to move around and collide with other actors. All weapons also have much in common, such as the ability to fire and the ability to hold ammo. A simple and intuitive representation for this is a class hierarchy. On another level, object orientation encourages modular code, which is key to having multiple programmers working on a project.

Q. What have the key Unreal developers done in the past?

A. The Unreal developers come from a wide range of backgrounds:

Tim Sweeney (engine programmer; majority owner of Epic)

James Schmalz (lead artist, co-designer)

Cliff Bleszinski (lead level designer, co-designer)

Steven Polge (AI programmer)

Erik de Neve (Special effects & optimization programmer)

Q. How do 256-color palettized textures compare to 16-bit color textures?

A. Though palettized textures are twice as memory-efficient as 16-bit textures, the graphical quality for typical materials—which have consistent color schemes—is much higher. In 16-bit, you only get 5 bits of color resolution for red and blue, while for a typical palettized texture, you get more precision (typically 6-7 bits) for the most frequently used colors. Epic provides an extremely high quality color quantization routine to convert 24-bit color source textures from programs like Photoshop and Fractal Painter to Unreal's format. The importance of the quantizer should not be underestimated; our quantizer typically outperforms Photoshop's by a factor of four (RMS error).

Custom palettized textures have several significant advantages over the alternatives:

Until 3D hardware supports native 24-bit color textures—which will probably occur in late 1999—palettized textures are best for game textures.

Q. With many other engine developers going to an all C/C++ approach, why is Epic banking on UnrealScript?

A. Though built-in programming languages are fairly new to gaming, they are a time-proven feature in the world of major software applications.  For example, Microsoft Word and Microsoft Access contain a fully-featured application-specific programming language (Visual Basic for Applications).  In the gaming space, UnrealScript enables developers to solve game programming problems with a tool designed for realtime game interaction. There are a few vital game programming areas where UnrealScript excels well beyond languages like C/C++. These are:

Q. So what's the catch with UnrealScript?

A. There are three catches: low brute-force performance, lack of support for low-level programming, and no debugger. UnrealScript is a byte-code-based language so it is far slower than C/C++ and it also lacks support for low-level programming such as calling Windows API functions. We use UnrealScript internally for all of our high-level game programming, and C++ for all low-level support. Because we provide a fully featured interface for calling functions between C++ and UnrealScript, you can write select, performance critical routines in C++ when needed. Alternatively, you could eschew UnrealScript and write all your game code in C++, if you wanted to do it the hard way.  However, when used at a sufficiently high level, UnrealScript execution time typically consumes less than five percent of available CPU power.

Q. What is Unreal's approach to AI?

A. When people hear of AI, they tend to think of neural networks and fuzzy logic and fancy theoretical foundations which aren't particularly useful when the overwhelming limitation of past 3D game AI has been that creatures don't animate smoothly and don't know how to find their way around an environment. This is why past game AI has basically degenerated to enemies running toward the player, bumping into walls, getting stuck in corners, and, in general, behaving stupidly.

Unreal's major advancement to game AI, pioneered by Steven Polge, is the path network. A path network is basically a simple, automatically-generated "map" of the level which creatures can use to navigate from place to place. So if a creature wants to find you, and you're all the way across a level, the creature just follows the path network, including going up and down stairs, through twisty passageways, opening doors and operating elevators, and so on, until it reaches you.

The foundations of Unreal's AI are based on knowledge Steven gained while designing network routers at IBM—routing networks are quite similar in implementation to his AI path networks. Before joining Epic, these ideas were validated in his "ReaperBot" add-in for QuakeC, which was a very intelligent AI based deathmatch opponent that competed against players on the same terms as the players themselves.

An example of the power of path network AI can be seen in Unreal when a Skaarj patrolling on a ledge far above you, sees you, then goes running in the other direction, walks through a door, and comes out behind you on the other side.

This kind of scenario makes creatures look smart, and that's our goal—not to create monsters which are necessarily hard to kill, but to create monsters that seem smart and devious to the average player.

Q. What are Epic's long-term plans for the Unreal technology?

A. We plan to evolve and extend Unreal for many generations, much as Windows® and the Intel X86 architecture have evolved over many generations of breakthrough improvements.

"The beauty of the engine and its modular design is that we won't have to rewrite it for a sequel. We can redo parts of it or add new features, but the core scripting and other elements are there for the long haul."
-
James Schmalz

This is possible because the Unreal engine is modular and it is possible to upgrade and replace certain components without breaking other components (well, without breaking them too badly).

For example, we expect that the rendering engine will be redesigned from the ground up for each major new version of the technology, because the four-fold improvements in 3D graphics power that are occurring each year cause old assumptions to break and make entirely new capabilities possible.

However, the rendering code is only about 20 percent of the Unreal codebase. Though rendering is the most visible part of the engine, the vast majority of the development effort on the project is invested in the tools, UnrealScript, the networking infrastructure, and the component-based architecture. These components provide a solid foundation which we will evolve to create Unreal 2 and beyond.

Q. What development tools does the Unreal team use internally?

A. Our programming environment consists of Microsoft Visual C++ 5.0 with version control via Microsoft Visual SourceSafe, with occasional help from NuMega Bounds Checker, Intel VTune, and Visual Basic 5.0. Artwork is created using a combination of Fractal Painter and Photoshop. Modeling and animation are developed with a combination of 3D Studio 4 (for historical reasons) and Alias PowerAnimator. Level design takes place in UnrealEd with occasional use of 3D Studio MAX and Lightwave.

Q. How does Unreal's animation system compare to those of other 3D games?

A. There are two major categories of animation systems used in current games:

With frame-based animation, artists can use advanced tools like 3D Studio MAX, Alias PowerAnimator or motion capture systems to generate animations which can move and distort in any way possible. Frame-based animations are perfect for capturing details such as wrinkled skin bunching up, flowing capes, and morphing. Modern engines such as Quake 2 and Unreal add interpolation to frame animation, making movement perfectly smooth at high frame rates.

With hierarchical animation, a model is treated as a collection of rigid interconnected parts. Thus hierarchical animations are severely limited in their ability to capture organic details. However, hierarchical animations have a 10X-20X memory efficiency advantage which is why they are the format of choice for Nintendo 64 games. Some developers have attempted to add "soft skinning" onto a hierarchical animation system, but the results are not comparable in quality to the skinning algorithms used by state-of-the-art modelling packages.

Probably the most overwhelming advantage of frame-based animation is that it allows animators to use all of the capabilities of the most advanced tools available. The advantages show up in Unreal, for example, in areas such as these:

Q. What is Unreal's long-term strategy regarding 3D hardware?

A. We are very much looking forward to the day when the majority of game buyers have at least a 3dfx-quality 3D accelerator.  Over time, the Unreal technology will evolve into a hardware rendering-only platform.  However, we realize that in the 1998 timeframe, the majority of gamers will not have 3dfx-quality hardware and, for the time-being, software rendering is still vitally important in a mainstream PC game.   This is why the Unreal 1 technology is targeted dually at 3D hardware and software rendering, with emphasis on creating a consistent set of features across all target machines.  For example, Unreal supports multicolored, intermixed lighting in all software rendering modes, which frees designers from the difficulty of creating environments with colored lighting when these environments also look good with only white lighting.

Q. Is it good or bad for me (as a licensee) that other licensees are using the Unreal technology to create 3D games?

A. Well, there are two popular arguments here, neither of which is particularly correct.  The first is that using a popular technology is bad, because other developers are using it and it will be harder to differentiate your product.  The other is that having it at your disposal is necessary, because some of your strongest competitors have it.

"Execution is everything. It's like a contractor worrying about the fact he's using a saw, hammer, nails, wood, and paint to build a house. You can still build a lot of different houses with the same tools."
-
Warren Spector

In reality, the Unreal technology is a tool, and it should be evaluated for projects based on how just how good of a tool it is for the job at hand.  The most important criteria are how well it suits the needs of your project, and how well it compares to other 3D technologies which are available.  As for differentiation, there are countless ways in which you can differentiate your product from others which use the Unreal technology, and most of those center around making unique design and artistic decisions, just as two painters can use the same kind of paintbrush to create very different paintings.

Another point to consider is that Unreal is in many ways a mini-platform of its own. Windows and the Nintendo 64 are full-blown platforms.  The 3dfx hardware is a mini-platform, in that many developers are targeting it specifically, and even more are optimizing their products for it.  Java is a mini-platform.  Historically, there has been safety in numbers in newly evolving platforms, and Bill Gates described this as an "upward spiral": as more developers invest in the platform, it becomes more successful, enabling increased reinvestment in the platform.  Unreal has many attributes which have been characteristic of platforms that have rapidly risen to success in the past:

Another benefit of the Unreal technology and its open nature is the "lots of eyes" phenomenon. There are a lot of smart people looking at and working with the code, thus increasing the probability that the bugs will be found and cool suggestions and feature requests will be made.

End