Skip to main content

Cell Infrastructure

No replies
paulby
Offline
Joined: 2003-06-13
Points: 0

I've been getting a lot of questions about Cells and how they are configured, so here is the start of an explanation....

You can create your own cells today. Cells are managed by the server. Take a look at the WorldRootCellGLO class, this is responsible for setting up the entire world at the moment. You will notice it builds the world from a set of SimpleTerrainCellGLO objects (and a couple of other examples CellGLOs).

The server will notify the clients what cells it needs to load. The CellGLO.getClientCellClassName method is critical for this. When a new cell is instantiated on the client it will be of the type specified by getClientCellClassName from the server GLO object. Once the Cell is instantiated on the client the setup(..) method is called. The data for this method is created on the server by the call to CellGLO.getSetupData().

Cells are organised in a hierarchy from a single WorldRootCellGLO, Cells can overlap and have multiple parents. This hierarchy is created by hand at the moment, in the future the higher levels will be automated to ensure that the Cells that contain real content are well balanced in the hierarchy. The hierarchy is used for security control, view optimisations and animation optimisations.

Note: I weakened the channel semantics a little to conserve resources. Previously every Cell had a channel, now the channel is optional. The creation of the channel is controlled by the CellGLO.openChannel method.