locus84 / LocusReplicationGraph

UnrealEngine4 - ReplicationGraph implementation with blueprint functionality
MIT License
58 stars 21 forks source link

Server owner / Relevant Team #3

Open Rusel2050 opened 5 years ago

Rusel2050 commented 5 years ago

Hello! I have a problem. I will spawn cubes for each player and I need to divide the replicability of these cubes into teams. image Everything works fine on clients, but they don’t get a cube owned by server Player Controller: image Settings: image Perhaps this is some kind of bug. Teams work well(exclude server's cube): image image

locus84 commented 5 years ago

Hello! Thank you for the report! going to resolve this issue on this weekend. Yeah it looks like a bug.

May I ask which version of UE4 are you using?

Rusel2050 commented 5 years ago

4.22

locus84 commented 5 years ago

Hm... it looks like server itself does not have connection manager. because server does not need any connection to self. This is normal for original replication graph which lacks team functionality. Need to do some additional works. Going to update when i'm done.

Rusel2050 commented 5 years ago

Hm... it looks like server itself does not have connection manager. because server does not need any connection to self. This is normal for original replication graph which lacks team functionality. Need to do some additional works. Going to update when i'm done.

Thank you!

Rusel2050 commented 5 years ago

Does ReplicationGraph apply to events? I would like to make a multicast event triggered by a team.

I also noticed that all ectors exposed in command replication are always created for all clients. Then already hiding or something like that. Is it possible not to replicate the creation of actor at all?

BeginPlay works for everyone, although clients from another team should not receive these actors.. Also, all variables are initially transmitted. Under heavy loads, this will greatly load the network. Can you help with anything? image BattleID(It's team name): image Players should not be aware of other battles.

Rusel2050 commented 5 years ago

I found the cause of the problem. (Second question) Multicast events reveal actor hidden for a replication.

locus84 commented 5 years ago

Yes that is default implementation of unreal network. And yes, multicast event should work to those who have that actor visible

Rusel2050 commented 5 years ago

Yes that is default implementation of unreal network. And yes, multicast event should work to those who have that actor visible

I do not know how this should work. But when using TeamRelevant and calling Multicast, Actor appears absolutely for all players. Calls its BeginPlay. After a second disappears.

This is not a problem, I will stop using Multicast. But if he worked, it would be cooler.

locus84 commented 5 years ago

Can you try spawn those team relevant actors after a player controller joined? Because there's time for actor exist and player controller is not created for the connection.

Try create the actor in the beginplay of corresponding playercontroller

Rusel2050 commented 5 years ago

I recorded a video: https://drive.google.com/file/d/1p-9DO78Fb3igGXed2ZAz4Fjo8-fYxdjR/view?usp=sharing