Utilizing the layers for multiple developer collaboration

A common question that is usually asked about the CryENGINE is how does one developer work on the same level as another at the same time. The answer is—Layers. In this recipe, we will show you how you may be able to utilize the layer system for not only your own organization, but to set up external layers for other developers to work on in parallel.

Getting ready

  1. Have My_Level open inside of Sandbox (after completing either the Terrain sculpting or Generating a procedural terrain recipe).
  2. Review the Navigating a level with the Sandbox Camera to get familiar with the Perspective View.
  3. Review the Using the Rollup Bar recipe.
  4. Have the Rollup Bar open and ready.
  5. Review the Placing the objects in the world (place at least two objects) recipe.

How to do it...

  1. For this recipe, we will assume that you have your own repository for your project or some means to send your work to others in your team.
  2. First, start by placing down two objects on the map. For the sake of the recipe, we shall refer to them as Box1 and Box2. After you've placed both boxes, open the Rollup Bar and bring up the Layers tab.
  3. Create a new layer by clicking the New Layer button (paper with a + symbol).
  4. A New Layer dialog box will appear. Give it the following parameters:
    • Name = ActionBubble_01
    • Visible = True
    • External = True
    • Frozen = False
    • Export To Game = True
  5. Now select Box1 and open the Objects tab within the Rollup Bar.
  6. From here you will see in the main rollup of this object with values such as—Name, Helper Size, MTL, and Minimal Spec. But also in this rollup you will see a button for layers (it should be labelled as Main). Clicking on that button will show you a list of all other available layers.
  7. Clicking again on another layer that is not highlighted will move this object to that layer (do this now by clicking on ActionBubble_01).
  8. Now save your level by clicking—File | Save.

    Note

    There is important information about saving your level in that recipe. Please make a note to review it.

Now in your build folder, go to the following location: -... GameLevelsMy_Level. From here you will notice a new folder called Layers. Inside that folder, you will see ActionBubble_01.lyr.

This layer shall be the layer that your other developers will work on. In order for them to be able to do so, you must first commit My_Level.cry and the Layers folder to your repository (it is easiest to commit the entire folder).

After doing so, you may now have your other developer make changes to that layer by moving Box1 to another location. Then have them save the map.

Have them commit only the ActionBubble_01.lyr to the repository. Once you have retrieved it from the updated repository, you will notice that Box1 will have moved after you have re-opened My_Level.cry in the Editor with the latest layer.

How it works...

External layers are the key to this whole process. Once a .cry file has been saved to reference an external layer, it will access the data inside of those layers upon loading the level in Sandbox.

It is good practice to assign a Map owner who will take care of the .cry file. As this is the master file, only one person should be in charge of maintaining it by creating new layers if necessary.

There's more...

Here is a list of limitations of what external layers cannot hold.

External layer limitations

Even though any entity/object you place in your level can be placed into external layers, it is important to note that there are some items that cannot be placed inside of these layers. Here is a list of the common items that are solely owned by the .cry file:

  • Terrain
    • Heightmap
    • Unit Size
    • Max Terrain Height
    • Holes
    • Textures
  • Vegetation
  • Environment Settings (unless forced through Game Logic)
    • Ocean Height
  • Time of Day Settings (unless forced through Game Logic)
  • Baked AI Markup (The owner of the .cry file must regenerate AI if new markup is created on external layers)
  • Minimap Markers

See also

  • The Saving your level recipe
  • The Exporting to an engine recipe
  • The Essential game objects recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.107.229