Building Bridges


So, you've had a taste of how you can use QuArK. Now let's dive in and muck about with it a bit and actually create something. Because this is our first structure from scratch, we'll start out with something not too complex—a stone bridge.

  1. Launch QuArK and open the Torque Map Editor, as you learned in the last section.

  2. Delete the default room.

    Note

    QuArK and other similar programs that are based on constructive solid geometry use something called brushes to create their objects. A brush in this sense is like a building block. You select a particular brush (also called a polyhedron in QuArK) for a particular need and apply it to your model.

  3. Select the Cube brush by clicking its icon, as shown in Figure 17.11.

    click to expand
    Figure 17.11: The Cube brush.

    After clicking the Cube brush icon, you will see a cube appear in your model, as shown by Figure 17.12. Notice that it has a small solid square in the center, called the handle, and small "empty" squares on each edge, called face handles. You use the face handles for resizing the brush and the center handle for moving the brush. Simply click the mouse cursor in the handle, hold down the button, and then drag the brush around to resize or move it as needed.

    click to expand
    Figure 17.12: A new cube.

    Also, you should note the texture that the brush sports—a striped texture. This is the default texture for new brushes; the texture's name is Construction. You will assign your own textures later.

  4. Using the handles, resize and move the brush until you have something resembling Figure 17.13. This is the roadbed of the bridge.

    click to expand
    Figure 17.13: Reshaped cube.

  5. Create two more Cube brushes and place them as shown in Figure 17.14. These will be the bridge pylons.

    click to expand
    Figure 17.14: A new cube.

    Next, you are going to add some texture to the bridge.

  6. Click inside the Roadbed brush to select it.

  7. Right-click anywhere in the view to get the pop-up menu. As long as you have a brush selected, you will get a pop-up menu containing functions that will be applied to that brush, even though you haven't actually right-clicked on the selected brush.

  8. Choose Texture, as shown in Figure 17.15.

    click to expand
    Figure 17.15: The Texture item in the Object pop-up menu.

    The Texture Browser will appear, as shown in Figure 17.16. Locate the Book folder and select the 256_BrickA texture. You can see any of the textures in the preview pane at the right by selecting the texture in the browser frame on the left.

    click to expand
    Figure 17.16: The Texture Browser.

  9. Double-click the 256_BrickA texture, and the Texture Browser window will go away. Your texture will be applied to the selected brush.

  10. Add the 256_BrickA texture to all of the other brushes in the bridge model.

    You will end up with a textured bridge (see Figure 17.17) in your 3D view at the upper left.

    click to expand
    Figure 17.17: The finished bridge.

  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.

click to expand
Figure 17.18: The bridge in Emaga6.




3D Game Programming All in One
3D Game Programming All in One (Course Technology PTR Game Development Series)
ISBN: 159200136X
EAN: 2147483647
Year: 2006
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net