BenPyton / ProceduralDungeon

This is an Unreal Engine 4/5 plugin to generate procedural dungeon.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiplayer level loading

Mikooboy opened this issue · comments

Don't know if this is fixed in a newer version of the plugin already.

Calling Generate on the server works fine if the client is already connected. Meaning that the multicast works as expected.

The problem comes when a player joins the game after the generation. Because the client was not yet connected, the multicast wont run on that client. This means that the new client will not see the generated levels.

Technical informations

  • OS: Windows 10
  • Unreal: 4.26
  • Plugin Version: 2.0.1

Hi @Mikooboy

Thank you for taking the time to improve this plugin.

Yeah this is a known issue, I have stated it on the multiplayer page of the wiki:

Also, all players must be connected and loaded when you call the Generate function of the DungeonGenerator. Otherwise, clients which arrives after won't trigger the Generate event.
(this will eventually be fixed in a later release of the plugin)

The latest version at the time of writing (2.1.2) do not fix it, I will soon release the 3.0.0 version of the plugin, however it will not fix the issue either.

I didn't took the time to fix that because more important things need to be fixed or added to the plugin first.
And also because nobody requested it until now.

I will take a look after the 3.0.0 release, and I will share with you my fix here.

Moreover, from the plugin's 3.0.0 version I will not support myself UE 4.26 and older versions anymore for the precompiled binaries (mainly to save space on my computer and also because some code in 3.0.0 doesn't compile on 4.26).
So if it not yet the case, I recommand you to convert your project in C++, adding the fix and recompile it yourself.

One last thing, if your game absolutely needs this fix to work, then I suggest you to not rely on me and try to fix it yourself (it should not be really hard I think), because I'm working on this plugin on my free time and it can take a long time (weeks or months) before I fix it myself.

Best regards.

Thank you for still improving the plugin!

And yeah, I have applied a fix for myself already since it was not that complicated.
I just get the latest seed from the server and use it to generate the dungeon at begin play on the new client.

This issue has been resolved with the reworked networking system of the plugin in the version 3.0.0.
No RPC is used anymore, and the dungeon generator is using a state machine with replicated variables to load/unload room level's.
Also, only the server is generating the dungeon and the clients receive the room list from the server.