Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Object Container Streaming

Technology behind Star Citizen that eliminate loading screen
Object Container Streaming illustration from Jump Point 06 09 September 2018.webp

Object Container Streaming (OCS) is the umbrella term for all the technology in Star Engine that makes a vast seamless universe possible, by which Star Citizen (and to an extent Squadron 42) can provide an extremely large virtual world through which the players can move without seeing a loading screen.[1]

Without OCS, things such as a spaceship and its contents for example are tracked by both the player client and the server at all times, which impacts performance.

Client side OCS currently in place means that the ship isn't tracked by the player client but by the server, unless the player goes there in which case the ship starts getting tracked on your client side as well.

Planned server side OCS won't track the ship on the client nor server side unless the player goes there, which is the best for server performance as it positively impacts latency, stability, synchronization, and performances such as AI responsiveness.

The servers not having to load everything all the time is essential to allow an expanded game area with more planets, moons, stations, systems etc without loading screens.

Related technology

Server-Side Object Container Streaming

Server-Side Object Container Streaming (SOCS) is a streaming technology needed to expand the scale of the universe on Star Citizen servers.[2] The basic concept is that if no player is near an object, the game can "freeze" that object's state. And instead of keeping the frozen entity in memory (incurring a cost), the game can serialize (using Serialized Variables) its state and store the serialized state in a database. While a client is moving through the virtual world, the server updates its view into the database to restore entities now in proximity as well as free and store away no-longer-needed entities.[1]

Entity Streaming Manager and StarHash

StarHash is used to store in-game entities in a way allowing efficient searches for all entities in an area of space by utilizing a data structure called a RadixTree. The Entity-StreamingManager is then the logic-driving the StarHash-RadixTree queries to trigger loading and unloading of entities on the server, based on the positions of all connected clients.[1]

Cross Session Persistence

Cross Session Persistence allows the game to store the entity in a frozen state in an in-process database that can be used by different server or machine. It is an efficient network access layer to allow the storing of the entity in a database on a different machine. Before Cross Session Persistence, the state of an entity is lost when the server crashes or is restarted (besides the state the game already persist). With Cross Session Persistence, object state will persist over server restarts and crashes (until the persistence database is wiped).[1]

I-cache

I-cache is a back-end system and service that provides and manages reliable persistence of all player and entity data.[2] First major part of I-cache was completed and tested internally in March 2019. It was introduced as a replacement of the existing pCache. It is a highly distributed and fault-tolerant storage/query engine that greatly out-performs pCache. It provides an indexing and query system that can be utilized by other services for specific and complex item queries.[3]

Server Meshing

Server Meshing is a technology that allows the game instance to utilize multiple servers. Instead of having a single server manage all the views, the game will distribute the individual views over multiple servers. Doing this will reduce the load on each participating server. When those servers are placed on different machines on Amazon Web Services (AWS), the game can easily scale with the player count.[1] The first version of this technology is static server meshing, to be followed by dynamic server meshing which will allow to dynamically mesh server nodes together and then scale the mesh dynamically based on demand.[4]

Network Bind Culling

Network Bind Culling is the process of deciding what entities to load and unload on any client. Specifically, it works on units of Entity Aggregates, using the information of the Entity Component Update Scheduler to decide what Entity Aggregates to load or unload on each client.[1]

Network Bind Culling was first mentioned in November 2016 as entity bind culling.[5]

Entity Component Update Scheduler

Entity Component Update Scheduler is a system designed to control the update of entity components, based on how they are spatially placed relative to the player. It allows the game to skip updates of individual components which are too far away. The same information is utilized by Network Bind Culling.[1]

It was first mentioned in April 2018 as being refactored and nearly finished.[6]

Entity Ownership Hierarchy and Entity Aggregates

Entity Ownership Hierarchy keeps track of entities that are related to each other. If they are related, the game treats them as one group, or Entity Aggregate. Compared to Object Containers that split the static level geometry and objects into building blocks at level design time, Entity Aggregates are consisted of dynamic entities (e.g. players, ships, etc.) that can move around in the universe.[1]

Entity Ownership Hierarchy was first mentioned in March 2017 with the development of Entity Owner Manager.[7]

Entity Spawn Batches and Entity Snapshots

Entity Spawn Batches represent a set of entities that should be spawned together and only made active when all spawned. Entity Snapshots are the values of the Serialized Variables belonging to the entity. They are also used for serializing entity state to persistence, or for Squadron 42 save games.[1]

Serialized Variable Culling

