Reader small image

You're reading from  Unreal Development Kit Beginner's Guide

Product typeBook
Published inAug 2011
PublisherPackt
ISBN-139781849690522
Edition1st Edition
Tools
Right arrow
Author (1)
Richard Moore
Richard Moore
author image
Richard Moore

Richard graduated in 2009 studying video games design at Hull School of Art and Design but has expanded his creativity by working as a web designer/illustrator in Hull, East Yorkshire and London for 3 years. He is very passionate about 3D modelling, level design, concept drawing, web development and graphical illustrations. He has worked on a number of different projects with clients from different industry backgrounds. A collection of stylish web templates, logos, brochures, business cards, web banners, animated graphics and email marketing campaigns. Through the clouds lies my passion in video game development. Complete creation of 3D art including modeling, texturing and high resolution rendering. He also dazzles in game documentation and conceptual drawings. He will always take any opportunity to meet as many different people from the game development community as possible and as a result, I have attended the Games Grads career fair for one consecutive year, participated in the Game Republic 2009 student showcase in Sheffield and Platform 2010, Hulls ¬1st Digital and Gaming event where I won the award for best character and a cheque for £100. In March 2011 he was involved in Platform Expo's 2011, Hull's second video game expo where I entered in this year's video game showcase and won 2nd prize for my outstanding contribution to video game design and is now involved in Platform Expo's 2012. In July 2011 he volunteered as a marketing assistant/designer for an on-line based video games magazine assisting the editor-in-chief in designing templates for latest issues of the magazine, writing reviews on latest video game titles and talking to clients about potential advertising coverage within our magazine and online. In his spare time now focuses on more freelance design and development work with up and coming companies. As a result, Richard has had some impressive feedback from fellow designers and clients and is very much interested in starting up his very own design company focusing on all the things that he loves. He has the ideas, the drive and determination to put it together. 2011 is the start of something big for this video game designer.
Read more about Richard Moore

Right arrow

Chapter 7. Adding Gameplay Elements into your Map

This section explains how to get all of the basic gameplay elements into your map. In this example, we'll set up a Deathmatch map, which is the easiest type to create. Capture the Flag, Warfare maps, and vehicle variants, which have a couple of additional node types that you need to add, are discussed at the end of this tutorial.

In this chapter, we will cover:

  • Naming your map

  • Adding a player start

  • Play in editor

  • Placing pickups

  • Placing weapons

  • Placing jump pads

  • Adding other game objective types

  • Adding path nodes

So let's get on with it…

Let's start by looking into gameplay elements.

Adding gameplay elements


When starting a level, no matter what the game-type is, it is always best to shell out the gameplay before you start on any visual work. With BSP and very few static meshes, quickly flush out the entire level to a point where you can play the level and see how much fun it is. If it's not fun before visual work, it's not going to be fun after, and since visual work in UDK can take the bulk of the level work time, you want to be sure that you get to your level as much fun as possible before you start. So you don't waste a lot of time re-meshing and lighting to accommodate game-play changes.

Time for action – naming your map


First off, naming conventions are important. They're the primary way that UDK knows what type of map you're playing.

  1. Start your map name with one of the following tags, depending on the intended gameplay type:

    • Deathmatch, Team Deathmatch, Duel (DM)

    • Capture the Flag (CTF)

    • Vehicle Capture the Flag (VCTF)

    • Warfare (WAR)

    So, if you want to make a Warfare map called FirePits , you'd name it WAR-FirePits.udk.

  2. For this tutorial, we'll create a Deathmatch map. Start by creating a new map or opening an existing map you've created. Save it as DM-GameplayTest01.udk in the following folder:

    C:\UDK\UDK-VersionRelease\UDKGame\Content\Maps

    This is the official place where Unreal likes to look for maps, so get into the habit of saving everything there. If you put the map somewhere else, especially if you're streaming or loading separate packages, Unreal won't be able to find it. If you want to make a subfolder, that's fine too.

  3. Build-up your map so that it has at least three rooms...

