CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [336]
The big change took place in 1992 when a small company called id Software created a new game called Wolfenstein 3D (see Figure 19-68). They launched an entirely new genre of games, now called first-person shooters (FPSs), in which the player looks out into a 3-D world, interacting with walls, doors, and other items, and shoots whatever bad guys the game provides.
Figure 19-68 Wolfenstein 3D
Wolfenstein 3D shook the PC gaming world to its foundations. That this innovative format came from an upstart little company made Wolfenstein 3D and id Software into overnight sensations. Even though their game was demanding on hardware, they gambled that enough people could run it to make it a success. The gamble paid off for John Carmack and John Romero, the creators of id Software, making them the fathers of 3-D gaming.
Early 3-D games used fixed 3-D images called sprites to create the 3-D world. A sprite is nothing more than a bitmapped graphic such as a BMP file. These early first-person shooters would calculate the position of an object from the player’s perspective and place a sprite to represent the object. Any single object had only a fixed number of sprites—if you walked around an object, you noticed an obvious jerk as the game replaced the current sprite with a new one to represent the new position. Figure 19-69 shows different sprites for the same bad guy in Wolfenstein 3D. Sprites weren’t pretty, but they worked without seriously taxing the 486s and early Pentiums of the time.
Figure 19-69 Each figure had a limited number of sprites.
The second generation of 3-D began to replace sprites with true 3-D objects, which are drastically more complex than sprites. A true 3-D object is composed of a group of points called vertices. Each vertex has a defined X, Y, and Z position in a 3-D world. Figure 19-70 shows the vertices for an airplane in a 3-D world.
Figure 19-70 Vertices for a 3-D airplane
The computer must track all of the vertices of all of the objects in the 3-D world, including the ones you cannot currently see. Keep in mind that objects may be motionless in the 3-D world (a wall, for example), may have animation (such as a door opening and closing), or may be moving (like bad monsters trying to spray you with evil alien goo). This calculation process is called transformation and, as you might imagine, is extremely taxing to most CPUs. Intel’s SIMD and AMD’s 3DNow! processor extensions were expressly designed to perform transformations.
Once the CPU has determined the positions of all vertices, the system begins to fill in the 3-D object. The process begins by drawing lines (the 3-D term is edges) between vertices to build the 3-D object into many triangles. Why triangles? Well, mainly by consensus of game developers. Any shape works, but triangles make the most sense from a mathematical standpoint. I could go into more depth here, but that would require talking about trigonometry, and I’m gambling you’d rather not read that detailed a description! All 3-D games use triangles to connect vertices. The 3-D process then groups triangles into various shapes called polygons. Figure 19-71 shows the same model as Figure 19-70, now displaying all of the connected vertices to create a large number of polygons.
Figure 19-71 Connected vertices forming polygons on a 3-D airplane
Originally, the CPU handled these calculations to create triangles, but now special 3-D video cards do the job, greatly speeding up the process.
The last step in second-generation games was texturing. Every 3-D game stores a number of image files called textures. The program wraps textures around an object to give it a surface. Textures work well to provide dramatic detail without using a lot of triangles. A single object may take one texture or many textures, applied to single triangles or groups of triangles (polygons). Figure 19-72 shows the finished airplane.
Figure 19-72 3-D airplane with textures added
True 3-D objects, more often referred to as rendered, immediately created the