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


Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • 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

Book Details

Language : English
Paperback : 466 pages [ 235mm x 191mm ]
Release Date : December 2011
ISBN : 1849691924
ISBN 13 : 9781849691925
Author(s) : Rachel Cordone
Topics and Technologies : All Books, Game Development, Beginner's Guides, Games

Table of Contents

Preface
Chapter 1: Project Setup and Test Environments
Chapter 2: Storing and Manipulating Data
Chapter 3: Understanding the Class Tree
Chapter 4: Making Custom Classes
Chapter 5: Using Functions
Chapter 6: Using States to Control Behavior
Chapter 7: Working with Kismet
Chapter 8: Creating Multiplayer Games
Chapter 9: Debugging and Optimization
Chapter 10: Odds and Ends
Appendix: Pop Quiz Answers
Index
  • Chapter 1: Project Setup and Test Environments
    • System requirements
      • Minimum requirements:
    • Time for action – Installing the UDK
    • Directory overview
      • Binaries
      • Development
      • Engine
      • UDKGame
    • Using external programs to code
      • ConTEXT
    • Time for action – Installing ConTEXT
    • Time for action – Configuring ConTEXT
      • UnCodeX
    • Time for action – Installing UnCodeX
    • Time for action – Configuring UnCodeX
      • nFringe
      • WOTgreal
    • Setting up a project
    • Time for action – Setting up AwesomeGame
    • Compiling and testing
    • Time for action – Compiling and testing AwesomeActor
      • A quick note about comments
    • Summary
    • Chapter 2: Storing and Manipulating Data
      • Variables and arrays
        • Booleans
      • Time for action – Using booleans
        • Integers and floats
      • Time for action – Using integers
      • Time for action – Using floats
        • Strings
      • Time for action – Using strings
        • Enums
      • Time for action – Using enums
        • Arrays
      • Time for action – Using arrays
        • Dynamic arrays
      • Time for action – Using dynamic arrays
        • Structs
      • Time for action – Using structs
        • Vectors
      • Time for action – Using vectors
        • Rotators
      • Time for action – Using rotators
      • Variable properties
        • Default properties
      • Time for action – Using the default properties block
        • Editable variables
      • Time for action – Editable variables
        • Config variables
      • Time for action – Creating config variables
      • Common operators
        • Standard arithmetic
      • Time for action – Math!
        • Modulo
      • Time for action – Using modulo
        • Comparisons
      • Time for action – Comparisons
        • Logical operators
      • Time for action – Using logical operators
        • Concatenation
      • Time for action – Concatenation
        • Variable functions
          • Ints
          • Floats
          • Strings
          • Vectors
          • Rotators
      • Flow control
        • If else
      • Time for action – Using if/else
        • For
      • Time for action – Using the for statement
        • While
      • Time for action – Something
        • Do until
        • Switch
      • Time for action – Using switches
        • Return
        • Goto
      • 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
            • Awesome Game quicky design document
            • Class breakdown
          • Time for action – Creating the weapon branch
          • Class modifiers
            • Placeable
            • Notplaceable
            • Abstract
          • Time for action – Using abstract
            • Native
            • Config
            • Hidecategories
          • Time for action – Hidecategories
            • Hidedropdown
          • Actors versus objects
          • Common UnrealScript classes
            • The GameInfo
          • Time for action – Expanding AwesomeGame
          • Time for action – SHOOT NOW!
          • Time for action – Customizing the Pawn class
            • The Controller
          • Time for action – Expanding the Controller
          • Time for action – No, my left!
            • The Pawn
          • Time for action – Detecting collisions to give our Pawn damage
          • Time for action – Making the TestEnemies move
            • The HUD
          • 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
              • Local Variables
            • Time for action – Using local variables
              • Actors as local variables
            • Time for action – Using Actors as local variables
            • Time for action – Modifying the projectile
            • Function parameters and modifiers
              • Function parameters
            • Time for action – Using function parameters
            • Time for action – Out parameters
              • Return values
            • Time for action – I'd like to return this please
              • Function modifiers
                • Native
                • Const, NoExport, latent, and iterator
                • Event
                • Simulated, server, client, reliable, and unreliable
                • Singular
                • Exec
            • Time for action – Filthy cheater
              • Static
          • 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
                • Creating a state
              • Time for action – Writing a state
                • Switching between states
              • Time for action – Switching states
              • Function overriding in states
                • Red state, blue state, no state, new state?
              • Time for action – Multiple personalities
                • Non-state functions
              • Time for action – Calling non-state functions
              • Time for action – Non-state functions from inside a state
              • State changes and detection
                • BeginState
              • Time for action – BeginState
                • EndState
              • Time for action – EndState
                • State detection
              • Time for action – Using state detection functions
              • Subclassing states
              • Time for action – Subclassing the Seeking state
              • Keywords, labels, and latent functions
                • Keywords
              • Time for action – Using ignores
                • Labels and latent functions
              • Time for action – Do we really need to give labels to everything?
              • Like a boss
                • The cleanup job
              • Time for action – Reverting our code
                • Attack of Schellenberg
              • 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
                  • A simple introduction
                • Time for action – Using Kismet
                  • Building complexity
                • Time for action – A more complex Kismet sequence
                • Time for action – Bug fixing time!
                • Kismet actions
                  • Creating Kismet actions
                • Time for action – Creating Kismet actions
                  • Using variables in Kismet actions
                • Time for action – Using variables in Kismet
                  • Kismet handler functions
                • 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
                  • Creating and triggering a Kismet event
                • Time for action – Our first Kismet event
                  • Giving the event some meaning
                • Time for action – Moving functionality into Kismet
                  • Further expanding our Kismet
                • Time for action – Setting the wave size
                  • Supported events
                • 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
                    • One state to bind us all
                  • Testing network code
                    • Setting up the server
                  • Time for action – The server batch file
                    • Setting up the client
                  • Time for action – The client batch file
                    • Fixing Awesome Game
                  • Time for action – Unbreaking the player
                  • Time for action – Unbreaking the game
                    • The GameReplicationInfo class
                  • Time for action – Making the GameReplicationInfo
                    • Fixing enemy fleeing
                  • Time for action – RUN AWAY!
                  • Time for action – Bossing around
                  • Replicating function calls
                    • Replication function modifiers
                      • Reliable versus Unreliable
                      • Client functions
                  • Time for action – Setting up for the client function
                  • Time for action – Using the client function
                    • Server functions
                • Time for action – Using a server function
                  • Simulated functions
                • Time for action – Setting up the map
                • Time for action – Using simulated functions
                • Time for action – COMBO BREAKER!
                • Role and authority
                  • Role and RemoteRole
                • Time for action – Examining Role and RemoteRole
                • Time for action – Respect my authority!
                  • NetMode
                • Time for action – Checking the level's NetMode.
                • Replicating variables
                  • The replication block
                • Time for action – Replicating a variable
                  • Replication variables
                  • ReplicatedEvent
                • 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
                      • Accessed none
                    • Time for action – Dealing with Accessed None
                    • Time for action – Fixing an Accessed None
                    • Time for action – Accessed None in function parameters
                      • Using the log
                    • Time for action – Setting up a scenario
                    • Time for action – Debugging using the log
                    • Optimization
                      • The profiler
                    • Time for action – Using the profiler
                      • Clock / UnClock
                    • Time for action – Using Clock and UnClock
                      • Best practices
                    • Summary
                    • Chapter 10: Odds and Ends
                      • Using Components
                        • Creating Components
                      • Time for action – Adding a Component to an Actor
                      • Time for action – Component compiler error
                        • Interacting with Components
                      • Time for action – Components as variables
                        • A practical example
                      • Time for action – Creating a toggleable flashlight
                      • DLLBind
                      • Time for action – Using DLLBind
                      • Final Thoughts
                        • Other Resources
                      • Summary
                      • Appendix: Pop Quiz Answers
                        • Chapter 1, Project Setup and Test Environments
                        • Chapter 2, Storing and Manipulating Data
                        • Chapter 3, Understanding the Class Tree
                        • Chapter 4, Making Custom Classes
                        • Chapter 5, Using Functions
                        • Chapter 6, Using States to Control Behavior
                        • Chapter 7, Working with Kismet
                        • Chapter 8, Creating Multiplayer Games
                        • Chapter 9, Debugging and Optimization
                        • Chapter 10, Odds and Ends

                        Rachel Cordone

                        Rachel Cordone is a designer and self-taught UnrealScript programmer who has been working with the Unreal Engine since 1999. She has worked for various game and simulation companies since 2003 including Pipeworks Software and Parsons Brinkerhoff, and has started up her own game company, Stubborn Horse Studios, to make independent games with the Unreal Development Kit. Stubborn Horse's first project, Prometheus, won several awards in Epic Games' Make Something Unreal Contest.
                        Sorry, we don't have any reviews for this title yet.

                        Code Downloads

                        Download the code and support files for this book.


                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                        Errata

                        - 10 submitted: last submission 29 Apr 2013

                        Errata type: Layout | Page number: 105

                        The line in the default properties wraps around when it should be one line:
                        PlayerControllerClassName=class'AwesomeGame.AwesomePlayerController'

                        Errata type: Typo | Page number: 16

                        It should say uc and not .uc in step 7.

                        Errata type: Technical | Page number: 59

                        It should say "If we look in Object.uc, we can see how a vector is defined:"

                        Errata type: Code | Page number: 60

                        On page 60 in the following paragraph:

                        "When we first created our AwesomeActor, we made it invisible in game. Let's change that so we can see what happens. In the default properties of our actor, delete this line: HiddenGame=False"

                        The line of text to be deleted should be "HiddenGame=True".

                        Errata type: Technical | Page number: 257

                        Step 3 should say - "Now what we need to do is stop the actor from automatically turning red when it enters the Seeking state.  If bAttacking is still True we don't want to change the material.  Let's rewrite the Seeking state's BeginState function:"

                        Errata type: Typo | Page number: All appearances of command "log" in 2nd Chapter

                        'log( must be `log( as is in the others chapters. Using 'log( generates an error in the compiler.

                        Errata type: Typo | Page number: 40

                        In the code in Step 2 and subsequent steps, the apostrophe before "log" should be a grave accent.

                        Errata type: Code | Page number: 321

                        In class AwesomeSeqAct_GameComplete,
                        there is a code that look like this:

                        AwesomeGame(GetWorldInfo().Game).ScoreObjective(GetAlocalPlayerController().PlayerReplicationInfo, 1);

                        And if you compile the code you will get an error due to GetALocalPlayerController().

                        To fix the error, you should write GetWorldInfo().GetAlocalPlayerController().
                        The right code should look like below:

                        AwesomeGame(GetWorldInfo().Game).ScoreObjective(GetWorldInfo().GetAlocalPlayerController().PlayerReplicationInfo, 1);

                        Errata type: Code | Page number: 195 | Errata date: 22-4-2013

                         

                        The text for step 6 reads "Finally, let's use the bFrozen variable to stop  
                        the enemy from moving."
                        
                        The variable used in the sample code is named bFreeze, not bFrozen.

                         

                         

                        Errata type: Code| Page number: location 3982 Ch 5 Time For Action - Just Five More Minutes Mom Step 2 | Errata date: 8-4-2013

                        Do not alter SpawnEnemy() function here. Because EnemyDied() is called before Destroy(), MySpawnedEnemy == none will return false and TestEnemy's will not respawn as the author intends. The rest of the code in this section is fine.

                         

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide +    Unreal Development Kit Game Design Cookbook =
                        50% Off
                        the second eBook
                        Price for both: $43.05

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • 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.

                        Approach

                        This is a step-by-step book that builds on your knowledge by adding to an example game over the course of each chapter. Each topic uses example code that can be compiled and tested to show how things work instead of just telling you. Complicated tasks are broken down into easy to follow steps with clear explanations of what each line of code is doing.

                        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.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software