Monday, 12 December 2011

UDK vs CryEngine 3 SDK: Getting started

So, let's do this in chronological order. One of the first things we want to do when starting a project (well, after the design phase) is to set up the SDK so we can actually start to make something. I'm going to take a look at what's needed to get the SDK installed and running.

My M.O. will be as follows (and will be the same for every article in the series): I'll start by explaining why I'm looking at what I'm looking at, then I'll tell about what I know (UDK) before looking at how it's done in the CryEngine.

Why should I care?
Installing a SDK and preparing your project sounds like a mundane task. However, as people usually don't start a new project every other week, it's the kind of thing you forget how to do by the time you have to do it again. So the more straightforward it is, the less painful that is. Also, less steps to get up and running means less steps to upgrade to a new version of the SDK, if needed.

You can download the UDK there. The file is an installer that will contain the binaries, the (UnrealScript) source code and a fair amount of sample assets (including several levels). The nice thing is that you can download older versions if you need to roll back to a previous one (e.g. if the new version introduces inconvenient bugs).

The installer... installs UDK in the folder of your choice, as well as any redistributable required. There's one thing that annoys me a bit. A UDK install is treated as a normal application, meaning each new install leaves a trace in the list of installed programs. Not a big issue, but it doesn't sound clean to me.

Once UDK installed, you can run the sample game, which is a stripped down version of UT3, or run the editor and do stuff. In order to set up your own game, after you've created your own classes, you need to modify several lines in (at least) a couple ini files.

All your game data must go into the UDKGame folder. UDK is packaged in such a way that you are supposed to have one project per installation.

In CryEngine 3 SDK
The download page only contains the latest version of the SDK, split into two files: One with the SDK and its sample content, and one with the source data for some of the sample content (mainly characters and vehicles). The SDK is just a zip file, with everything ready to go. That makes it real quick to set up a project.

Once unzipped, you can either launch the default game (which is bot-less FPS in a forest map), or launch the editor. Note that the default game doesn't have any frontend, and that's on purpose. Which means you've got no reference content to investigate how to make a frontend in CryEngine (UPDATE: That has been "fixed" in the 3.3.9 version of the SDK). Nice. But there's worse. In order to do anything with the CryEngine 3 SDK, you HAVE to log in with your Crymod account anytime you want to launch the editor or the game. Meaning that you can't do anything with it without a connection to the Internet. Yes, "everyone" is connected to Internet these days, but the one time you aren't, or the one time their sever fails, you'll be proper pissed, as there's no obvious and sensible reason for that authentication to be there.

To set up your own game, you just have to change one .cfg file, and make it point to the DLL that contains your game code. The data goes by default in a folder called Game, but you can easily change that to point to any  folder you want, so keeping several versions of that file can allow you to quickly switch between projects with one install of the SDK.

Past that mandatory login rubbish, I think the CryEngine has the most straightforward setup process. However it is likely that this ease of use may come at the cost of some flexibility further down the line. Only time will tell.

Next article will be about the creation of a new level.