Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Tài liệu 3D Game Programming All in One- P21 doc
Nội dung xem thử
Mô tả chi tiết
You will end up with a textured
bridge (see Figure 17.17) in your
3D view at the upper left.
11. For safety's sake, save your work,
by Choosing File, Save As File.
In the Save As Type combo box,
select Quake map file (*.map).
12. Choose Torque,
Export220map/Build High
Detail DIF.
This will export the map again,
overwriting what you just
saved (so you can see that you
could have gotten away with not doing the initial Save
As operation), and then compile the map to DIF format
and gather all of the used textures into the used textures
directory. Contrast this all-in-one operation with the
discrete steps we executed earlier when we did the
quick start with the default room. This is certainly more
convenient!
13. Copy the textures and the bridge.map file to C:\aEmagaCh6\control\data\structures.
There is already a bridge with that name in that directory
that is being used in the mission file. Go ahead and replace
that file, as well as the textures, if necessary.
14. Launch Emaga6 and when you spawn in, turn to your
right and run to the edge of the wadi. You should see your
bridge spanning the wadi ahead of you, as depicted in Figure 17.18.
Building Bridges 507
Figure 17.14 A new cube.
Figure 17.15 The
Texture item in the
Object pop-up menu.
Team LRN
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Building a House
The bridge was nice and certainly useful. But one must admit that it's fairly simple. Of
course, if you need a bridge you will probably make something more ornate.
In this section we will go a little bit farther and make something more complex: a house
with a door opening and a window and internal lighting.
1. Launch QuArK and open the Torque Map Editor. Delete the default room and save
the empty file as C:\QuArK 6.3\torque\tmpquark\maps\house.map.
2. Select the Cube brush and create a cube that measures 260 units in width by 360
units in length by 256 units in height. You can see the dimensions by hovering the
cursor over the cube and looking in the lower-left corner of the Map Editor window.
3. Create a smaller brush in front
of the first cube, as shown in
Figure 17.19. This will be used
to create the front stairs.
4. Select the new brush in the lowerleft window, and then right-click
to get the pop-up menu and
choose Stair. You will see your
brush change into a staircase, as
shown in Figure 17.20.
5. Select the large brush, right-click
to get the pop-up menu, and
choose Make Hollow. Your large
508 Chapter 17 ■ Making Structures
Figure 17.16 The Texture Browser.
Figure 17.17 The finished bridge.
Figure 17.18 The bridge in Emaga6.
Team LRN
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
brush will now be a hollowed
room and will look like the one
in Figure 17.21.
6. Create another brush and place
it in the wall above the stairs, as
shown in Figure 17.22. This
brush will be used for an operation called a subtraction.
7. Ensure that the new brush is
selected, right-click it, and
choose Brush Subtraction. You
will see a bunch of new lines
appear in the wall in which the
brush is embedded.
8. Select the Subtraction brush and
press the Delete key to make it
go away. You will see a hole in
the wall now, as depicted in Figure 17.23. This is the doorway.
9. Using the texture assignment
technique you learned in the
earlier sections of this chapter,
set the house's texture to concrete and the stairs' texture to
256_BrickA.
Now you have to add a special
brush of a type known as an
entity. Entities are constructs
used when making maps that
give special instructions to the
map compiler about things it
needs to do or understand when
it goes about building the DIF
version of the map for use in
Torque.
You are going to create an entity
called a portal. Portals tell
Torque how to go about lighting
the interior of the object when
Building a House 509
Figure 17.19 The Stair brush.
Figure 17.20 The stairs.
Figure 17.21 The hollowed room.
Team LRN
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.