Download

MultiWorld - Run different worlds in parallel with the option to transfer players and actors

MARKETPLACE: https://www.unrealengine.com/marketplace/multiworld

Hi,

we just released “MultiWorld”, a plugin to manage multiple UWorld instances simultaneously, running different worlds in parallel with isolated actors and components, with the option to transfer players and actors between worlds. It’s a very simple solution to create loading screens, and it’s the first and only solution to have independent 3D worlds for any type of in-game editor or inventory scenes isolated by your main game world.

Description

MultiWorld is a runtime plugin to manage multiple independent UWorld instances simultaneously. You can run several worlds in parallel, each one with completely isolated actors and components (and so with independent graphics, audio, physics, collisions, UI, etc), with the option to transfer the player and other actors between the worlds.

The plugin is compatible with all the major platforms.

Demonstration video
Pre-built demo
**Documentation and API:
Support thread

Main features

  • unlimited number of independent “Secondary Worlds”;
  • any standard UE4 Level/UMAP is compatible as-is with the plugin;
  • the standard UE4 network-replication for multi-player games is supported on the Main World (Secondary Worlds are not replicated);
  • the local player can be moved between Worlds;
  • actors can be transferred between Worlds;
  • Worlds can be independently ticked, also when not shown in the viewport;
  • asynchronous loading of Level/UMAP files;
  • all the features are available from both Blueprints and C++.

IMPORTANT The plugin has some technical constraints, please read about them carefully.

Technical details

Features

  • unlimited number of independent “Secondary Worlds”;
  • any standard UE4 Level/UMAP is compatible as-is with the plugin;
  • the standard UE4 network-replication for multi-player games is supported on the Main World (Secondary Worlds are not replicated);
  • the local player can be moved between Worlds;
  • actors can be transferred between Worlds;
  • Worlds can be independently ticked, also when not shown in the viewport;
  • asynchronous loading of Level/UMAP files;
  • all the features are available from both Blueprints and C++.

Code Modules:

  • MultiWorld - Runtime

Network Replicated: Compatible with multiplayer games. See detailed notes.

Supported Development Platforms: Windows, Mac.

Supported Target Build Platforms: All.

Documentation: https://www.unamedia.com/ue4-multiworld/api/

Example Project:

Screenshots

I assume not multiplayer networked?

Hi! The plugin can be used with multi-player games (it was initially developed exactly for that). The only current limitation is that Secondary Worlds are not network-replicated. The Main World is the world managed by UE4 (and it can be network-replicated as usual), while the Secondary Worlds are all the maps loaded and managed by the plugin. Secondary Worlds could be network replicated in the future, but it’s a complex area still unexplored with the plugin. Please note that from the Secondary Worlds you can still send and receive network messages, passing through the local network-replicated Main World (we’ll release a demo application with an example).

Here a short example of the plugin working in a multi-player demo:

https://youtube.com/watch?v=OdsYfcPAd4g

Each player can enter into a private inventory map, where it can change its aspect. The change is then replicated to all connected clients.

Let me know when this is live on the Marketplace :slight_smile:

Sure! :slight_smile: We’re working on a tutorial video, as soon as it will be ready we’ll release the product on the Marketplace.

Hi! We published the official video tutorial for the plugin:

https://youtube.com/watch?v=P08e0XlLdJU

it shows the plugin in action, few examples of what you can do with it and a short tutorial on how to use it (2 simple Blueprint nodes are enough to start :slight_smile: ).

We should publish the plugin on the marketplace in few days. I’ll post here when it’ll be available.

In the mean time, let me know if you have any question!

Hi
Can the secondary worlds be sub levels of a persistent Main world ?
alternately can secondary worlds be sub levels of a different persistent level ?
Thanks
Paul G

Hi, Secondary Worlds are completely independent levels (standard .UMAP files). The same levels that you open and work with while in-editor, as described in the UE4 official documentation. They can have a persistent level and any sub-level. We support loading the same levels in both the Main World and Secondary Worlds, as long as you specify to “duplicate them on load” (we have a flag for it). If this doesn’t answer your question, please describe with more details your case and I’ll try to give you more detailed information.

Hi everyone! The plugin is now officially available on the UE4 Marketplace: https://www.unrealengine.com/marketplace/multiworld .

We hope you’ll enjoy it and that it will help for your projects. Write us for any question or issue you could find!

https://www.youtube.com/watch?v=P08e0XlLdJU

If the inventory map is not replicated and run on the client, what stops the player from modifying his inventory by code injection and then moving his character back to the main server?
I see great potential for using this in single-player for instanced dungeons that are persistent and most important - fast loaded. As I assume travel between parallel worlds is super fast in comparison to opening a new level, and loading actors from a saved state?

