Difference between revisions of "Worldspace"
(Created page with "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...") |
|||
Line 18: | Line 18: | ||
== Exterior Worldspace == | == Exterior Worldspace == | ||
An Exterior Worldspace is a Worldspace that is composed of [[Cell|Exterior Cells]]. | An Exterior Worldspace is a Worldspace that is composed of [[Cell|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 [[Cell|Interior Cell]] and an [[Cell|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 [[Door|Doors]], but keep in mind that you have also that possibility. |
Revision as of 08:13, 12 February 2022
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.