Thursday, September 27, 2012

Cookbook: Getting started with UDK

I'll try to post here some tips on UDK and its usage ups and downs, as I'm encountering them.

First steps:

  1. Essentially you need your UDK install, grab it from udk.com
  2. As a programmer, I recommend using some (your favorite) version control system, for your created/edited files. I'm currently using free TortoiseHg (which is Mercurial). Its big advantage is the ability to work without any server/internet connection (basically it's its own server)
  3. use your favorite IDE for files editing (notepad++ is good). I'm currently using VisualStudio2010 due to its fast search options and scrollbar highlighting (with free Productivity Power Tools extension). I have also Visual Assist installed to speed up file lookup, snippets, etc. In Visual Studio it is advised to create a custom solution and you can add some post build step to be able to compile unreal script ("call %UDK_INSTALL_DIR%\Binaries\Win64\UDK.exe make")
  4. grab UnCodeX, which is basically a tree overview of all classes and dependencies in unrealscript of your UDK install (your changes included). This is strongly recommended!
  5. you can find help on internet, remember, if you have encountered some problem somebody before you probably had had the same problem and already solved it! Best sources are:

Tips:

  • try as much as possible to create new files and not edit existing ones (you'll avoid problems with moving to newer UDK releases), this applies to unrealscript as well as data packages! Keep clear dir structure (you need to be able to find it)!
    • my example:
%UDK_INSTALL_DIR%
   Development
      Src
         BallPuzzler - all my code
   UDKGame
      Config - all custom and edited configs are here
      Content
         UDK_Project - all my data packages
      Flash - scaleform menu
      Movies - BINK videos
      Splash - custom splash screen
    • create your custom configs (for example for input):
      • usage in code:

   1:  class BallPuzzlerInput extends PlayerInput within BallPuzzlerController
   2:   config(BallPuzzlerInput);
      • you actually create default config (e.g. DefaultMyCoolConfig.ini), engine will on startup create UDK version of it (i.e. UDKMyCoolConfig.ini)
      • still in code you refer to it without prefix, i.e. config(MyCoolConfig)
    • there is unfortunately one exception that I haven't found a way to avoid: UDKGame\Config\DefaultEngine.ini, here you'll have to put your edits to make things work...
      • let's take a look at what needs to be edited in DefaultEngine.ini:

   1:  [URL]
   2:  Map=SimpleMainMenu.udk  //name of your default map (used by Unreal FrontEnd when cooking game!)
   3:  LocalMap=SimpleMainMenu.udk
   4:   
   5:  [Engine.ScriptPackages]
   6:  +NonNativePackages=BallPuzzler //add your script package to be recognized by engine
   7:   
   8:  [UnrealEd.EditorEngine]
   9:  +EditPackages=BallPuzzler //add your script package to be recognized by editor



      • some additional non-essential changes:

   1:  [Engine.Engine]
   2:  GameViewportClientClassName=BallPuzzler.BallPuzzlerViewportClient //overrides default class that sends messages to loading screen!
   3:   
   4:  [FullScreenMovie]
   5:  +StartupMovies=Logo //currently NOT working (UDK July 2012), I had to replace original startup video (Logo.bik in Movies dir)
   6:  LoadMapMovies=Transition //specify your transition movie (.bik in Movies dir)






No comments:

Post a Comment