Unreal Development Kit Game Design Cookbook
上QQ阅读APP看书,第一时间看更新

Conventions

In this book, in an effort to provide a pleasant user experience, we've established a layout style that distinguishes between different kinds of information in UDK. This section provides examples of these styles and explains their meaning.

There is not a lot of code in this book, only a bare minimum of short excerpts required to set up some assets. Where lines of code occur in the text body, they are shown as follows: "The DefaultProperties entry HUDType=class'MyGame.MyHud' sets the class from which the game calls its HUD instructions."

A block of code is set as follows:

class MyGame extends UDKGame
        config(MyGame);

DefaultProperties
{
    HUDType=class'MyGame.MyHUD'
//    bUseClassicHUD=true 
// This code sample cannot use the line above as it does not extend from UTGame but from UDKGame...

}

Lines that bear upon the current discussion are shown in bold within the block of code. In this book you will not need to make up any code, and the samples can be typed as they appear in the text, without having to worry about line breaks.

Any command-line input or output is written as follows:

C:\UDK\~\UDKGame\Binaries\Win64>UDKGame.exe gfximport Yourfolder\Mouse.SWF Yourfolder\Button.SWF

If you want to learn more about writing UnrealScript, I highly recommend the new Packt book by Rachel Cordone, Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide. available at http://www.packtpub.com/unreal-development-kit-game-programming-with-unrealscript-beginners-guide/book/.

Besides the fact that you can check it out, the above website link demonstrates how this book presents URLs that you can follow for more information. Paths to your computer's folders are shown as: C:\UDK\~\UDKGame\Content\Maps\. File names mentioned in isolation are shown in italics, like this: UTGame.UC.

Likewise, where you are required to enter text in a text field, or assign a name to a file or an asset this will be shown as follows: "For the current value, type Ending. Here you would type Ending. Frequently you are asked to search out an asset already given a unique name; its name is also shown in italics, like this: Packt.Texture.SkyDome_Night.

New terms and important words are shown in bold, as are words that help you navigate menus, dialog boxes, and editor-defined properties of objects. Here's an example: "Go to View | World Properties and expand the Game Type section and click on MyGame in the roll-out." Here you can distinguish the menu commands from the user entry MyGame.

UDK features many special nodes or modules which we've chosen to highlight amongst the many menu entries, properties and text fields that go along with them. These include event, action and variable types in Kismet, module types in Cascade, node types in the Material Editor, and node types in the AnimTree Editor. Except where they occur in menu navigation instructions, which are always in bold, nodes are shown as follows:" Level Loaded event". Connectors belonging to a node are shown in bold: "Loaded and Visible".

Compare the text formatting against the next image, where it is marked with floating arrows (as is typical with many images in the book). The action is at the top, and its property is in the dialog underneath:

"The Play Sound action in Kismet has a property called Play Sound, which is set to None by default."

Conventions

The next image, similarly, shows Material Editor nodes. The nodes are at the top and the properties are below.

"In the Panner node's Properties, set the Speed X value to 2.0 to make the texture that it feeds slide sideways."

Conventions

The next example deals with the Cascade Editor, used for creating particle effects:

"Highlight the Color Over Life module to expose its properties. Currently this module is disabled."

Conventions

Key strokes and mouse clicks are shown as follows: "Hold Ctrl + LMB and drag". Sometimes a contraction like Alt-drag is used to shorten some instructions, such as "hold Alt + LMB and drag". In some cases we say to press LMB (for Left Mouse Button) and RMB (for Right Mouse Button), but quite often we simply say click or right-click.

Wherever possible, we've included icons within the text to help direct you to tools in the UI. These are formatted as in the example: "The icon [ Conventions ] is for Use Selected Object in the Content Browser". Quite often I've referred to this particular icon as the Assign icon, to save space. Also to save space I have often called a Connector a 'nub', as others do.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.