In my professional work, I’ve gotten used to all the freedom that comes from having access to Unreal source code. Meanwhile, at home, I’ve been using the UDK and have been extremely frustrated by how much my development speed drops because I don’t have access to my usual workplace tools.
The biggest slowdown culprit has been the Unreal Frontend. Ostensibly a tool to give you easy access to every step of the Unreal workflow, it can slow development to a crawl because it forces you to cook data every time you update your script. It does this by hardcoding the “-seekfreeloading” flag when it launches UDK.exe. With this flag enabled, UDK.exe will only load seek-free packages which only get updated when cooked. Considering that cooking can take minutes depending on your machine and any script you edit needs to be cooked if you want to see its effect in-game, the “-seekfreeloading” flag can slow the typical edit->compile->run cycle to a crawl.
At work, I can modify and rebuild Unreal’s tools to match my (and my team’s) preferred workflow with no problem. Using the stock binaries that come with the UDK, I have to be a bit trickier. In this case, it’s not too hard because all the Unreal Frontend does is marshall parameters for executing programs on the commandline. This means that I can replicate almost anything that the Unreal Fronted does by using batch files.
In the case of launching the game without “-seekfreeloading”, it’s as easy as this:
You can call this from the root folder of the UDK with “MyGame_Entry” being replaced by a map of your choice. When launched this way, UDK.exe will use the compiled script and editor content packages directly instead of loading pre-cooked data. The key here, of course, is the lack of “-seekfreeloading” as a parameter for UDK.exe.
Since this is for speeding up my UnrealScript editing workflow, I like to make sure I build my scripts before launching my game:
Binaries\Win32\UDK.com make Binaries\Win32\UDK.exe MyGame_Entry
Calling UDK.com instead of UDK.exe allows the output from the make command to stay in the same console window instead of launching in a new window. This is great when you want to see errors that come up from mistakes in your UnrealScript.
With a little bit of work, I can make a batch file that will launch UDK.exe only if scripts were successfully built and pause to let me examine the error report otherwise:
set start_map=BPG_Entry Binaries\Win32\UDK.com make IF errorlevel 1 GOTO :ERROR_EXIT Binaries\Win32\UDK.exe %start_map% GOTO :GOOD_EXIT :ERROR_EXIT pause exit /b %ERRORLEVEL% :GOOD_EXIT
Now, my workflow can be edit script -> save -> double-click LaunchUDKGame.bat -> check my changes -> repeat. Much faster without the cooking step. This means I can spend more of my time making my game instead of just waiting for the UDK to run.