Good question :slight_smile: While the “secondary world” is local and not replicated by UE4, you are still able to communicate with the server. For example, to have the changes done in your local inventory replicated to other clients, you MUST pass through the server (we have a complete working sample of this that will be release soon - you can see it in the video). The server will then make the usual validations that you would do normally (so - from a security point of view of a multi-player session - it’s not different than a local code-injection attack done in a common network-replicated use-case).

You’re right: switching between worlds is a matter of only 1 frame. If you pre-load the needed “secondary worlds” in advance, they are kept in memory and the switch is done in 1 function call. In this case you must of course pay attention to the consumed memory (background worlds are “paused” by default, so they doesn’t have impact on run-time performances).

Hi! We uploaded a binary demo that showcases the main features and use-cases of MultiWorld plugin. We hope it can help understanding how it works and its potential for your games.
Sources are also available for plugin owners (the project requires the plugin).

Write here or at support@unamedia.com if you have any question.

ok, so this is brilliant! In an open world, you can do a proximity check to dungeon entry - for example for buildings, taverns, and actual dungeons, pre-load them. Also if you see someone moving, or doing some random chors inside a building and you exit and come back, he won’t be frozen in time… the bartender will keep on serving guests, the bard will finish his song etc :smiley:
Regard the inventory I’m not sure if it’s worth the effort to use a separate level, but there are still so many use cases for keeping multiple smaller levels preloaded.
And now I noticed you are the author of mixamo retargeting plugin. good job on that! I’ve been using it for 3 years! :slight_smile:

What about multiple maps with world composition so level streaming and origin rebasing? How to control how many tiles are loaded in a secondary map with your plugin? How does that work when there is no player actor there which causes the origin rebasing and level streaming to work and load tiles accordingly? Does your plugin add a fake player actor in each secondary map either paused or not to make world composition work properly and having only the needed tiles loaded in memory?

Yes :slight_smile:

Of course depends a lot on the game, but there are several advantages for having an inventory in a separate level:

  • you can use a completely independent lighting (and audio) setup. The usual trick is to place the inventory scene somewhere in the same game level (e.g. below the playable terrain), but in this way the environment light (and audio in some cases) leaks in the inventory scene (and it’s worst if you’re using a day-night cycle). Usually you’re forced to use other tricks to work-around such issues, but it’s always a pain.
  • if you have a multiplayer game, all the above problem are far worst. E.g. it’s nearly impossible to spawn independent inventory scenes for each connected players (where do you put them? how to fix the lighting if it’s replicated from the sever? etc.). With the plugin, this is no more a problem as each client would have its own scene.
  • thanks to the plugin, you can switch to the inventory level instantaneously :slight_smile: Note that in a “standard” multi-player setup, if a client want to temporarily open a new map, it would be disconnected from the server, that would be a complete disaster. With the plugin this is no more the case.

Thanks :slight_smile: Glad you found it useful!

Hi! We did a quick test in the past (not an extensive one honestly), and the World Composition feature was working on the “Secondary Worlds](MultiWorld: Main Concepts)” as usual. From our test, it was managed by UE4 engine as usual, with the standard behaviours and features. So nothing should change on using the World Composition on the “Main World](MultiWorld: Main Concepts)” and Secondary Worlds.

Each world loaded with the plugin is a complete independent UWorld. So each instance has its own Game Mode, Player Controller, Player Pawn, Game State, Player State, etc. By default, the Secondary Worlds are not ticking when they’re not Active. This means that they would remain “frozen” in this case and so “its World Composition”. If instead you configure them to tick when in background, then what happens is that you have a normal running game in this world, but with the only difference that the PlayerController is not receiving any input from the user (as the standard UE4 viewport will forward inputs only to the Active World).

Write me if you need more information or details!

Hi having seen your demo package, could you tell me if…
With actor transfer from on level to another,
if the cube had physics enabled and was falling when the switch level took place does the transfer still occur and the cube land in the new level ?

I am looking to switch physics actors between levels that are already in motion

Thanks Paul G

You have total control over it: the function TransferActorToWorld() has inputs that you can use to control this type of behaviour.

MultiWorldTransferActorParameters.png

You can read more about the options here: MultiWorld: FMultiWorldTransferActorParameters Struct Reference . In particular, for you can you should look at the [FONT=Courier New]Teleport field, that has the same meaning as the standard UE4 AActor::SetActorTransform().

Remember that if the involved UWorlds are Ticking while in background (here more details on how to control it), the physics simulation of a world will run also while it’s not activated/visible.

I might have a need for this, is it working on mobile , the client?

Hi! Yes, the plugin is compatible with mobile platforms too.