Search Unity

Help With Architecture Decisions for Dynamic Runtime Objects

Discussion in 'Multiplayer' started by MaximumTechnology, Apr 14, 2021.

  1. MaximumTechnology

    MaximumTechnology

    Joined:
    Jul 15, 2018
    Posts:
    1
    Hey all. We're currently working on a game that has some unusual multiplayer aspects and I was looking to get some advice on the cleanest solution within the MLAPI framework.

    This game involves the spawning and de spawning of procedurally generated networked objects at runtime with a fairly small amount of state, and they are effectively "rooms". However, when the users approach the room, we need to generate and spawn a large number (~200) children objects. These objects never move independently of the parent, but each has attributes that need to be synced from the server. However, these attributes are infrequently changed (and the updated state only needs to be available on demand when interacting with the object). These objects also need to be unloaded and serialized to disk when exiting the room.

    Currently in our non-networked solution references to these objects are contained in an auxiliary data structure for fast lookup. So essentially my questions are as follows:

    1) How can we spawn and despawn these objects in such a way that uses minimal bandwidth, and allows for them to be visible for clients joining mid-room?

    2) How can we generate this lookup DS on each client when the children objects are spawned?

    3) How can we spread out the network and spawning load over a few dozen frames to prevent jitter/lag?

    Thanks everyone for the advice.