View source for Getting Started Mapping From Quake Wiki ← Getting Started Mapping You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Administrators. You can view and copy the source of this page. =Putting it together= Now that we have definitions out of the way, let's open up Trenchbroom and actually build a simple level. ==Some setup== [[File:map_tutorial_1.png|thumb|Trenchbroom]] When you first open Trenchbroom, you should have something much like the image on the right, but before we dive into some editing, there's a couple of things to set up. First, you likely won't see the little [[Quakeguy]] models, or any of the entity models, in the lower right section of your Trenchbroom in the Entity Browser. To fix this, go to '''View>Preferences...''' and set your Quake Path to where your Quake is installed (ex: C:\Quake\). Once you've set this, Trenchbroom will remember it for all future maps you make. Other settings here include OpenGL display settings, and Mouse sensitivity and axis inverting if you wish to modify these. Next, we need to let Trenchbroom know which textures we want to use for this map. Go to '''Edit>Map Properties...''' and in the lower half of this dialog, you'll see the empty list of Texture Wads. Click on the '''+''' button, and browse to the '''Q.wad''' you downloaded earlier. You will be asked how you would like to store the path, leave the default 'Absolute' selected, and click Ok. Close out of the Map Properties dialog, and click on the '''Face tab''' in the upper right of Trenchbroom. You should now see all the Quake textures loaded in the lower right browser. Every time you create a new map, you will need to follow these steps to choose which texture wad you'd like to use. ==Painting the town== [[File:map_tutorial_2.png|thumb|Applying Textures]] Now we're ready to begin our map. Our brush is currently a sad, untextured grey. Let's fix that by putting a texture on it. '''Select the brush''' in the 3D view by '''Left Clicking''' on it, it will shade red when selected, and show some 'laser lines' extending from it's bounds. Now, let's put a texture on it. We're going to make this a floor, so find a good floor texture in the browser and '''Left Click''' on it to '''apply''' it. I'm using ''city4_2''. You can '''select a single face''' of a brush by '''Shift-Left Clicking''' a face, and '''select multiple faces''' by '''Ctrl-Shift-Left Clicking'''. In the upper right of Trenchbroom, we can also choose to offset, scale, or rotate this texture on our brush. Textures dimensions Quake must be [http://en.wikipedia.org/wiki/Power_of_two powers of 2], often 64x64 or 128x128, so you will generally shift them by 1, 2, 4, 8, 16, 32, or 64 units. Scale is a multiplier, so to make textures 'smaller' you will use numbers smaller than 1, such as 0.5 for half-scale. Scale can also be use to mirror a texture, so a scale of -1 will flip it. Rotation is in degrees, 0-360, and negative values are allowed. ==Making some room== [[File:map_tutorial_3.png|thumb|Resizing brushes]] Our floor is a little small, let's make it a bit larger, and also familiarize ourselves with the 3D view a bit. To '''look around''' in the 3D view, '''Right Click and Hold''' in the 3D view while dragging your mouse. To '''pan''' left/right up/down, '''Middle Click and Hold''' in the 3D view. You can also '''orbit''' the camera by pressing '''Alt-Right Click and Hold'''. Now, let's resize our floor brush. To do this, the brush must be selected, so reselect it if it is not or you only have some of it's faces selected. Now, '''Hold down Shift''' to enter face dragging mode and display the brush's dimensions. You will notice as you mouse over different parts of your brush, their edges will turn white, while continuing to '''Hold down Shift''', you may '''Left Click and Drag''' a white face. Let's make our floor 256x256 wide and 16 units tall. You will notice that when resizing, you are constrained to 16 unit increments. You can change the '''Grid Size''' with '''Ctrl--''' and '''Ctrl-+''', which will decrease or increase the grid by a power of 2, though it is recommended to stick to 16 units for this tutorial. ==A new brush== [[File:map_tutorial_4.png|thumb|Creating new brushes]] Until now, we've only worked with the brush that Trenchbroom created for us, but now we want to make a wall, so we need a new brush. First, let's '''Deselect''' our floor by either '''clicking in the black void''', or by pressing '''Ctrl-Shift-A'''. Now, to make a new brush, '''Left Click and Drag''' in the 3D view. While continuing to '''Hold Left Click''', you effect the newly created brush's height by '''Scrolling the MouseWheel'''. Don't be concerned if the brush is not perfectly sized or positioned, you can always edit it. To '''Move a Brush''', all you need to do is '''Left Click and Drag''' a selected brush. Let's position our wall at one of the edges of our floor, and size it 256x16x128 as shown in the picture to the right. Make sure the edges are perfectly aligned as we put brushes together. Also, give it a nice wall texture, I am using ''city2_8''. ==Even more brushes== [[File:map_tutorial_5.png|thumb|Duplication]] Let's keep going with constructing our room. To make another wall, let's '''Duplicate''' the wall we already have by selecting it, and pressing '''Ctrl-D'''. Now position it on the opposite edge of our floor. Let's also make a ceiling, so select the floor, and duplicate it as well. Now, we need our brush to '''Move Vertically''', and for that, we '''Hold down Alt''' whilst moving our brush, notice your cursor changes to 2 arrows pointing up and down. Let's give this a nice ceiling texture, I am using ''city5_3''. Although not pictured to the right, let's close up our room now. '''Select Multiple Brushes''' by '''Ctrl-Left Clicking''' them, and select both of our walls. Duplicate them, and let's rotate them. You can quickly '''Rotate 90° Horizontally''' by pressing '''Ctrl-Left Arrow''' and '''Ctrl-Right Arrow'''. You can also '''Rotate 90° Vertically''' by pressing '''Ctrl-Up Arrow''' and '''Ctrl-Down Arrow'''. You can also '''Flip Horizontally''' with '''Ctrl-F''' and '''Flip Vertically''' with '''Ctrl-Alt-F'''. Again, make sure all of our brushes have their edges aligned so our room is sealed. For our simple room this is not the end of the world if they are not, but it is good habit to get started with and will be required on larger, more complex maps to ensure they do not [[leak]]. Leaks occur when your brushes don't form a complete seal around the playable world, and prevent the compiling process Vis from running. ==Add some functionality== [[File:map_tutorial_6.png|thumb|Our first entity]] Now that we have a closed room, let's do some work so we can use it. The first thing to do is make a place for the player to start the level at. Go to the Entity tab in Trenchbroom, and scroll down a little in the Entity Browser on the bottom right of the editor. Find the model of Quakeguy with the words '''info_player_start''' under it. '''Left Click and Drag''' it into your 3D view to place it. info_player_start is an entity which does not need any more set up than that to work! You do not always have to use the entity browser to make entities. You could also have done this by '''Right Clicking''' in the 3D view, and navigating the menu '''Create Point Entity>Info>Player_start'''. ==Lights and Properties== [[File:map_tutorial_7.png|thumb|Setting Properties]] Technically we could compile and try our map now, but let's add some more stuff to our map first. How about a light? Either drag the entity '''Light''' from the entity browser, or in the '''Right Click Menu''' select '''Create Point Entity>Light>Light'''. Move this somewhere in the center of our room. Now, we do actually need to modify this entity for it to work right. With the light still selected and the Entity tab open, notice in the upper right corner of Trenchbroom our entity's keys and values. Trenchbroom, as of this writing, only puts some very basic keys and values into entities, so for now you will want to refer to the [[Entity_guide|Entity Guide]] for all the keys and values you may need on your entities. We want to set the brightness of our light. To do this, we need a '''New Key'''. Click on the '''+ button''' next to our list of keys, and rename our newly created key "light" and set it's value to "200". ==Triggers!== [[File:map_tutorial_8.png|thumb|Making a Trigger]] Let's also make sure everyone knows how great Quake is by telling them. To do this, we're going to make a brush entity that when the player walks into it, it displays a message. First, we need to make a brush as normal. This is going to be a trigger, a type of brush entity that is invisible and nonsolid, so it doesn't matter what texture is on our brush, but general convention is to use the texture ''trigger''. Now, '''Right Click''' with our brush still selected, and go to '''Create Brush Entity>Trigger>Multiple'''. You should now see the text 'trigger_multiple' over our brush. Add some keys to this entity, "Message" with the value "Quake is Great!", and "wait" with the value "5". Message is the text we will display to the player, wait is how long the game should wait between triggering again so we aren't spamming our message constantly. Return to Getting Started Mapping. Retrieved from "http://quakewiki.org/wiki/Getting_Started_Mapping"