Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide

Create games beyond your imagination with the Unreal Development Kit with this book and ebook

Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide

Beginner's Guide
Rachel Cordone

Create games beyond your imagination with the Unreal Development Kit with this book and ebook
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Want this title & more? Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.
+ Collection
Free Sample

Book Details

ISBN 139781849691925
Paperback466 pages

About This Book

  • Dive into game programming with UnrealScript by creating a working example game.
  • Learn how the Unreal Development Kit is organized and how to quickly set up your own projects.
  • Recognize and fix crashes and other errors that come up during a game's development.
  • A practical beginner's guide with fresh, fun writing that keeps you engaged as you learn game programming with UnrealScript

Who This Book Is For

This book is written for beginners to UnrealScript, whether this is your first experience with programming or you're coming into it from another language and would like to learn how UnrealScript uses concepts you're already familiar with. If you would like to make games with the Unreal Development Kit, this book is for you.

Table of Contents

Chapter 1: Project Setup and Test Environments
System requirements
Time for action – Installing the UDK
Directory overview
Using external programs to code
Time for action – Installing ConTEXT
Time for action – Configuring ConTEXT
Time for action – Installing UnCo
Time for action – Configuring UnCodeX
Setting up a project
Time for action – Setting up AwesomeGame
Compiling and testing
Time for action – Compiling and testing AwesomeActor
Summary
Chapter 2: Storing and Manipulating Data
Variables and arrays
Time for action – Using booleans
Time for action – Using integers
Time for action – Using floats
Time for action – Using strings
Time for action – Using enums
Time for action – Using arrays
Time for action – Using dynamic arrays
Time for action – Using structs
Time for action – Using vectors
Time for action – Using rotators
Variable properties
Time for action – Using the default properties block
Time for action – Editable variables
Time for action – Creating config variables
Common operators
Time for action – Math!
Time for action – Using modulo
Time for action – Comparisons
Time for action – Using logical operators
Time for action – Concatenation
Flow control
Time for action – Using if/else
Time for action – Using the for statement
Time for action – Something
Time for action – Using switches
Summary
Chapter 3: Understanding the Class Tree
What is a class?
Time for action – All classes are created equally
Inheritance
Time for action – Examining inheritance
Time for action – Making a custom weapon
Time for action – Experiments with inheritance
Function overriding
Time for action – Creating a custom GameInfo and PlayerController
Time for action – Experiments with function overriding
Actors as variables
Time for action – Experiments with Actors as variables
Casting
Time for action – Casting Actor variables
Time for action – A practical example of casting for our game
Summary
Chapter 4: Making Custom Classes
Creating a class
Time for action – Creating the weapon branch
Class modifiers
Time for action – Using abstract
Time for action – Hidecategories
Actors versus objects
Common UnrealScript classes
Time for action – Expanding AwesomeGame
Time for action – SHOOT NOW!
Time for action – Customizing the Pawn class
Time for action – Expanding the Controller
Time for action – No, my left!
Time for action – Detecting collisions to give our Pawn damage
Time for action – Making the TestEnemies move
Time for action – Using the HUD
Summary
Chapter 5: Using Functions
What's your function?
Creating and calling functions
Time for action – Writing a function
Time for action – Calling custom functions
Time for action – What's your malfunction?
Local versus instance variables
Time for action – Using local variables
Time for action – Using Actors as local variables
Time for action – Modifying the projectile
Function parameters and modifiers
Time for action – Using function parameters
Time for action – Out parameters
Time for action – I'd like to return this please
Time for action – Filthy cheater
Time for action – Using static functions
The super
Using timers
Time for action – Just five more minutes mom
Putting it all together
Time for action – Expanding Awesome Game
Summary
Chapter 6: Using States to Control Behavior
It's a state of mind
Time for action – Writing a state
Time for action – Switching states
Function overriding in states
Time for action – Multiple personalities
Time for action – Calling non-state functions
Time for action – Non-state functions from inside a state
State changes and detection
Time for action – BeginState
Time for action – EndState
Time for action – Using state detection functions
Subclassing states
Time for action – Subclassing the Seeking state
Keywords, labels, and latent functions
Time for action – Using ignores
Time for action – Do we really need to give labels to everything?
Like a boss
Time for action – Reverting our code
Time for action – Creating the abstract base class
Time for action – Creating and spawning the boss
Time for action – I like you, I kill you last
Time for action – Rage mode activate
Summary
Chapter 7: Working with Kismet
Overview of Kismet
Time for action – Using Kismet
Time for action – A more complex Kismet sequence
Time for action – Bug fixing time!
Kismet actions
Time for action – Creating Kismet actions
Time for action – Using variables in Kismet
Time for action – Using handler functions
Time for action – Differentiating Kismet inputs
Kismet conditions
Time for action – What condition my condition was in
Kismet events
Time for action – The cleanup job
Time for action – Our first Kismet event
Time for action – Moving functionality into Kismet
Time for action – Setting the wave size
Time for action – Using SupportedEvents
Time for action – Creating a custom SupportedEvent
Latent actions
Time for action – Creating a latent action
Summary
Chapter 8: Creating Multiplayer Games
The server-client relationship
Testing network code
Time for action – The server batch file
Time for action – The client batch file
Time for action – Unbreaking the player
Time for action – Unbreaking the game
Time for action – Making the GameReplicationInfo
Time for action – RUN AWAY!
Time for action – Bossing around
Replicating function calls
Time for action – Setting up for the client function
Time for action – Using the client function
Time for action – Using a server function
Time for action – Setting up the map
Time for action – Using simulated functions
Time for action – COMBO BREAKER!
Role and authority
Time for action – Examining Role and RemoteRole
Time for action – Respect my authority!
Time for action – Checking the level's NetMode.
Replicating variables
Time for action – Replicating a variable
Time for action – Using ReplicatedEvent
Summary
Chapter 9: Debugging and Optimization
Compiler errors
Time for action – Preparing for brokenness
Time for action – A new script package
Time for action – Breaking the class itself
Time for action – Breaking some more code
Time for action – Misleading errors
Time for action – Captain obvious to the rescue!
Time for action – Setting up a twofer
Time for action – Mal-function
Time for action – Taking care of other function errors.
Time for action – Actor variable errors
Time for action – Other variable errors
Debugging
Time for action – Dealing with Accessed None
Time for action – Fixing an Accessed None
Time for action – Accessed None in function parameters
Time for action – Setting up a scenario
Time for action – Debugging using the log
Optimization
Time for action – Using the profiler
Time for action – Using Clock and UnClock
Summary
Chapter 10: Odds and Ends
Using Components
Time for action – Adding a Component to an Actor
Time for action – Component compiler error
Time for action – Components as variables
Time for action – Creating a toggleable flashlight
DLLBind
Time for action – Using DLLBind
Final Thoughts
Summary

