beeeen
beeeen8mo ago

Does consolidating RealtimeComponents to have only one RealtimeView reduce bandwidth?

For example, if I have a prefab with a root game object and a child game object. For some reason, as I was creating this prefab, I decided that it needed a realtime view on the root object for some realtime components and it also needed a realtime view on the child object for some other realtime components. If I were to move all of the components from the child object to the parent object, reducing the amount of realtime views to one, would that reduce bandwidth usage? In my understanding of realtime views, they provided two functionalities: and id to associate realtime components across clients and ownership. In theory, if we were to reduce the number of realtime views (say, by consolidating realtime components to one realtime view), then that would decrease some entries in the datastore and thus decrease the amount of bandwidth. However, I'm not sure. Is my understanding/reasoning flawed?
3 Replies
kapa.ai
kapa.ai8mo ago
Hi @beeeen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, it's not explicitly stated whether consolidating RealtimeComponents to have only one RealtimeView would reduce bandwidth. However, we can infer some information based on the functionality of RealtimeView. A RealtimeView is used to identify a game object and its RealtimeComponents across multiple clients. When a prefab is instantiated, RealtimeView creates a model for each RealtimeComponent on the prefab and puts it into the datastore. Then, when the prefab is instantiated on other clients, RealtimeView will connect the model in the datastore with its respective RealtimeComponent on the prefab source (https://normcore.io/documentation/realtime/realtimeview). The RealtimeView also manages a set of RealtimeComponents on a game object source (https://normcore.io/documentation/reference/classes/Normal.Realtime.RealtimeView). Given this, it seems that the number of RealtimeViews might not directly impact the bandwidth usage, as the data that needs to be synchronized across clients is related to the RealtimeComponents and the data they hold, rather than the RealtimeViews themselves. However, it's important to note that Normcore does not synchronize parent-child relationships between objects source (https://normcore.io/documentation/realtime/common-questions#can-i-reparent-a-game-object-with-a-realtimeview-or-realtimecomponent-on-it). So, if you move all of the components from the child object to the parent object, you might encounter issues with synchronization if the parent-child relationship is important for your game logic. In conclusion, while it's not explicitly stated, it seems that the number of RealtimeViews might not directly impact the bandwidth usage. However, consolidating RealtimeComponents under one RealtimeView might have other implications, such as issues with synchronization if the parent-child relationship is important for your game logic. It's recommended to test this in your specific use case to see if it has the desired effect. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai8mo ago
<@690217885540417680> kapa.ai is still learning and improving, please let us know how it did by reacting below
maxweisel
maxweisel8mo ago
No, if the components are siblings this doesn’t reduce bandwidth

Did you find this page helpful?