Hi,
Generally I need a global manager (e.g. game manager) to:
- Store the shared data for every entities (e.g. current in-game time, stock market)
- Fire global events to any entity in any place in game world (e.g. earthquake, notify players in the end of a turn)
The problem is how to implement global managers in SpatialOS, or how I should convert these to SptialOS-style systems. How do I make sure global managers can be static within workers and also thread-safe? (not tested yet) Is there any good way to keep global data other than the singleton of global class in SpatialOS? Or should I put every shared data into components?
So far I know I can make an entity accessible to global by setting global_component_streaming_query
in worker config files, and the players can get the updates from components passively, but how can I make an entity also can reach to any player entity in the game world when it needs?
I have to admit that I donât know SpatialOS very well, and many things I havenât tried myself. Since many functionality and tutorials are not documented yet, just wonder that if anyone is willing to kindly share the successful experience about the design patterns or structures, which may save me a couple of days or even weeks.
Thanks