Announcement

Collapse
No announcement yet.

[RESOLVED] Multicast Messages using different roles depending on distance?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] Multicast Messages using different roles depending on distance?

    I am experiencing a very odd problem where, depending on how far away the other player is, the listening player will miss a client-side multicast message. My project is multiplayer using a dedicated server. I'm currently using v21.2. I set up a very simple test to try and identify what is going on.

    The test: Two players in the game. The instigating player calls MakeNoise() on the server. The server then Multicasts MakeNoise_Multi() to the other player. The multicast function is set to Reliable.


    RESULT 1 - The following messages were captured on the instigator and listening player - the players are standing < 1000 units from each other:
    • The listening player receives the multicast message using Role == ROLE_Authority - I ignore this since it's on the server
    • The listening player receives the multicast message using Role == ROLE_SimulatedProxy - I play the weapon sound here!
    • The instigating player receives its own multicast message - I ignore this on the owner since I handle local sounds differently

    RESULT 2 - The instigating player and the listening player are standing > 15,000 units apart. Instigator fires rifle and multicast event from server:
    • The listening player receives the multicast message using Role == ROLE_Authority - I ignore this since it's on the server - same as above
    • The instigating player receives its own multicast message - I ignore this on the owner since I handle sounds locally - same as above
    What happened to client message using ROLE_SimulatedProxy? Why would the distance between the two players result in a missed client side call?

    As with most things in UE4, I am quite sure I am doing something wrong or misunderstanding networking roles. I'm hoping someone can assist me here.
    Last edited by CashCache; 12-09-2019, 08:17 PM.

    #2
    I finally figured out what the issue is. Actors have a couple of replication settings that determine when an actor is "Network Relevant" and when it isn't. By default the Network Cull Distance Squared is 225,000,000 - which just happens to be 15,000 UE game units - the exact number of units between my players in my testing.

    Two options: increase the NCDS to something greater or check the Always Relevant checkbox to remove the limitation completely. Since sound is a big part of my game, I chose the latter for my players, but it is something to consider since this can add significant overhead in bandwidth and CPU usage on the server.

    Comment

    Working...
    X