Download

Network Fun - Replication Clarification

Here’s a quick question, maybe someone can give me an analogy to help solidify my understanding of things. My blueprints are working, but I’m not sure about what happens when a third client would join. Would they get the proper replication? Am I doing too much or too little work, logic wise?

If I have a Host and Clients networked game in which the host can also play, is it proper to follow this logic, or am I doing extra work?

**Host: **Multicast own actions for all clients (custom events)

**Clients: **Run action locally for client, Run on Server to replicate same actions on server (custom events), then broadcast (Multicast) actions inside the “Run on Server” action to replicate to all clients (custom events).

I’m not entirely sure I need to add the extra step in the “Run on Server” event from the client to Broadcast the changes, but I know that without adding the action locally, it was only happening on the host (server) game instance.

I would just test this theory myself in this project, but it’s tied to steam and I don’t have a third steam account to test. :stuck_out_tongue:

Any input is welcome. Thanks!

For a Listen Server, you need to test with two clients plus the Listen server player (which is a kind of super client). So 3 clients minimum… The threads below might be of interest in terms of understanding the differences between a regular client and the host. But you need to test all of this out in practice and in isolation, there’s no escape for that. So try to compartmentalize the subsystem code from everything else (temporarily disable it). As regards your other points. It was too vague to offer advice, but I suspect you have a few months of learning ahead… :wink:

https://forums.unrealengine.com/deve…92#post1842692

https://forums.unrealengine.com/deve…-has-authority

https://forums.unrealengine.com/deve…rews-up-client

I’ve found a simple way to test it without actually messing with the subsystem. You’re definitely right that it will require some testing with a minimum of a listen server and at least 2 other clients.

I was hoping the level of specificity was enough to get a “you’re on the right track, buut” or “you’re right on the money, but here are some things to consider”

As you’ve mentioned in these threads, multiplayer is definitely a mindf**k. Some tutorials are actually pretty solid, but honestly… every single one is different, and the way I’ve had the most success is actually taking the example third person character controller from unreal that has replicated animations and movement, and I’m modeling my character animations off of that, with some modifications.

To be more specific, I’m actually trying to replicate custom animations with input actions (like jump or sprint) and those direct actions seem to need to be setup with some multiplayer magic due to player input.

The unreal third person character has jumping and running replicated using “automated” triggers based on velocity which automatically replicate for all players.

Crouching, Prone, Sprinting actions and their animations all need to be replicated unless there is an “automated” way to change these animations with velocity triggers and other things, but I feel that would just get complicated.

Thanks for the links, I’ll keep testing in my little 3 box environment and do my own tests. Maybe one day I’ll plague YouTube with my own videos on how to setup a networked game terribly. :slight_smile:

I really stoped using multicast for the reason that: You can simply iterate playerControllers and play a Client side Custom event.

repnofify pattern anyways it is really perfect to get something really good going on :eek:.

Well, what do you mean by that? If I have 3-4 players, wouldn’t I require multicast? Or are you saying I should use RepNotify so all clients to act on their own based on that?