Best way to control drone in streaming-enabled environment?

Here’s the setup: Each player has a couple autonomous drones that fly around (potentially far away from the actual player). In this game, streaming is enabled. Thus, it is logical to conclude that drones that fly far away from the player might get streamed out of existence.

So here’s my dilemma (trilemma?):

  1. Server-side: If I run the drone code server-side, the streaming aspect doesn’t matter, but the tradeoff is that I am running physics server-side, which could look choppy for the player as it gets replicated.
  2. Client-side: If I run the code client-side, it will be nice and smooth, but I risk losing the drone due to streaming.
  3. Client-side only: If I create the drones client-side, I get around the streaming issue and get smooth drones, but I’d have to do this for every drone for every player, which could be a performance problem for mobile players.

I would really prefer to run this code client-side, but I don’t see how it’s possible to do this in a streaming-enabled environment. Any ideas of what I could do? As far as I know, there is no API that allows developers to blacklist a model from the streaming system.

6 Likes

Personally I would store drone state on the server, and then render the drones on the client.

You could use something like replica service.

Well, i don’t know much about Steaming enabled.

  • First thing i got in mind is that you could set Models Level of Detail property to Disabled.

  • Second idea i got is that you could:

    • When player enters drone his character will be cloned and placed into workspace as statue/dummy
    • Player’s real character will be invisible and his CFrame will set to be around drone every second or so. So anything around players will still load.
    • When player leaves drone, teleport real character to his statue/dummy position, remove the statue/dummy and make real character visible again.

Please keep in mind that i might have understood something wrongly and my information might be not useful.

Just set Player.ReplicationFocus to a part in the drone when you switch to it and then back to nil when you switch to your character

or you can use Player:RequestStreamAroundAsync()

Both have to be set on the server

2 Likes

Setting Player.ReplicationFocus to a part in the drone would cause the character itself and the surrounding area to unload as well, and is thus not a solution.