Serialized Variable Culling is a system that would only send network updates to clients if that client is in proximity of the updated Entity-Aggregate. It provides a noticeable performance improvement on the clients. Additionally, it was the first real-life test of running our client game-simulation with only partial information of the whole universe.[1]

It was originally planned for Alpha 3.0.0, but was delayed to Alpha 3.1.0.[1]

Groundwork technology

Zone System

Zone System in the Retaliator Multi-Crew setup in July 2015

Zone System is a spatial partitioning system that divides all objects in a level into smaller entities.[8] It is required for moving large, complex, and interactive groups of physicalized objects efficiently.[9] It replaces the old CryEngine octree spatial partitioning scheme.[10]

It was proposed in January 2015 in a tech summit with tech engineers from the CIG studios, Illfonic, Behaviour Interactive, and Wormbyte.[8] The development began in May 2015 by the Frankfurt team.[10] It was deployed to the Star Citizen code mainline in June 2015.[11] It began to be integrated into various game systems by the UK, Frankfurt, and Santa Monica studios in July 2015, with Retaliator (used as the multi-crew testbed) and the Cover System were the first system being integrated.[9] Navigation mesh and characters' paths began to be integrated in August 2015.[12] The Frankfurt team extended the Zone System to better support multiple AI objects in October 2015.[13] The Frankfurt team rewrote CryEngine's AreaManager (ambient sound effects and reverbs) to integrate with the Zone System in November 2015.[14] The UK team began work on getting Object Containers to work with the Zone System in January 2016.[15] Hierarchical culling support was added in March 2016.[16] Support for tags (Tag System) was moved into the Zone System in May 2016.[17] All data in Zone System are converted into AABB tree structure in June 2016.[18] The Tag System went through a major refactoring and optimization pass in July 2016.[19] The Area system was moved into the Zone System in November 2016.[5]

C++ entity logic

C++ is a multi-thread safe scripting language which is used heavily for all kinds of entity logic. It allows resource loading in parallel to the game simulation without introducing very long wait times due to required mutual exclusion, in comparison to the old Lua code which is not multi-thread safe.[1]

It is unknown when the conversion started, the first mention of the conversion was that the spawning logic of spaceships AI was converted from Lua to C++ in January 2016.[15] It was mentioned again as a work in progress in April 2016.[20] It was mentioned as being worked on by the UK team in January 2018.[21]

Entity component

Entity component represents a part of specific game behaviour. With components, the behaviour of an entity is defined by the types of components it has. Without components, all kinds of different logic tends to be interleaved in one monolithic and very complex central logic block. Since they are smaller parts, it is much simpler to make them communicate efficiently with the game simulation while we load them concurrently. Additionally, they split the monolithic game logic into more manageable parts, which played a critical role in allowing a partial roll-out of concurrent entity initialization.[1]

Basic support of entity component was implemented in the main development branch in July 2015.[9]

Object Container

Object Container is a level building block. It replaces the old game level format. Instead of developing one large level, the content creators develop a small section. The final level (or universe) is then made out of many different Object Containers. It allows the developers to split the world into many smaller building blocks when they are building a level.[1]

The concept and first prototype of Object Container was introduced in January 2016. The UK team began to convert prefabs into containers in the same month.[15] Basic support of loading levels with Object Container instead of as levels was implemented by the Frankfurt team in the development branch in February 2016.[22] Support for LOD mesh merging and AI navigation meshes were added in August 2016.[23] The old prefab system in hangars and shops were being replaced with an Object Container in February 2017.[24]

Serialized Variables

Serialized Variables is a process to store entities state so that they can be transferred on the network and restored in the same state on a different machine. It take the parts of an entity and put it into a special wrapper object, and the wrapper object provides ways to serialize the entity state. It allows game code to be written in a uniform style, regardless of the serialized data will be transferred later.[1] Compared to the old implementation in CryNetwork, the gameplay programmer only need to mark which variables they want to replicate to the server/clients. The underlying system can detect which have changed since the last time they were sent, and which haven't, and takes care of the rest in a nice and efficient manner.[18]

The concept of Serialized Variables was introduced in June 2016, with the development started in the same month.[18]

Mega Map

Mega Map is an empty map used to load and unload Object Containers. It is used to reduce the load time, and eliminate the need of load screens.[25]

The concept of Mega Map was introduced to reduce load time of switching game modes in October 2016.[26] Support for singleplayer game maps such as hangars and single player Arena Commander was implemented in Alpha 2.6.1 in February 2017.[27] Support for multiplayer maps such as Arena Commander and Star Marine was implemented in Alpha 2.6.2 in March 2017.[28]

