Improbable Icon

SpatialOS Forums

Unreal GDK and dynamic spatial subdivision and merge

Hey all,

Wondering if Unreal GDK will support dynamic spatial subdivision, and if so, will it also be at the dedicated server instance level?

In particular, is the plan dynamic spatial subdivision will be completely contained within the SpatialOS simulation with a fixed number of dedicated server instances per world? Or, will dedicated server instances be started/stopped as needed so that each partitioned space within the current world instance are mapped to a particular dedicated server instance?

Or to look at this another way, will the number of dedicated servers that are used to handle a particular world instance be fixed for that deployed world instance? Or, will the platform support spinning these up and down as needed as the world is subdivided / merged so that the number of dynamic entities that each dedicated server is aware of?

One algorithm I’ve seen implemented in the past is once a configurable maximum threshold is exceeded, the area subdivides, with a new instance being created which will take half of the space. Once synchronization is completed for that half of the space, a “authority flip” occurs and the original instance is now only responsible for half of the entities, and the new instance takes control of the other half which were just synchronized.

Similarly, once the number of dynamic entities falls below a minimum threshold, a space is merged with it’s neighbor as long as the new maximum won’t exceed some large fraction of the maximum threshold. In this case, a dedicated instance would be spun down as it would not be authority on any entities after the fact.

Thanks in advance for clarifying if this kind of thing is planned, and if so, any details on how it will work would be fantastic.

Bump…

I found some info confirming that on the “Spatial” runtime side of things new Workers will be spun up as needed to handle density changes, but it’s not at all clear if this is relevant for the Unreal GDK, or if it ever will be.

Furthermore, if and when this is supported for Unreal GDK, will additional Dedicated Server instances be spun up as well? Or are those “fixed” per deployed instance?

Hey @VV_Rhino,

apologies for the delay in getting back to you on this.

These are features that we would love to support with the GDK in the future, however, they’re not on our roadmap at the moment and I can’t say when we’ll be focusing on any of these.

However, we’re hoping that there will be some SpatialOS features coming in the next year or so that are going to help both these load balancing strategies. You can keep an eye on the roadmap here.

I know it might not be the answer you’re looking for but hope that helps somehow :slight_smile:

best,
Nee

Thanks for the reply.

Yes, I checked the roadmap and confirmed that world partitioning for the Unreal GDK was planned for sometime around Q4, but wasn’t sure if this would support dynamic partitioning, or even subdivision.

It sounds like what is planned is static partitioning, and the game designers have to decide before the build deployment how many partitions there are, and where they lie? With the initial release, there will be no dynamic partitioning at runtime.

Is that an accurate statement as to what what is planned for Q4?