UnrealSmall.gif (411 bytes)
Unreal Technology

Resources
Announcements
Downloads
Community

Unreal Tournament
Home Page
Known Issues and Bugs
Performance Tweaks
Running UT  Servers

Console Commands
AI

Licensing
Partners
Features
Licensing FAQ
Company Info

Level Design
UnrealEd Quick Notes
Overview of Zones

Programming
Mod Development
UnrealScript Reference
UnrealScript Black Magic
Networking Architecture
Server Querying
Objects in C++
Engine Redistribution
Localization
True-type Fonts

Other Content Creation
Package Files
Package Commandlet
Audio
Textures
Fire & Water
Music
Mesh LOD Tech
Mesh 3ds2unr Tool
Skeletal Animation

Unreal 1
Unreal 1 Server Tips
Unreal URL's
Master Servers
Console Commands
AI





unrealcomposite.jpg (19818 bytes)

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)

  • BS in Mechanical Engineering, University of Maryland.
  • Founded Epic MegaGames in 1991.
  • Created the company's first major game, Jill of the Jungle.
  • Was Epic's president and producer on many of the company's projects through 1995.

James Schmalz (lead artist, co-designer)

  • BS in Mechanical Engineering, University of Waterloo
  • Created Epic Pinball in 1993, the third most successful shareware game of all time.
  • Produced and illustrated Extreme Pinball, 1995.

Cliff Bleszinski (lead level designer, co-designer)

  • Designer of Jazz Jackrabbit and Jazz Jackrabbit 2.

Steven Polge (AI programmer)

  • BS & MS in Electronic Engineering, University of North Carolina.
  • Formerly worked as an engineer at Motorola and as a programmer at IBM.
  • Created the ReaperBot plug-in for Quake.

Erik de Neve (Special effects & optimization programmer)

  • Author of the shareware CoreLife and Virtual Fire programs.

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:

  • Half the memory usage of 16-bit color textures, so you can choose to either use twice as much texture detail or halve your memory usage.
  • Twice the upload speed on 3D accelerator cards. In complex environments, texture uploading can be a significant performance drain when moving around dynamic scenes.
  • Far higher quality than single-palette engines like Quake, which force all textures in a level to use the same palette. Since each texture in Unreal can have its own palette, you can have tremendous color variety throughout a level without using more memory.

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:

  • Time. A game typically consists of thousands of independent objects moving around and interacting with each other over time. UnrealScript gives each object a built-in notion of time, and the ability to efficiently execute functions that take time to complete. Such functions include waiting, walking to a destination point, or laying an animation sequence. Time-based code is difficult to write and maintain in C/C++, as it must be simulated through counters and gigantic switch() statements.
  • State. Say you have a monster that can be attacking, hunting, patrolling, or dead. These are "states," actions that an actor can be performing which require different responses to stimuli. In UnrealScript, when a monster sees a player, his "SeePlayer" function is called, which enables him to respond. In this example, the monster should act differently to SeePlayer when he's attacking, hunting, patrolling, or dead. UnrealScript support states and state-scoping of functions at the language level, which provides a far cleaner and simpler solution than the brute-force approach to states that game developers have used in the past.  In a game with complex AI, state management in C/C++ rapidly becomes unmanageably complex as new states and behaviours are added.  Thus, a language-level solution to the state problem is highly desired.
  • Networking. Unreal supports high performance, low bandwidth network play using a variety of simulation, replication, and RPC techniques, which can all be defined and customized in UnrealScript.

    Simulation is about having players perform physics and movement calculations on actors locally, in order to conserve bandwidth. Simulation is a double-edged sword, however, because it only works well in certain situations. By exposing the simulation capabilities to UnrealScript, you can tweak and optimize your scripts to achieve the best balance between network performance and realism.

    Replication is a technique which enables a game server to send an approximate representation of the game state to game clients. Because the complete game state exceeds a 28.8K connection's bandwidth by orders of magnitude, Unreal employs many techniques to give clients the best approximation of the state that can be made with a given bandwidth.

    Remote procedure calls (RPCs) enable a client or server to call a function on the other end of the connection. This is a very efficient, versatile way of communicating information like sound effects, informational messages, and special events.

    In UnrealScript, all of these concepts are supported directly at the language level.
  • Development efficiency. Whenever you can implement a feature in one-fourth as much code and half the time by using a specialized tool, you gain a development advantage over all of the companies that are still doing it "the hard way".

  • Client code download: The great advantage of secure, bytecode-based languages like Java and UnrealScript is that they facilitate client code download.  A big part of the evolving Unreal community on the Internet centers around enthusiasts building their own levels, writing their own scripts, and piecing together complete new interconnected online worlds.  Client code download enables new code to be written, and automatically sent to players over the net (along with textures, sounds, music, and other new resources).  This is secure because UnrealScript operates in a "sandbox" which enables it to operate without access to potentially dangerous OS features like file deletion and hard disk formatting.

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.

< p>"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:

  • Interpolated, frame-based animation (Unreal, Quake 2).
  • Hierarchical animation (Super Mario, Jedi Knight, Tomb Raider).

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:

  • The extremely smooth movements of the Skaarj's tail and dreadlocks, created in 3DS4 using the Bones Pro skeletal IK plug-in.
  • The smoothly morphing Blob, created in 3DS4 with a metaball plug-in.
  • The particle swarm weapon effects, created in Alias PowerAnimator using particle systems.

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:

  • High quality development tools.
  • Strong first-party product development, in the form of Epic's initial Unreal title.
  • Strong third-party product development, including Microprose's "Star Trek: First Contact" and "Star Trek: Klingons," and Legend Entertainment's "Wheel of Time."
  • IHV and partner support, including NEC's commitment to create an optimized PowerVR driver for Unreal and MPath's commitment to develop plug-in MPath support for the Unreal technology.
  • Grass-roots support, as evidenced by the 100+ Unreal fan sites on the Internet, for example http://www.planetunreal.com/ and http://www.unrealuniverse.com/.

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