Prev: Getting an Editor - Top of tutorial - Next: Your Code and UDK, Details

Getting your code into UDK, the fast way

Technically, general code purpose world-object code that is properly placed and properly compiled, will be immediately available for use in the UDK Editor.
However, most of the "fun" stuff (such as writing a custom HUD, controls, or player customization) requires hooking into the flow of the game. Here's the key point of how to do that.

QuickStart

The good news is, UDK provides a barebones, ready-to-go set of skeleton code files, in [UDK-TOP]\Development\Src\CustomGame\Classes\
  CustomGameInfo.uc
  CustomPawn.uc
  CustomPlayerController.uc
The latter two files are only empty stubs. The first one, is the one that counts. It shows right out of the box how to link in your own custom HUD, PlayerController, and Pawn classes. It is the master key that ensures proper usage of all the other top level game components.
But how to ensure that first one gets used?

GameType = Master Control Program

A GameType is the master key to all the others. However, there are two things a little odd about it.

First of all, you set a Game Type through a GameInfo class, not a GameType class.

Secondly, it turns out that the "Game Type" is set on a per-map basis, at least as far as the editor is concerned. More about that is in the details page.

If you told the UDK installer to set up for your own custom game, then maps will always be loaded with your own code, so you probably dont have to worty about this.
If, on the other hand, you chose the install that has all the sample UT code and maps, then the default game type will probably be UT related, unless you override it. Details on how to do that are in the next section.


Prev: Getting an Editor - Top of tutorial - Next: Your Code and UDK, Details
Written by:Philip Brown
Bolthole Top Search Bolthole.com