Time for action – adding a player start


  1. If you've been following the chapters so far, you may have noticed a lot of errors that look like the following:

  2. Unreal supports up to 16 players in Deathmatch, so we need to have at least 16 PlayerStart actors. Normally, your level will be big enough so that placing all of these spawn points will make sense and you may place some more, but it probably seems kind of silly right now. That's ok; we still want to place 16. You can place a new PlayerStart node by right-clicking on the ground, selecting Add Actor, and clicking on Add PlayerStart:

  3. If you've already placed one, you can clone it around by alt+click+dragging on one of the move tool's handles. Do this until you have 16 nodes spread all over your level. Try to make sure they're at least 128 units apart:

    Tip

    Remember you can middle+click+drag in a 2D view to use the measure tool.

  4. Also, see the little blue wireframe arrow pointing out of the nodes. That's the direction in which the player will be facing...

Time for action – play in editor


  1. We'll cover this in more detail in another tutorial, but you can test your map by clicking the Play in Editor button (the little black joystick at the top-right corner of the window):

  2. If your map shows up black, or just generally isn't doing what you expect, you may have to hit Build All and try again:

  3. Once you're up and running properly, press the Tab key to bring up the console, and type addbots 1. A bot should appear somewhere in your level:

    You can, of course, add as many bots as you want with that command, up to 16.

What just happened?

So, we have added our player starts to the map and have now tested them within the editor using the in-game command Tab. You may or may not know, but the bots are all over the place at the moment; we will come to that later by adding something called bot pathing , which will pinpoint where the bots are allowed or not allowed to go in your map. For now, let's have a look at placing pickups in our level.

Time for action – placing pickups


So you can run around your level and shoot stuff, but without weapon pickups, health, and armor, the level feels kind of dull. We can get at all of the weapon pickups and a lot of other good stuff through the Actor Class browser.

  1. Open up your generic browser and click on the tab labeled Actor Classes at the top of the window:

  2. Finding pickups in the list is hard unless you know where to look. They're all hidden under the Navigation point. That's because, from a code standpoint, they're all based-off of the code that knows how to create paths. Open up Navigation point, then Pickup Factory, then UTPickupFactory. You'll start to see some of the things you're looking for, such as a Weapon Pickup Factory. You can open up subfolders to get at other object types, such as Ammo, Armor, Health, Powerups, and Weapon Lockers:

  3. Select one of the bold items (say, UTPickupFactory_HealthVial):

  4. Now right-click in the world, and then click on Add UTPickupFactory_HealthVial Here...

Time for action – placing weapons


Most pickups, such as the health vial, just require you to place them in the world and you're good to go. But for weapon pickups and weapon lockers, you need to specify what kind of weapons will be available.

  1. Place an UTWeaponPickupFactory in your level in the same way you placed the health vial. Make sure that the object is selected in the world, then click on View | Actor Properties or double-click on the object, or press F4.

  2. Every object, even static meshes and brushes, have properties that you can set. There are lots of categories in the properties window, and most of those categories, such as Display, Movement, and Object are used by every type of actor. In most cases, you only care about the properties for the specific type of actor you're working on. In this case, we want to set the weapon pickup factory properties, so click on the UTWeaponPickupFactory category. It may already be open.

  3. You can now pick what type of weapon you want by clicking on the...

Time for action – placing jump pads


Jump pads launch the player into the air, ultimately to come down at a specified location.

  1. To create a jump pad, you need to place a jump pad base and then tell it where the player is supposed to land. But first, modify your level so that one of the rooms has a ledge or a platform that is big enough to run around on.

  2. Placing a jump pad is the same as placing any pickup. It's in the Actor Classes browser under Navigation point. It's called UTJumpPad. Create one next to your ledge, about 128 units out.

  3. Also place a navigation point on top of the ledge; the jump pad will eventually lead here:

  4. We specify the jump pad's target in its properties window, similar to how we specified what weapon a weapon pickup will spawn.

    Open up the jump pad's properties window, and open up the UTJumpPad category. Aha! There's a box labeled Jump Target and a few other controls, which I'll let you explore on your own, once the whole thing is hooked up.

    What we need to do is plug our...

