Time for action – Configuring UnCodeX
UnCodeX needs to know where our source code is before we can search through it. Let's set up UnCodeX now.
Open UnCodeX. It will automatically detect that this is the first time we've run it and ask if we want to edit the settings. Choose Yes.
The UnCodeX window will pop up with the Source Paths tab open. This is where we will add our source code directory. Click on Add.
Navigate to our UDK installation's
Development\Src
folder and select it.The directory will show up in the window below the Add button. That's all we need to do here, so click on Ok. UnCodeX will ask if we want to scan the directory. Click on Yes.
That's all we need to do! UnCodeX will scan and organize all of the files in the
Src
folder and display them.
What just happened?
UnCodeX is now configured and ready for us to use. Let's take a look at what it's showing us.
The left window shows each package and the classes in them, which is basically like a folder in Windows. The middle window shows the class tree, which organizes all of the files to show their relationship to each other. The right window shows the contents of the file we have selected. You'll notice that some words are highlighted. Clicking on them takes you to the file or function with that name. This is convenient for finding out how things interact with each other in UnrealScipt.
Changing projects in UnCodeX is easy. Simply go to Tree, click on Settings, and Add or Remove directories as needed. Later, go to Tree and click on Rebuild and Analyse or use the keyboard shortcut Ctrl + B. It will rebuild the package and class tree the same as our initial setup.
We will be using ConTEXT and UnCodeX in this book, but there are other programs we could use when working with UnrealScript. Let's briefly discuss them, and then start setting up our own project!
nFringe
nFringe is an IDE (Integrated Development Environment) that allows programmers to work with UnrealScript in Microsoft Visual Studio 2005 or 2008. It includes a debugger that allows us to stop the game while it is running to see what is happening in script. There is a free version available for non-commercial work, but if you'd like to use it for commercial projects there is a licensing fee. If you have Visual Studio and would like to try it out, head over to http://pixelminegames.com and get the latest version!
WOTgreal
WOTgreal was originally created by Dean Harmon for the Unreal Engine based Wheel of Time game. The program works with all Unreal Engine games though, and is like ConTEXT and UnCodeX combined. There is a small licensing fee for the standard or professional version of the program. Head over to http://www.wotgreal.com to check it out!
For the most part the choice of program to use when working with UnrealScript comes down to personal taste. The Unreal Editor itself will detect changes in the source code and ask if you want to compile when it opens. Some programmers use Notepad to write and a DOS prompt to compile, using the same make
command that ConTEXT uses. Try out the various programs to see what works best for you.