I have been reading your tutorials and learning how to run SpatialOS over the past few days, and in that process I have arrived upon some questions.
Could you provide some elaborations as to why spawning & deleting players appears so complicated? (e.g. “PlayerManagementBehaviour”/“ClientPlayerSpawner” in HelloWorld demo)
Why the need for searching for a list of entity ids, where the first one is then stored as the “SimulationManagerEntityId” ? I thought the entity ID was accessible through the Unity GameObject? But you appear to be storing the WorkerId?
Somewhere in your docs, you suggest to keep “Improbable Components” (the ones generated through schema) private to their respective MonoBehaviours, which means that the same ‘Improbable Component’ will be ‘required’ by possibly many ‘Unity Components’. Doesn’t that introduce redundancy and more overhead in network message handling? I thought it would be simpler and/or more efficient to have a ‘centralized’ Unity MonoBehaviour component with more or les all reader/writers needed for that entity type.
I noticed in your “Hello World” demo the presence of at least 3 components with “TransformReceiver” in their names. I realize that two of them are only active on client and server respectively, but why not just combine them into one ‘TransformReceiver’ which internally checks whether it has authority or not, and uses that to execute the correct functionality? Your current approach seems to introduce more code repetition and redundancy, in my opinion.
Is there any way to use different prefabs for the same entity type? Specifically for VR players it can be desirable to have separate prefabs for local player (with VR components) and remote players (without VR). In the ‘Hello World’ demo, as well as in the ‘Pirates’ tutorial, you seem to suggest that adding an ‘Improbable Component’ with the appropriate ACL to the MonoBehaviour is the recommended approach (thus disabling that MonoBehaviour when not supposed to run).
As far as I can see, your approach means placing a more or less arbitrary ‘Improbable Component’ on the VR components with an ACL set for only allowing them on the specific local client. My issue with that approach is mainly that the component list on a particular game object can grow to almost unmaintanable proportions. I feel like this is the case in your ‘Hello World’ demo for the player entity prefab, even though that demo is supposed to be relatively simple and small, the list of components on that game object is quite long.
Having different prefabs for player entities depending on whether they are local or remote affords a more simplified component setup on the prefabs, as well as more specialization of components.
I read in your docs that using ‘FinishAndSend’ is a requirement to send data, but I cannot find a way to access the ‘Impl’ subclass within a generated Improbable Component (which seems to be the only one to expose that method). Also in my brief testing, synchronization appears to work without this ‘FinishAndSend’ method, just using ‘Send’. So are the docs outdated or how am I supposed to call FinishAndSend? (it is NOT exposed on the ‘Updater’ as suggested by the docs, as far as I can see).
If I understand the ‘Snapshot’ feature correctly, the idea is to write code to first define all “Snapshot Entities” (kind of like blueprints) and then (possibly) write code for ‘prepopulating’ the world. However, in Unity, most level designers are used to being able to drag and drop prefabs / game objects directly in to the scene. I realize that we could make some editor-script for generating a snapshot prepopulation based on the placed data, but I cannot help but wonder whether the use-case for hand-designed levels (without coding) was forgotten a little bit when developing this snapshot tool? The need for manual level design is especially relevant for highly-detailed or small worlds, which, for the moment, are quite common in VR.
I’m assuming that you have implemented networking optimization techniques, such as compression and message coalescing? I am only asking because Unity’s LLAPI does not provide these features.
Thanks in advance.
VRUnicorns / Apex Game Tools