Difference between revisions of "Cell"
(Created page with "A '''Cell''' is a data structure and the representation of somewhere in a Worldspace, it can be either a piece of the world, such as a piece of terrain, or an interior, such as a house or a city. A Cell is always contained inside a Worldspace, and the worldspace is made up of cells. You can view a Cell as a piece of world, as the player moves around, cells are loaded and unloaded from the game, allowing you to have a huge and continuous world. Every cell is eith...") |
(→Cell) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
== Interior Cell == | == Interior Cell == | ||
[[File:Cell1 1im.png|thumb|An Interior cell loaded in the Scene view.]] | |||
An Interior Cell is a cell that represents something that is an Interior, such as a City in the world, or an house. It is something that '''doesn't have to be split,''' and is loadable as a whole, without having to worry about performances, NPCs count or anything else. An Interior cell is often accessible from an Exterior Cell, but you can have nested Interiors too. | An Interior Cell is a cell that represents something that is an Interior, such as a City in the world, or an house. It is something that '''doesn't have to be split,''' and is loadable as a whole, without having to worry about performances, NPCs count or anything else. An Interior cell is often accessible from an Exterior Cell, but you can have nested Interiors too. | ||
An Interior Cell is only accessible by the use of a [[Door]]. | |||
An Interior Cell is always contained into a [[Worldspace]] flagged as type: '''Interior'''. | |||
While creating an Interior Cell, you may set arbitrarily the size of the Cell, and different Interiors can have different size even if they belong to the same Interior Worldpsace. | |||
⠀ | |||
An | ⠀ | ||
[[ | |||
== Exterior Cell == | |||
An Exterior cell represents a piece of a much bigger space, that will be loaded only if the Player is nearby that location.[[File:Cell img3 wex.png|thumb|An Exterior Cell loaded in the Scene view.]]Usually you will have to create an Exterior cell 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. | |||
So in other words an Exterior Cell is nothing else than tile of a bigger world, that is '''seamlessly connected to other tiles''' and that will be loaded only if the player gets nearby. | |||
An Exterior Cell is always contained into a [[Worldspace]] flagged as type: '''Exterior'''. | |||
While creating an Exterior Cell, the size of the Cell '''must match''' the size of every other Cell inside that Worldspace. This size is set into the [[Worldspace]] itself and must be respected while you create new cells | |||
⠀ | |||
⠀ | |||
⠀ | |||
== Cell == | |||
You can view all the cells present in the project by typing "[CELL]" inside the Project Window or by using the '''[[Rck Object Viewer]]''' (recommended), from there you can view every Worldspace and every cell it contains. | |||
[[File:Cell inspector.png]] | |||
* '''ID:''' The ID of the Cell, this '''MUST''' be unique and not shared with any other cell. | |||
* '''Cell Name:''' the name of the cell, which will also be displayed in game, this may be shared with other cells. | |||
* '''Keep Exterior Light:''' if this is selected, the Exterior Light present in the '''World Loader''' will not be disabled, this field is used only for Interior Cells like Cities. | |||
* '''Worldspace:''' the Worldspace where this cell belongs. | |||
* '''Scene Ref:''' the scene associated with this cell. | |||
* '''Cell Coordinates''': The coordinates of the cells as unit points. Each cell inside a worldspace has corresponding coordinates which are expressed with two values, X and Y. Useful only for Exterior Cells | |||
* '''Cell In World Coordinates''': Automatically calculated, it represents the absolute coordinates of the Cell inside the world. Useful only for Exterior Cells. | |||
* '''Neighboring Cells:''' Automatically calculated, they represents the cells that are close to this one. | |||
* '''Can Be Cached:''' Set it to true if this Cell can be Cached by the [[World Streamer]]. | |||
* '''Can Be Cached Only In Same Worldspace''': Set it to true only if "Can Be Cached" is false, the cell will be cached only if the Player is whitin the same 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|Creating Your First Cell]] page. | |||
To know how to create a new Exterior Cell, view the [[Creating Your First Worldspace]] page. | |||
Latest revision as of 07:28, 12 February 2022
A Cell is a data structure and the representation of somewhere in a Worldspace, it can be either a piece of the world, such as a piece of terrain, or an interior, such as a house or a city.
A Cell is always contained inside a Worldspace, and the worldspace is made up of cells.
You can view a Cell as a piece of world, as the player moves around, cells are loaded and unloaded from the game, allowing you to have a huge and continuous world.
Every cell is either an Interior Cell or an Exterior Cell:
Interior Cell
An Interior Cell is a cell that represents something that is an Interior, such as a City in the world, or an house. It is something that doesn't have to be split, and is loadable as a whole, without having to worry about performances, NPCs count or anything else. An Interior cell is often accessible from an Exterior Cell, but you can have nested Interiors too.
An Interior Cell is only accessible by the use of a Door.
An Interior Cell is always contained into a Worldspace flagged as type: Interior.
While creating an Interior Cell, you may set arbitrarily the size of the Cell, and different Interiors can have different size even if they belong to the same Interior Worldpsace.
⠀
⠀
Exterior Cell
An Exterior cell represents a piece of a much bigger space, that will be loaded only if the Player is nearby that location.
Usually you will have to create an Exterior cell 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.
So in other words an Exterior Cell is nothing else than tile of a bigger world, that is seamlessly connected to other tiles and that will be loaded only if the player gets nearby.
An Exterior Cell is always contained into a Worldspace flagged as type: Exterior.
While creating an Exterior Cell, the size of the Cell must match the size of every other Cell inside that Worldspace. This size is set into the Worldspace itself and must be respected while you create new cells
⠀
⠀
⠀
Cell
You can view all the cells present in the project by typing "[CELL]" inside the Project Window or by using the Rck Object Viewer (recommended), from there you can view every Worldspace and every cell it contains.
- ID: The ID of the Cell, this MUST be unique and not shared with any other cell.
- Cell Name: the name of the cell, which will also be displayed in game, this may be shared with other cells.
- Keep Exterior Light: if this is selected, the Exterior Light present in the World Loader will not be disabled, this field is used only for Interior Cells like Cities.
- Worldspace: the Worldspace where this cell belongs.
- Scene Ref: the scene associated with this cell.
- Cell Coordinates: The coordinates of the cells as unit points. Each cell inside a worldspace has corresponding coordinates which are expressed with two values, X and Y. Useful only for Exterior Cells
- Cell In World Coordinates: Automatically calculated, it represents the absolute coordinates of the Cell inside the world. Useful only for Exterior Cells.
- Neighboring Cells: Automatically calculated, they represents the cells that are close to this one.
- Can Be Cached: Set it to true if this Cell can be Cached by the World Streamer.
- Can Be Cached Only In Same Worldspace: Set it to true only if "Can Be Cached" is false, the cell will be cached only if the Player is whitin the same 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.