Theory of the Unreal Universe
Rambling on Various Important ConceptsBack to Realism | Up to Your First Level | Continue to Navigation and the UEd Interface
Home | UT2004 Tutorials | Key Terms | Multiplayer DesignThe world of Unreal is a strange one. For starters, you are presented with a giant solid cube, and it is your job to subtract out of it the space in which you will exist and interact with the world. You can add space back, you can change how the walls look, you can even create particle systems to simulate special effects like waterfalls—but before you can add, you must subtract.
To get bots, or computer-controlled players, to navigate your map, you must place a series of navigation points around your map. These act as waypoints to ensure bots that they’re not getting lost. Bots’ minds are fairly simple: they organize objectives based on priority. In a deathmatch map, bots basically wander around collecting things like weapons until they encounter a player, and then they’ll attack the player but only pursue him for a short time before giving up. In other gametypes, bots will usually put the main objective, like capturing or returning the flag, before anything else, but they will deviate from the main path to a certain extent in order to gain a small advantage before diving into the enemy base.
Before building a map, it is essential that you first understand the size requirements: how wide and tall must each room and hallway be? How many players can fit in the map? Is there enough flow? Enough Z-axis? Many of these elements will be discussed later, but for now, be content with one of the more essential tidbits: the player size, jump height, and step height. A player is approximately 88 units tall by 50 units wide (though about 64 units tall when crouched). Therefore, those are the absolute minimum space requirements for a player to fit into a room; however, a minimum of 128uu in each direction is customary, looks and works better, and facilitates botpathing (the way you get bots to know where to go). In addition, players will automatically step up to ledges that are 32 units or less, although there must be at least 12-16 units between each step for the player to stand on. A last important note is the jump height: there are five main types of jumps a player can perform in unreal as well as various combinations. http://wiki.beyondunreal.com/wiki/Movement_Metrics_(UT2003) shows approximate distances for a player’s jump, but keep in mind that these are maximums, and that a player shouldn’t have to try too hard to reach an objective. Also, jump distances can be increased by using the Speed adrenaline combo.
Other useful figures: Players run at about 440uu/s, or 8.8m/s, when not using Speed. A slope of less than 20 degrees has no effect on players; a slope less than 45 degrees slows players down, but is still climbable. Note that translocators can throw their projectiles approximately 1536 units maximum in any direction.
One way to rotate an actor is to open its properties and expand Movement>Rotation. The Yaw field rotates an object from a Top view; the Pitch will rotate the actor up or down; and roll turns the actor from a head-on perspective. The value you enter in any of these fields is not a standard degree measurement, but is instead a number between 0 and 65535. Therefore, 65536 is 360 degrees; you can set up a proportion to find the number you want to enter with this standard formula, where D is the degree rotation out of 360 and X is the desired rotation in uu: D/360=X/65536. To solve, multiply 65536 by D, then divide by 360.
The reason that Unreal Units are based on 65536 (2^11) is based in the coding. The variable type used most often in UnrealScript stores 65535 characters, then loops back to 0 if more must be calculated. Hence, rotational units are out of 65536 and any distance calculated in the Unreal Engine that is more than 65535 will cause an HOM, or Hall of Mirrors effect. (As much as possible, your brushes in UnrealEd should have lengths of powers of two, as this facilitates rendering and diminishes the chance of errors.)
The Hall of Mirrors effect occurs when the engine does not know what to render, so it simply continues to display whatever was in the last frame. This happens most often because of BSP errors, which will be covered in Chapter 5, “Errors.”
If you open up the Unreal Editor, you may notice that a texture browser appears. There are several tabs in the window as well that switch between unfamiliar subjects: Actor, Mesh, Static Mesh, Animations, Sound, Music…. These are your gateway to the assets of Unreal: the things you put in your map, aside from basic brushwork. Unreal comes with a gigantic load of assets, each type of which you’ll learn about later. Custom actors and other packages can be imported as well.
Packages are the name for the files Unreal uses to store data. Rather than storing each Texture by itself, you group many of them into a Package, and load all of them instead of one at a time. This makes for much easier browsing, as most of the textures in a package will have a related theme. All Unreal assets except Music are stored as packages.
Though basic Unreal Architecture is made out of the Add and Subtract brushes, called BSP (Binary Space Partition) or CSG (Constructive Solid Geometry), the most commonly used decorative actor is the Static Mesh. These actors are created in an external program such as 3DS Max or Autodesk Maya, externally textured, and then imported into UEd for use in a map. If you don’t want to go through these steps (which are briefly covered in Chapter 9, “External Program Analysis”) you can simply use the large repository of SMs that come with Unreal 2004.
BSP is what the engine uses to calculate what it should render. Every addition or subtraction brush in your map is considered during a rebuild (discussed later) and the engine then draws up a final plan of triangles and nodes (vertices) which is what it actually renders in 3D mode in UEd and in UT. CSG is what the brushes are actually called; BSP is the method used to understand them. If this seems unclear now, it will become more apparent as you work with UEd and read these tutorials. The difference between CSG and BSP is not really important, and for nearly all mappers, the terms are interchangeable.
The Unreal Engine relies on overdraw, which means it draws everything the player could see if the walls were transparent; it draws what's furthest away first, which is why you don't see through the walls. Because of this procedure, you'll need to use occlusion (discussed later) to make sure the engine isn't rendering more than it should. You rarely need to worry about the amount of CSG triangles the engine is rendering, but as they can sometimes cause HOMs, you'll want to consider what the effect is going to be when you place a complicated brush somewhere. Often complex BSP errors can be absolved simply by moving the brush slightly or by lifting it one or two units off the floor; no one will notice the difference.
Another commonly used visual tool is the emitter. This actor spews out SMs or particles which are used to create effects like steam and waterfalls. They will be covered in chapter 3-d.Back to Realism | Up to Your First Level | Continue to Navigation and the UEd Interface
Home | UT2004 Tutorials | Key Terms | Multiplayer Design