beginning ios3d unreal - gbv · beginning ios 3d unreal games development : [3d game development...
TRANSCRIPT
Beginning iOS 3D Unreal
Games Development
Robert Chin/
'
Apress*
Contents
Contents at a Glance iii
About the Author ix
About the Technical Reviewers x
Acknowledgments xi
Introduction xii
Chapter 1: UDK Overview 1
Getting Started 1
Unreal Editor Overview 1
The Generic Browser 2
Actor Classes Tab 3
The Content Browser and UDK Assets 5
Importing New Content 6
Searching for UDK Assets 6
UDK Texture Assets 8
UDK Material Assets 9
UDK Mesh Assets 10
UDK Particle System Assets 13
UDK Sound Cue Assets 14
I0S Specific UDK Information 16
Saving Data on an iOS Device 16
Textures on an iOS Device 17
Player Input Controls on an iOS Device 17
PC to iOS Setup 22
iOS Requirements 22
Apple Developer's License 23
Provisioning 23
Running the UDK Game on the iOS Device 23
Configuring Custom Game Types 27
Summary 28
M Chapter 2: UnrealScript Overview 29
Kismet or UnrealScript? 29
Overview of UnrealScript 32
Iv
UnrealScript Comments 34
UnrealScript Variables 34
Operators 38
Code Execution Row Control Statements 39
Class Declarations 41
Functions 41
States 42
Debug Messages 43
Creating and Compiling UnrealScript 43
Hands-On Example: Selecting an Object with Touch .45
Creating the Game Type 46
Creating the Player Controller 47
Settting up the Game Type Configuration 49
Running the Game Type 50
Summary 51
Chapter 3: Player Controllers, Pawns, and Weapons 53
Player Controller and Pawn Overview 53
Hands-on Example: Making your pawn visible with a 3D skeletal mesh character 55
Creating the Default First-Person View 55
Adding a Skeletal Mesh to represent your pawn 58
UDK Camera Overview 59
Hands-on Example: Changing the view of your pawn 60
UDK Weapons Overview 63
Inventory Manager 63
Weapon Types 63
Weapon States 64
Weapon Selection 66
Weapon Firing 67
Hands-on Example: Adding a weapon to your pawn 68
Creating the Weapon 68
Creating the Bullets for the Weapon 70
Creating the Custom Inventory Manager 71
Adding to the Player Controller 74
Hands-On Example: Adding a weapon to your first-person view 76
Creating the Weapon 76
Creating the Projectile for the Weapon 77
Creating the Pawn 77
Creating the Player Controller 78
Creating a New Game Type 80
Setting up your new Game Type 80
Running the new Game Type 81
Summary 82
Chapter 4: UDK Collisions 83
Collision Meshes 83
Collision Objects 86
KActor and KAsset Overview 86
Hands-on Example: Creating a KActor and applying a force to it 88
Hands-On Example: Creating a KAsset and applying a force to it 100
Physics Constraints 110
Physics Constraints Overview 110
Hands-On Example: Creating physics constraints with the Unreal Editor 113
Collisions 121
Collision Overview 121
Hands-on Example: Creating a Collision Object and Putting It in a Level 123
Hands-On Example: Making an exploding wall of blocks 132
Summary 135
HChapter 5:UDK Bots 137
UDK Bot Overview 137
Bot Related Classes '. 138
Key Bot Related Functions •138
Possession 139
Path Finding 140
Path Nodes 140
Navigation Mesh 141
Hands-On Example: Creating a bot and having it follow you using Path Nodes 142
Hands-On Example: Creating a bot and having it follow you using a Navigation Mesh 154
Hands-On Example: Moving a Bot to a point in the world specified by the Player 161
Hands-On Example: Equipping your bot with a weapon and Taking Damage 166
Summary 174
IIChapter 6: Environment: Sounds, Kismet, and HUD 175
UDK Sound Cues 175
Overview of the UDK Sound Cue Editor -.175
Adding Sound Cues Using the Unreal Editor •' 180
Adding Sound Cues Dynamically using UnrealScript 181
Adding Sound Cues Using Kismet 181
Hands-On Example: Adding Sound Cues to a Weapon 182
Kismet, Matinee and Moving Objects 185
Hands-On Example: Using Kismet to create a Moving Platform 185
Hands-on Example: Using Kismet to create Locked Gates 193
UDK Heads Up Display 199
Overview of the HUD 200
Hands-on Example: Adding a Basic Heads Up Display 201
Summary 204
HChapter 7: Sample Game and GamePlay 205
Gameplay Overview 205
Game Difficulty 205
Game Balance 206
Basic GamePlay 207
Hands-On Example: Creating a Basic Game Framework 207
Summary 225
Chapter 8:3D Math Review 227
Vectors 227
Vector Magnitude 229
Rotator to Vector Conversion 230
Normalizing Vectors 231
Vector Addition 231
Scalar Multiplication 232
Unit Circle 234
Right Triangle 235
Dot Product 236
Cross Product 237
Cover Nodes 238
Cover Node Overview 238
Hands-on Example: Cover Nodes 239
In-Depth Example Explanations 257
Third-Person Camera Positioning 257
Deriving a Direction Vectorfor Kicking an Object 258
Summary 260
H Chapter 9: Physics Game Framework 261
Physics Game Framework Overview 261
General Overview 262
Specific Overview 262
Hands-on Example: A Basic Physics Game 263
Creating the Game Type 263
Creating the Player Controller 265
Creating the Game Ball 272
Creating the HUD 274
Creating the RigidBodyCubeEx Object 276
Configuring the Game Type 277
Creating the Level 277
Running the Game 280
Summary 281
Chapter 10: First-Person Shooter Game Framework 283
Game Framework Overview , 283
General Overview 284
Specific Overview 284
Hands-On Example: First-Person Shooter Game Framework 285
Creating the Game Type 285
Creating the Player-Related Classes 287
Creating the Enemy Bot Related Classes 295
Creating the HUD 310
Creating the Bonus 312
Configuring the Game Type 313
Creating the Level 314
Running the Game 316
Summary 318
Chapter 11: Third-Person Shooter/Adventure Game Framework 319
Game Framework Overview 320
General Overview 320
Specific Overview 321
Hands-on Example: Third-Person Shooter/Adventure Game Framework 321
Creating the Game Type 321
Creating the Player Controller 322
Creating the Bot Ally Controller 330
Creating the BotMarker 336
Creating the Enemy Guard Bot Controller 337
Creating Enemy Guard Bot Pawn 342
Creating the Heads Up Display 342
Creating the Power Generator 345
Configuring the Game Type 346
Creating the Level 347
Running the Game 348
Summary '. 350
Chapter 12: Top-Down Shooter/RPG Game Framework 351
Game Framework Overview 352
General Framework Overview 352
Specific Framework Overview 352
Hands-On Example: Creating a Top-Down Shooter / Role-Playing Game Framework 353
Creating the GameType 354
Creating the Player Controller 354
Creating the Player Pawn 359
Creating the Ally Bot Pawn 361
Creating the Enemy Bot Pawn 361
Creating the Character Information Class 362
Creating the Save Marker 363
Creating the Load Marker 364
Creating the HUD ....365
Configuring the Game Type 367
Creating the Level 368
Running the Game 369
Summary 371
Index 373