Sunday, February 27, 2011

UDK Programming Tutorial - Basic Gametype and Level



Setting up the Map


Requirements:

UDK 2-2011 is installed and set up correctly.

A basic UDK level, or a copy of an existing level to edit.

Some Unreal Script code.


Stage 4: Compilation!


NOTE: The Unreal Game and Unreal Editor must be closed before compiling, or you will get errors about being unable to save Game.u


Open Unreal Frontend (this is buried under Start-> All Programs-> Unreal Development Kit-> UDK-2011-02-> Tools-> Unreal Frontend).

Press the Script Button, and select Compile Scripts from the drop-down (if this doesn't work try a Full recompile, if it still doesn't work, then you need to edit your config files).



A successful compilation looks kind-of like this (above).

If you get red text then that's an error and you've done something wrong, (check your semi-colons) the error is located on the line number supplied in the error.

If you get yellow text then the compiler's giving you a warning and you're probably better off fixing it (again, the line number is supplied by frontend).


Now it's time to open the editor and take a look at what our code has done!

The editor is located in Start-> All Programs-> Unreal Development Kit-> UDK-2011-02-> UDK Editor.

Open/make a basic level (more info on this later) or download this demo level and save it to

C:\UDK\UDK-2011-02\UDKGame\Content\Maps


Now we need to edit the PIE (Play In Editor) game type, so we'll go to view->world properties.

Expand the World Info tab, and locate Game Types for PIE, select the drop-down and select Gametype (the name of your game's GameType file).



Close the World Properties and then right-click on the map (make sure you are within the level-box, or you will die), and select Play From Here.


Voilà! One working game!

At a later point I will post how to get the game to run through the UDK game, and not just the engine, but I have to re-figure that part out :S.


Next Tutorial: Making a slightly better camera.

No comments:

Post a Comment