Time for action – adding other game object types


Now that you know how to create pickups and jump pads, you should be able to figure out any other gameplay object type. I'll give a rough overview of some of the common ones here, without going into full detail. This section is meant to be more of a reference guide, but if you want to add some of these object types to your level now, it'll be a good practice.

Let us begin with the teleporter.

A teleporter is something that transfers matter from one point to another, more or less instantaneously.

  1. To place a teleporter pad, select Navigation | Teleporter | UTTeleporter and place one in your level. You'll also need an exit point for your teleporter. You can create another UTTeleporter, which will spawn with a base in the level.

  2. Under the Teleporter properties, there's a field called URL. This is the Tag of the teleporter destination. Select the teleport destination, bring up its properties, and open up object. In the Tag field, give it a name like...

Bot pathing


I've done bot pathing before for my maps, and after watching some tutorial videos, it's not really that hard. I'll try to explain it as simply as possible.

Time for action – adding path nodes


Bots are stupid. All they know to do is point at the nearest target and shoot, or run for the nearest pickup that's in sight. They're great at getting to things they can see. But how do they get from room to room? If their health is low, how do they find their way to a health pickup? Well, Unreal generates a path network that connects everything in your level. That way, if a bot has no one to shoot, or is low on health, they know how to run through hallways to different rooms where there are goodies for them to pick up.

  1. To start, click on the Build Paths button at the top of the screen:

  2. Paths are automatically generated, connecting every player start in the level. You can view your path network by clicking on the black arrow that's at the top of a viewport and clicking on Paths, or you can just press the hotkey P.

  3. Any player starts that are in view of each other should now have a line connecting them.

  4. But what do we do in a situation where PlayerStart nodes...

Summary


We learned a lot in this chapter about:

  • Naming the different types of map convention

  • Adding a player start to our map

  • Placing pickups in our map

  • Placing weapons in our map

  • Placing jump pads in our map

  • Adding other game objective types to our map

  • Placing path nodes in our map

So that's how you add gameplay elements such as player starts, special pickups, weapons, jump pads, and other gameplay elements such as teleporter and vehicles. We also have learnt how to use path nodes to create a path where the bots will navigate around our map. In the next chapter, we will be looking at basic Kismet scripting.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unreal Development Kit Beginner's Guide
Published in: Aug 2011Publisher: PacktISBN-13: 9781849690522
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Richard Moore

Richard graduated in 2009 studying video games design at Hull School of Art and Design but has expanded his creativity by working as a web designer/illustrator in Hull, East Yorkshire and London for 3 years. He is very passionate about 3D modelling, level design, concept drawing, web development and graphical illustrations. He has worked on a number of different projects with clients from different industry backgrounds. A collection of stylish web templates, logos, brochures, business cards, web banners, animated graphics and email marketing campaigns. Through the clouds lies my passion in video game development. Complete creation of 3D art including modeling, texturing and high resolution rendering. He also dazzles in game documentation and conceptual drawings. He will always take any opportunity to meet as many different people from the game development community as possible and as a result, I have attended the Games Grads career fair for one consecutive year, participated in the Game Republic 2009 student showcase in Sheffield and Platform 2010, Hulls ¬1st Digital and Gaming event where I won the award for best character and a cheque for £100. In March 2011 he was involved in Platform Expo's 2011, Hull's second video game expo where I entered in this year's video game showcase and won 2nd prize for my outstanding contribution to video game design and is now involved in Platform Expo's 2012. In July 2011 he volunteered as a marketing assistant/designer for an on-line based video games magazine assisting the editor-in-chief in designing templates for latest issues of the magazine, writing reviews on latest video game titles and talking to clients about potential advertising coverage within our magazine and online. In his spare time now focuses on more freelance design and development work with up and coming companies. As a result, Richard has had some impressive feedback from fellow designers and clients and is very much interested in starting up his very own design company focusing on all the things that he loves. He has the ideas, the drive and determination to put it together. 2011 is the start of something big for this video game designer.
Read more about Richard Moore