Development history

2015-01
  • Zone System and entity streaming were proposed[8]
2015-05
  • Zone System was being developed, and entity streaming was being investigated[10]
2015-06
  • Deployed Zone System to Star Citizen main development branch[11]
2015-07
  • Started implementing Zone System in the main development branch[9]
  • Added basic support of the entity component system in the main development branch[9]
2016-01
  • Introduced the concept of Object Container[15]
  • Started converting prefabs into containers[15]
  • Started getting containers working with the Zone System[15]
  • Converted Spawning logic of spaceships AI from C++ to Lua[15]
2016-02
  • Added basic support to load levels with Object Container instead of as levels[22]
2016-03
  • Added Hierarchical culling support to Zone System[16]
2016-05
  • Added support for tags (Tag System) into Zone System[17]
  • Added ability to reuse entity IDs[17]
2016-06
  • Started work on Serialized Variables[18]
  • Converted data structure to AABB tree in Zone System[18]
2016-07
  • Major refactor and optimization of Tag System in Zone System[19]
2016-08
  • Added Object Container support for LOD mesh merging and AI navigation meshes[23]
2016-10
  • Mega Map was being investigated[26]
2016-11
  • Moved Area system was moved into the Zone System[5]
  • Started work on Network Bind Culling[5]
2017-02
  • Implemented singleplayer maps support for Mega Map in Alpha 2.6.1[27]
  • Started work on replacing old prefab system in hangars and shops with Object Containers[24]
2017-03
  • Implemented multiplayer maps (not including PU) support for Mega Map in Alpha 2.6.2[28]
  • Started work on Entity Owner Manager[7]
2018-04
  • Refactored Entity Component Update Scheduler[6]

See also

References

  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 Christopher Bolte, "Developer Feature: The Road to Object-Container-Streaming". Jump Point. Vol. 7 no. 10. pp.3–16. Retrieved 2020-04-04.
  2. 2.0 2.1 Star Citizen: Pillar Talk - Alpha 3.9
  3. Monthly Report - March 2019. Transmission - Comm-Link. Retrieved 2020-05-25
  4. Server Meshing and Persistent Streaming Q&A. Transmission - Comm-Link
  5. 5.0 5.1 5.2 5.3 Monthly Studio Report: November 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  6. 6.0 6.1 Monthly Report - April 2018. Transmission - Comm-Link. Retrieved 2020-05-25
  7. 7.0 7.1 Monthly Studio Report: March 2017. Transmission - Comm-Link. Retrieved 2020-05-25
  8. 8.0 8.1 8.2 Monthly Report - January 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  9. 9.0 9.1 9.2 9.3 9.4 Monthly Studio Report: July 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  10. 10.0 10.1 10.2 Monthly Report: May 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  11. 11.0 11.1 Monthly Studio Report: June 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  12. Monthly Studio Report: August 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  13. Monthly Studio Report: October 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  14. Monthly Studio Report: November 2015. Transmission - Comm-Link. Retrieved 2020-04-04
  15. 15.0 15.1 15.2 15.3 15.4 15.5 15.6 Monthly Studio Report: January 2016. Transmission - Comm-Link. Retrieved 2020-04-04
  16. 16.0 16.1 Monthly Studio Report: March 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  17. 17.0 17.1 17.2 Monthly Studio Report: May 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  18. 18.0 18.1 18.2 18.3 18.4 Monthly Studio Report: June 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  19. 19.0 19.1 Monthly Studio Report: July 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  20. Monthly Studio Report: April 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  21. Monthly Studio Report: January 2018. Transmission - Comm-Link. Retrieved 2020-05-25
  22. 22.0 22.1 Monthly Studio Report: February 2016. Transmission - Comm-Link. Retrieved 2020-04-05
  23. 23.0 23.1 Monthly Studio Report: August 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  24. 24.0 24.1 Monthly Studio Report: February 2017. Transmission - Comm-Link. Retrieved 2020-05-25
  25. Star Citizen: Around the Verse - What is Mega Map?
  26. 26.0 26.1 Monthly Studio Report: October 2016. Transmission - Comm-Link. Retrieved 2020-04-07
  27. 27.0 27.1 Star Citizen Alpha 2.6.1 patch notes. Comm-Link
  28. 28.0 28.1 Star Citizen Alpha 2.6.2 patch notes. Comm-Link
Heya! We only use cookie to make the site function and save your preferences, nothing else :)