Forum Discussion

stealthbazatlantika's avatar
7 months ago
Solved

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!

4 Replies

  • Im new, but have also been researching this. You have options. You can either teleport your players to another world or you can spawn out your world as an asset and spawn in the new world as an asset. There are YouTube videos on doing this which seems to work very well. It also allows you endless capacity as long as each world is within reason. 

    • stealthbazatlantika's avatar
      stealthbazatlantika
      Partner

      If we teleport our players to another world, is shared state available?   Or is all player state scoped to the world only?

      Also.. can you point me to the teleport to another world mechanism? (class or gizmo)  I haven't discovered it yet.

  • 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:

    https://developers.meta.com/horizon-worlds/learn/documentation/desktop-editor/quests-leaderboards-and-variable-groups/variable-groups/using-variable-groups

  • I have several astronomy-themed worlds where players travel to different star systems via a starship. There is a fleet of four starships that can each hold multiple players. Each star system is a separate sublevel. There is a wormhole animation I use to cover the sublevel loading time and I unload the sublevel when the players leave.

    Could this model work for you? There is the door system that you can use to jump between worlds but this is not very seamless.