Connected Worlds (aka World Linking vs World Streaming)
Hello!
New to worlds development, so apologies if I'm missing something obvious in the docs..
We have a vision for a world that offers a main hub of activity, which has some central things to do, but then also provides pathways to a (developer time) dynamically set of sub-games / worlds that groups of players can engage in, with the goal of playing the sub game, updating some player state, then returning to the main hub after engaging in the sub-game. This architecture is envisioned to offer flexibility and separation of concerns for creating and maintaining the sub-games. Its also meant to allow more socialization in the main hub, but then more focused game play happening in the sub-game.
The TLDR is.. how can / should we set this up?
If I am understanding World Streaming correctly, this is not quite what we are looking for, as when you load in a sub-world its not player independent. Its more akin to dynamically loading an experience for everyone in the world.
Is there currently a mechanism for linking one world to another (I'm expecting a gizmo /class ref that lets a player teleport to another world? (Surely this exists, I just haven't been able to find it yet)
Assuming this exists, then what are the limitations of state between these worlds.
For example, is it possible to have some state for a player setup in world A. Then in the linked World B, update that state? Or add state that is then accessible back in world A ?
I have looked at world.peristentstorage, and I'm guessing that is world specific, so World B would not be able to access any playerVariables set in World A and vice versa. This makes sense form a world security standpoint, but is there any way to let one world have access to another world's persistent storage? I.e. Organization level persistent storage?
Thanks!
One approach is using Variable Groups and Player Persistent Variables; these are linked to the player so their data travel with them wherever they go, as long as the Variable Groups are added to the world.
The workflow could be saving the player progress in world A, and when they enter world B read that data and make the necessary per/player changes to create the connected experience (player level, enemies strength and so on).
Here's more info around Variable Groups and Player Persistent Variables: