Worldspace

From RPG Creation Kit
Jump to navigation Jump to search

A Worldspace is a data structure and the representation of a world inside the game. Every worldspace is made up of Cells, and every cell belongs to at least one worldspace.

In the Demo, the Exterior World "Virrihael" is a Worldspace made up of cells that represent each one a tile of terrain, that are loaded and streamed together as the player walks by. In other words, a Worldspace is nothing more than the representation of a world, that will be filled with Cells.

You can also view it as a "dimension", imagine to have your worldspace where your game is based, and that you want to have a portal that brings you to a different world, in this case this different world will be a new Worldspace with its own cell, that can be connected to your original world with the use of a Door.

Every Worldspace can be either an Interior Worldspace or an Exterior Worldspace.

Interior Worldspace

An Interior Worldpsace is a Worldspace that is composed of Interior Cells.

You can only load a single Cell inside an Interior Worldspace at time, and they cannot be streamed or divided in tiles.

An Interior worldspace is made to represent something that exists in the Exterior World, but is accessible through a Door, like a City, a Cave or any other dungeon.

For example. in the Demo there is the worldspace "City" that represents the inside of the City, and it contains the City itself and every other interior that exist in it. Also the worldspace "Interior" contains all the Interiors that are present in the Exterior World "Virrihael" (like the Tavern or the Vera's Farmhouse).

Exterior Worldspace

An Exterior Worldspace is a Worldspace that is composed of Exterior Cells.

Every Exterior Cell represents a tile of a bigger world that will be loaded and streamed as the player walks by, in general, you will have to create an Exterior Worldspace to compose a world that is not loadable as a whole, because it's too big, too many NPCs would be in it and so it is better if it is streamed as the player walks by.

For example, in the Demo the worldspace "Virrihael" represent the Exterior World the player is in, It is an Exterior Worldspace because it would have been too big to load at once, there would have been too many NPCs and therefore it is a lot better if the world is split and loaded as the player walks by.

Use Cases, when to have an Exterior or Interior Worldspace

If you've understood the difference between an Interior Worldspace and an Exterior Worldspace (and an Interior Cell and an Exterior Cell) the use cases should be clear, however I want to underline something.

Imagine that you want to create a dungeon, a big underground abandoned mine, at a first glance you would be tempted to use an Interior Worldspace because of what we've said previously, and you are right - but keep in mind the main difference is that an Interior Worldspace cannot be streamed.

So your dungeon would a be single Cell that is loaded as a whole.

For this reason, you may want to split your dungeons in different Interiors, like:

  • Abandoned Mine: Entrance
  • Abandoned Mine: Deep Levels

Those two interiors would be connected with a Door and represent the same mine.


However, if you want, you can have the Abandoned Mine to be an Exterior Worldspace, so that it can be streamed in tiles just as an Exterior World is streamed, meaning it can be as big as you want.


It is always recommend to create Interiors as Interior Worldspaces, and if they are too big, split them in smaller parts and join them with Doors, but keep in mind that you have also that possibility.

Worldspace

You can view all the worldspaces in your project by typing "[WORLDSPACE]" inside the Project Window or you can use the Rck Object Viewer (recommended).

The Demo contains three Worldspaces:

  • CityInterior: Is an Interior Worldspace and represents the Inside of the city and contains the city iteslf and every other Interior in it (such as the shops and houses).
  • Virrihael: Is an Exterior Worldspace and represents the world the player is in it, made of the terrain tiles.
  • Interiors: Is an Interior Worldspace and represents the Interiors that are scattered around the Virrihael world (such as the Tavern and Vera's Farmhouse).


Wrlds 1.png

  • Worldspace ID: the ID of the Worldspace, this MUST be unique and not shared with any other worldspace.
  • Worldspace Name: the name of the Worldspace, which will also be displayed in game.
  • Worldspace Type: the type of the Worldspace, Interior/Exterior.
  • Parent Worldspace: if this worldspace derives from another one, reference it here.
  • Unload Previous World: check this box if you don't want to cache the world that was loaded before the Player came inside this worldspace.
  • Force To Unload All Cache: check this box if you want to clear the cache as soon as this worldspace is being loaded.
  • Distance Before Unloading: currently unused, it will be used in future updates with the "Distant Cell Rendering".
  • Cell Size: The size of each cell inside the Worldspace, only used for Exterior Worldspaces - it represents the size of the Terrain of each cell.
  • Skybox Material: currently unused, it will be used in future updates with the "Distant Cell Rendering", however it represents the Skybox of that worldspace - but currently you have to set it in the Scene of your Cells.
  • Cells: All the Cells that are part of this Worldspace.
  • Automated Actions: Actions that are useful to perform for the whole worldspace:
    • Generate All NavMeshes: Rebuilds all Navmeshes of every cell inside the Worldspace, see Navmeshing for more information.
    • Generate All NavMeshes Links: Rebuilds all Navmeshes Links for the entire Worldpsace, see Navmeshing for more information.
    • Update All Cells: Performs the "Update Cell" for every Cell of the Worldspace.
    • Bake All Scenes: Bakes all the Scenes of every cell in the Worldspace.
    • Regenerate all Items GUIDs: Regenerates every GUIDs of every Item In World in every Cell of the Worldspace.


To know how the world is streamed and loaded, view the World Streamer page.

To know how to create a New Interior Cell, view the Creating Your First Cell page.

To know how to create a new Exterior Cell, view the Creating Your First Worldspace page.