What You Will Learn

  • Set up a UDK project and learn how to compile and test your own code
  • Learn how to extend the UDK's code to add your own functionality
  • Create your own game types, player camera, and HUD
  • Learn how UnrealScript interacts with Kismet and create your own Kismet actions and events
  • Use networking to create and test multiplayer games
  • Optimize your code to fix errors and performance problems
  • Use DLLBind to interact with code outside of the UDK

 

In Detail

Unreal Development Kit is the free edition of Unreal Engine—the largest game engine in existence with hundreds of shipped commercial titles. The Unreal Engine is a very powerful tool for game development but with something so complex it's hard to know where to start.

This book will teach you how to use the UnrealScript language to create your own games with the Unreal Development Kit by using an example game that you can create and play for yourself. It breaks down the UnrealScript language into easy to follow chapters that will quickly bring you up to speed with UnrealScript game programming.

Unreal Development Kit Game Programming with UnrealScript takes you through the UnrealScript language for the Unreal Development Kit. It starts by walking through a project setup and setting up programs to write and browse code. It then takes you through using variables, functions, and custom classes to alter the game's behavior and create our own functionality. The use and creation of Kismet is also covered. Later, using replication to create and test multiplayer games is discussed. The book closes with code optimization and error handling as well as a few of the less common but useful features of UnrealScript.

Authors

Table of Contents

