Book Image

Unreal Development Kit Game Design Cookbook

By : Thomas Mooney
Book Image

Unreal Development Kit Game Design Cookbook

By: Thomas Mooney

Overview of this book

UDK is a free, world class game editing tool and being so powerful it can be daunting to learn. This guide offers an excellent set of targeted recipes to help game artists get up to speed with game designing in UDK.Unreal Development Kit Game Design Cookbook contains everything you need to jumpstart your game design efforts. The lessons are aimed squarely at the artist's field of production, with recipes on asset handling, creating content within the editor, animation and visual scripting to get the content working in gameplay.Unreal Game Development Kit Game Design Cookbook exposes how real-time environments are built using UDK tools. Key features are examined ñ assets, animation, light, materials, game controls, user interface, special effects, and game interactivity - with the view of making UDK technically accessible so users can transcend technique and focus on their creative design process. The book has well prepared recipes for level designers and artists of all levels. It covers core design tools and processes in the editor, particularly setting up characters, UI approaches, configuration and scripting gameplay. It is a technical guide that allows game artists to go beyond just creating assets, and it includes creative, extensive demonstrations that extend on mere functionality.
Table of Contents (17 chapters)
Unreal Development Kit Game Design Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and managing packages


Let's consider how packages work and how to manage them both inside UDK and through Windows. All the assets you use are saved in packages. They have the suffix .UPK and are distinct from .UDK files, which are maps or levels. Both of these are external files stored in folders within the UDK installation, typically in C:/UDK/~/UDKGame/Content/ where ~ is the version number you have installed, such as UDK-2011-08. When using package files keep in mind that they can be transferred between users sharing a project or between computers independently of maps or scenes you may have been working on. However, maps that depend on certain packages will not load completely if those packages have been removed or renamed. An important thing to watch for is pasting packages to a different computer which have the same name as existing packages but have different content.

We'll be creating a particle asset in this recipe, in a very basic way, not at all to focus on the particle procedure, but the way to deal with the asset itself and the package the asset is created in. The intention is to get used to package naming, renaming, saving, and moving assets around.

Getting ready

This book assumes you have installed UDK using its default folder option. If you already have UDK open, close it down.

How to do it...

  1. In Windows Explorer, within the folder C:/UDK/~/UDKGame/Content/ create a Yourname sub-folder named after yourself or your project. It is highly advisable to put everything you personally create in here, rather than in default folders, because then you can readily transport content from computer to computer or even from one version of UDK to another (assuming you are rolling forward). Since UDK is updated frequently, this can save a lot of noodling around with files. If you work in a team, a folder naming convention may be imposed which you should follow.

  2. Restart UDK. If you then look in the Packages list in the Content Browser you should now see your folder showing there. If you didn't reset, and create a package, you will still be able to save the package into the newly named subfolder but it won't display in the Packages list until you restart. Instead it will display at the bottom of the list, under New Packages in a temporary package called Untitled_1 (and the number will increment if you start a new scene).

  3. A package typically includes some content, and there are two ways to get started. The first is to press the New button at the bottom of the Packages List. This floats a menu for creating content. The other way is to right-click in the gray space of the Content Browser's assets panel and choose New... according to the type of object you want to create.

  4. If you highlight an existing folder in the packages list, such as the one with your name that you created just before, the new object will follow suit and save to that folder. Anyway, you can choose from the floating menu whatever folder you like. You should also give the object a Group and a name. Setting a Group is optional, but really helps a lot. It allows you to organize content that is similar together inside a package. You could put all your meshes in a group called Mesh and all your textures in a group called Texture for example.

  5. Based on the information above, create a New Particle System in your folder, something like this: Yourname.Cascade.DemoPS1 where Yourname is the folder name, Cascade is the group name, and DemoPS1 is the unique asset name. Notice when you create a particle system by using the right-click approach it automatically assigns a Factory preset called Particle System in the creation menu, and after you hit Okay then Cascade opens. Cascade is UDK's particle asset editor. If you use the New icon, you have to set the Factory type yourself from a roll down list, shown above. You should then see a thumbnail in the Content Browser, as shown in the next illustration. Notice the asterisk * next to both the package name and the asset name. This indicates the need to save changes, and is visible in the following screenshot:

  6. This new particle system is nothing special. We'll edit particles later. The goal here is just to have a new asset to play with. For now, set an icon thumbnail for it in the Cascade editor menu by going to View | Save Cam Position. This ensures that the thumbnail of the asset displayed in the browser doesn't remain empty and instead looks more like the particles in the Cascade editor, which is important if you want to browse through a large number of asset thumbnails. To set a thumbnail you can also use the icon which looks like a black and white camera [ ]. When ready, close the Cascade editor then right-click on your package folder and press Save, which will save all of its content.
  7. If you get a warning saying Cannot Save via the Browser then your new particle system must be in the Untitled_0 package. You should redefine it by pointing it to your own package Yourname in the folder C:\UDK\~\UDKGame\Content\Yourname. To do so, right-click on the asset and choose Move or Rename... and then just enter a specific folder; it would be good to use the folder name you created at the start for your custom assets. If you are starting out with UDK, and have never saved a package of your own already you'll be prompted for a .UPK file save location in Explorer, and should use the folder we've pointed to: C:\UDK\~\UDKGame\Content\Yourname.

  8. You can set as many packages in your folder as you want, or put all your assets in one package. If a single package grows over 300 MB or so, you may hit a performance ceiling for it and get a warning when you save.

    Tip

    A good way to keep package size down is to use simpler Lightmaps. To do so, avoid raising the StaticMesh and BSP sampling resolution too high. StaticMesh resolution is higher when its value raised, BSP resolution is higher when its value is lowered. This is further discussed in Chapter 8, Then There Was Light!

  9. If you now delete your folder in Explorer or a .UPK inside of your folder, the Content Browser will no longer include what you deleted next time you run UDK. So, if you save your scene or map, and reload it after deleting content, you will get missing content errors. This is something to be very careful of. Deleting a folder containing a package with an unused, empty particle system won't matter, but deleting a folder with packages full of textures used by model assets in different packages could keep you up fretting long into the night. It is a good idea to periodically copy out and rename backups of your key packages.

  10. If, in the Browser, you want to modify the content which ships with UDK, you shouldn't directly edit it but instead right-click on it and choose Create a Copy... then set the new package name to one of your own, located in your C:\UDK\~\UDKGame\Content\Yourname subfolder, and probably rename the asset too. You can then modify the copy as you wish.

  11. Finally, if you have content from another graphics software you want to import, like a texture or a model, click on the Import button at the bottom of the packages list or right-click in the assets Browser panel and choose Import there. It is the top entry and you may have to scroll up the list to see it.