Wednesday, 14 December 2011

UDK vs CryEngine 3 SDK: Creating a new level

Today, I'll look at how to create a level. Fairly straightforward, but what's interesting here is knowing what makes a level and what are the options available.

Why should I care?
Because, depending on the type of game the engine/level editor has been built for, some assumptions are made about the components of a level. And if we ever want to make something different, those assumptions may get in the way. We must know them to be able to circumvent them (if needed).


In UDK
When you open the Unreal Editor, you get this:


A default scene with a floor, a box, a player start (spawn point), a sky light, a skydome and a Lightmass Importance volume (for lightmap baking). Basically, stuff you're likely to want when you create a level (except the box, probably). However, none of this is mandatory and you can get rid of all of it if you like.

Note that this is a new unsaved level that gets created from a template. When you click the "create new level" button, you're presented with the following window:


You've got the choice of several basic templates, which are basically the same thing with a different skydome and different lighting settings. It possible to create your own templates as well. As the name suggest, a blank map is empty. Or maybe not exactly.

Every single level in Unreal contains two objects: the WorldInfo and a default PhysicsVolume.

The WorldInfo is an object that, well, stores information about the world.


There a few noteworthy things to see here:

  • Many rendering options are set on a per-level basis.
  • A sub-object called MapInfo stores additional, game-related data.
  • The vertical limitations to the level are so that objects below a certain altitude will die (well those who can die), and object above a certain limit won't be able to go further up.
  • The game mode played in this map can override the default for the game (that's Unreal Tournament legacy stuff).
The default physics volume is a low-priority one that is supposed to dictate the global physics behaviour of the map. It can be deleted.

When you save your map, it creates one .udk file. As long as the file is in the Content folder of your game, it will be picked up by the Content Browser

In CryEngine 3 SDK
When you open the Sandbox editor, you get this:


In other words, nothing. If you want to do anything, you have to open an existing level or create a new one. So, to test stuff out, you'll have to have a test level set up as you can't just open the editor and mess around with it. This is serious business here!

When I create a new level, we're presented with the following window:


Err, terrain? What if I don't want one? Oh well, let's just click OK:


And water now? A very pretty looking water though. So yes, as the vast majority of Crysis's levels happened outside and on an island, the level editor assumes that you'll need a terrain, an ocean and a sky. That sounds perfect, but a bit annoying if I wanted to make a game set in space. As far as I'm aware, you can't get rid of neither the terrain nor the ocean. Tweaking the Time of Day settings should allow you to get the background and ambient lighting settings you need but that's one fiddling we could have avoided.

When you created the level, the editor automatically created a number of files in the Levels folder of the game data folder, the most important one being the .cry file, which is the main level file.

Conclusion
Well, even though this isn't a competition, I'd say that Unreal wins this round hands down. Having a level ready on editor start-up enables very quick functionality/idea tests, tough none of the mandatory elements imply a specific type of level. On the other hand, having things like rendering settings adjustable per-level is a  potential threat to consistency across the game. There's nothing notably good about the Sandbox Editor on that topic, except if you intend to do outdoorsy levels.

Next article will be about the tools available for whiteboxing.

3 comments:

  1. I actually liked the two heading ....

    In UDK....when u open
    [image]with some thing
    &&
    in Sandbox ....when u open
    [image]with nothing but black option with some debugging text on the right side.

    by the way.... after all those tutorial(thanks for all those) i have read in ur portfolio site ... this is the one which makes me laugh....

    :)

    ReplyDelete
  2. Hi,

    Just wanted to add that there is no problem doing space-levels in Cryengine.
    Look at: http://www.crydev.net/viewtopic.php?f=291&t=82737
    (in the tutorial there is an option to disable terrain, not sure why it is not there in CE3 free sdk, but you can hide the terrain with r_terrain 0)

    And that loading a level takes a long time in Cryengine, so I guess thats why it starts blank, so you can load your project instead of waiting for a blank empty one before opening the project you want to work on.

    And third, about lighting in CE3, with the TOD file you adjust light settings that affect indoor environments as well, but the light is not baked but have to be adjusted by hand with negative lights or cubemaps. So outdoor lighting is consistent with the TOD file, but indoor is not.

    ReplyDelete
    Replies
    1. I never said it was impossible to make a space level. I'm just saying that it requires extra steps that wouldn't be necessary if an empty level was really empty. But thanks for linking to that tutorial, it is useful.

      Delete

Note: only a member of this blog may post a comment.