Item 2.0 is one of the big things for Star Citizen 3.0 what are its major advantages over item 1.0?asked by Oliver East
TL;DRItem 2.0 turns items into componentized game objects so functionality like geometry or animation can be shared across items, which makes content easier to make and allows performance optimizations such as update scheduling.
It's a really good question and I'm glad you ask because we don't communicate this necessarily as well as we could sometimes. Players have had some form of item 2.0 for a very long time. It's items that have been componentized vs entities that have a whole set of properties on them. So Item 2.0 is really is the componentization of functionality per item. Maybe that isn't a perfect way to frame it in one sentence but what it does is takes all the properties and generalizes them as much as possible so we can apply gameplay components onto them or any item regardless of its entity type.
What we are doing is taking the Lumberyard engine from being a purely entity driven engine to being a componentized system, meaning you can share components between different items or entities so you don't have to write bespoke code for every single entity.
An animated object within Lumberyard was an entity and that had a certain set of properties so of the big ones being a model, animations and some physics. All of these were written in terms of the item entity so instead to componentize that and move that entity from an item 1.0 to an item 2.0 you would have to decouple all of those properties from the entity itself. So you turn it into an item first of all but it cannot do anything by itself, we call it a game object, it's just a concept of a container waiting for components.
The first component I add is the geometry component, something which can be shared across pretty much any item. Then you might have an animation component which would be added to the same item and at this point we almost have the same entity in a componentized way. We have to write all those components up, so the conversion is a slow one as we have to slowly removing all the bespoke entities from Lumberyard and turning them into a componentized system.
Which allows for some really exciting gameplay implications because once you have things in this way there are more interesting things you can do with them. Which is a large part of the gameplay aspect of what we are making is, utilizing that level of granularity which is really cool.
It also just makes things easier to make, by far. The geometry component was the most obvious one right out of the gate, so that was the first one we wrote. Now we can assign geometry to any item through this one component, this one block of code that applies to everything. Rather than whole separate entities dealing with their things independently and if we change something we have to change it across 100,000 different entities, which creates too much work.
So one of the other things on top of this is the performance it brings us and the ability to optimize. When you have so many entities with so many different properties you have a hard job doing large scheduling updates. What we can do with these components is make an entity scheduler and make it update the component so many times per frame or if an item has a geometry component that's over 10 feet away say don't updated that one. It is these kind of optimizations we can make in a component based system that is the whole reasoning behind doing it.