ProceduralDungeon icon indicating copy to clipboard operation
ProceduralDungeon copied to clipboard

Is there a way to turn off replication for rooms and room connections?

Open Mikooboy opened this issue 6 months ago • 3 comments

Hello again, I was previously using an older version of the plugin without the replication implemented yet. I worked my way around those limitations and made a system that works for me. Now after updating my engine version and this plugin, I'm having problems with replication performance.

Image

As you can see the replication for the dungeons is taking 3.2 ms on average per frame.

So, I was wondering if there was an easy way to turn off the replication somewhere? It's not obvious from the wiki or from the settings in the editor.

Mikooboy avatar Sep 09 '25 13:09 Mikooboy

Hi @Mikooboy The network system should use push-based updates, so in theory it shouldn't take that much... Especially the RoomConnections subobjects should be replicated only once 🤔

As of now, I haven't implemented a setting to disable the replication of the dungeon. Maybe I should add it

Also I'm curious, how did you do your custom replication of the dungeon? I'm actually not making multiplayer in my own projects, so beside imrpoving the replication for others, I didn't tested thoroughly on my own 😓

BenPyton avatar Sep 09 '25 15:09 BenPyton

I just replicated the seed and generated the dungeon on the clients. This is how Minecraft or other procedural worlds are usually "replicated" to clients so I copied that. This would need a separate way to replicate changes to the dungeon but for my project the dungeon is static and only changes when a new one is generated.

For the actors inside the rooms I used a "spawner" actor that would spawn the correct class which would then have the replication work normally like any other spawned actor.

For now, I managed to make the generation work again by removing all the authority checks and making it so that the objects don't get registered for replication.

For reference I had 4 dungeon generators in the world that would generate a new dungeon every 30min with 10-30 rooms. Also the replication performance loss was 10ms at worst with about 80 players on the server.

Mikooboy avatar Sep 16 '25 14:09 Mikooboy

Okay ! That was what I did before in the plugin v2 (see commit de3f5e5), only replicating the seed. However, most people didn't understood the spawner system to replicate actors inside of rooms, and since there are some runtime states in the URoom instances and I've added the RoomCustomData classes for the rooms instances, there has been the need to replicate the room instances directly.

I need to investigate this loss, because it should not be that much... Also, since I've fixed a lot of things on the replication side of the room levels, maybe there is no need to use spawner anymore and place actors directly in room levels? 🤔

BenPyton avatar Sep 17 '25 16:09 BenPyton