Chapter 1: Project Setup and Test Environments
System requirements
Time for action – Installing the UDK
Directory overview
Using external programs to code
Time for action – Installing ConTEXT
Time for action – Configuring ConTEXT
Time for action – Installing UnCo
Time for action – Configuring UnCodeX
Setting up a project
Time for action – Setting up AwesomeGame
Compiling and testing
Time for action – Compiling and testing AwesomeActor
Summary
Chapter 2: Storing and Manipulating Data
Variables and arrays
Time for action – Using booleans
Time for action – Using integers
Time for action – Using floats
Time for action – Using strings
Time for action – Using enums
Time for action – Using arrays
Time for action – Using dynamic arrays
Time for action – Using structs
Time for action – Using vectors
Time for action – Using rotators
Variable properties
Time for action – Using the default properties block
Time for action – Editable variables
Time for action – Creating config variables
Common operators
Time for action – Math!
Time for action – Using modulo
Time for action – Comparisons
Time for action – Using logical operators
Time for action – Concatenation
Flow control
Time for action – Using if/else
Time for action – Using the for statement
Time for action – Something
Time for action – Using switches
Summary
Chapter 3: Understanding the Class Tree
What is a class?
Time for action – All classes are created equally
Inheritance
Time for action – Examining inheritance
Time for action – Making a custom weapon
Time for action – Experiments with inheritance
Function overriding
Time for action – Creating a custom GameInfo and PlayerController
Time for action – Experiments with function overriding
Actors as variables
Time for action – Experiments with Actors as variables
Casting
Time for action – Casting Actor variables
Time for action – A practical example of casting for our game
Summary
Chapter 4: Making Custom Classes
Creating a class
Time for action – Creating the weapon branch
Class modifiers
Time for action – Using abstract
Time for action – Hidecategories
Actors versus objects
Common UnrealScript classes
Time for action – Expanding AwesomeGame
Time for action – SHOOT NOW!
Time for action – Customizing the Pawn class
Time for action – Expanding the Controller
Time for action – No, my left!
Time for action – Detecting collisions to give our Pawn damage
Time for action – Making the TestEnemies move
Time for action – Using the HUD
Summary
Chapter 5: Using Functions
What's your function?
Creating and calling functions
Time for action – Writing a function
Time for action – Calling custom functions
Time for action – What's your malfunction?
Local versus instance variables
Time for action – Using local variables
Time for action – Using Actors as local variables
Time for action – Modifying the projectile
Function parameters and modifiers
Time for action – Using function parameters
Time for action – Out parameters
Time for action – I'd like to return this please
Time for action – Filthy cheater
Time for action – Using static functions
The super
Using timers
Time for action – Just five more minutes mom
Putting it all together
Time for action – Expanding Awesome Game
Summary
Chapter 6: Using States to Control Behavior
It's a state of mind
Time for action – Writing a state
Time for action – Switching states
Function overriding in states
Time for action – Multiple personalities
Time for action – Calling non-state functions
Time for action – Non-state functions from inside a state
State changes and detection
Time for action – BeginState
Time for action – EndState
Time for action – Using state detection functions
Subclassing states
Time for action – Subclassing the Seeking state
Keywords, labels, and latent functions
Time for action – Using ignores
Time for action – Do we really need to give labels to everything?
Like a boss
Time for action – Reverting our code
Time for action – Creating the abstract base class
Time for action – Creating and spawning the boss
Time for action – I like you, I kill you last
Time for action – Rage mode activate
Summary
Chapter 7: Working with Kismet
Overview of Kismet
Time for action – Using Kismet
Time for action – A more complex Kismet sequence
Time for action – Bug fixing time!
Kismet actions
Time for action – Creating Kismet actions
Time for action – Using variables in Kismet
Time for action – Using handler functions
Time for action – Differentiating Kismet inputs
Kismet conditions
Time for action – What condition my condition was in
Kismet events
Time for action – The cleanup job
Time for action – Our first Kismet event
Time for action – Moving functionality into Kismet
Time for action – Setting the wave size
Time for action – Using SupportedEvents
Time for action – Creating a custom SupportedEvent
Latent actions
Time for action – Creating a latent action
Summary
Chapter 8: Creating Multiplayer Games
The server-client relationship
Testing network code
Time for action – The server batch file
Time for action – The client batch file
Time for action – Unbreaking the player
Time for action – Unbreaking the game
Time for action – Making the GameReplicationInfo
Time for action – RUN AWAY!
Time for action – Bossing around
Replicating function calls
Time for action – Setting up for the client function
Time for action – Using the client function
Time for action – Using a server function
Time for action – Setting up the map
Time for action – Using simulated functions
Time for action – COMBO BREAKER!
Role and authority
Time for action – Examining Role and RemoteRole
Time for action – Respect my authority!
Time for action – Checking the level's NetMode.
Replicating variables
Time for action – Replicating a variable
Time for action – Using ReplicatedEvent
Summary
Chapter 9: Debugging and Optimization
Compiler errors
Time for action – Preparing for brokenness
Time for action – A new script package
Time for action – Breaking the class itself
Time for action – Breaking some more code
Time for action – Misleading errors
Time for action – Captain obvious to the rescue!
Time for action – Setting up a twofer
Time for action – Mal-function
Time for action – Taking care of other function errors.
Time for action – Actor variable errors
Time for action – Other variable errors
Debugging
Time for action – Dealing with Accessed None
Time for action – Fixing an Accessed None
Time for action – Accessed None in function parameters
Time for action – Setting up a scenario
Time for action – Debugging using the log
Optimization
Time for action – Using the profiler
Time for action – Using Clock and UnClock
Summary
Chapter 10: Odds and Ends
Using Components
Time for action – Adding a Component to an Actor
Time for action – Component compiler error
Time for action – Components as variables
Time for action – Creating a toggleable flashlight
DLLBind
Time for action – Using DLLBind
Final Thoughts
Summary

Book Details

ISBN 139781849691925
Paperback466 pages
Read More