Question About Replication

Heyo. Firstly, I’d like to start by saying that I know how the fundamentals of replication work and I know how to implement it into my game. With that being said, I want some feedback and-or advice when it comes to replicating objects or player actions. I will try my best to visually express this so that you may be able to understand my thought process.

Alright, so I have thought of two methods for this. Here they are:

This is a short video of how it sort of looked from before I started restructuring to give a better idea on what I am talking about.

Method 1: Replicate

In the image below it shows a mess on the ground which is replicated to all players in the server, rendered client-side.

Now for my game, I cannot reveal too many details just yet to avoid competition… however, the object in the image is a spill, a spill which can be cleaned. Since the objects are rendered client-side, it would make sense to only run the visuals for the client who is cleaning it. However, this removes the realism. One main issue with doing this is since the system is built and planned on value based cleaning from 0-100%, this creates an issue with replicating this visual to other players as the person cleaning can stop cleaning before 100% causing more remotes to be fired. Now while I do not intend to remove the value based cleaning, this caused many remotes to be fired. There will be cooldowns, but this still expresses the issue with many remote firing for such a small visual with the cleaning duration to most likely to be a maximum of 3 seconds. I hope this gave enough context.

To clarify, this effect is not something that is crucial to gameplay but rather for what other players will see when you are interacting with objects which may be seen quite often but possibly not be looked at by the majority.

I would provide more images except I am rewriting the system to be more interactive with keybinds and mouse inputs but I wanted to plan out this part before I took the first step into it.

Method 2: Fake it

Well, this is pretty self explanatory, render a new set of messes for each client and run all of the visuals only for them and them only.

Please let me know if you have any questions. This is more of a question of whether I should go with the more performant option rather than the easy way out which eliminates realism.

Thank you for reading this, apologies for the length. I just wanted to be thorough with my speech.

Are remotes being fired for 1%-100%? Like it updates every time the value changes?
I assume you can do a “Start Cleaning” remote and a “Stop Cleaning” remote and the server tells other clients to do the visuals until told to stop (I assume. Would have to track what spill is being cleaned by what player and send that along).
Otherwise you can try keeping remotes to only occur after certain points (25%, 50%), but I don’t know how much better that’d be.
Maybe you can just store the percentage of each spill on the server and update it visually or however to clients when they come close enough.

1 Like

Hey thanks for your response. To answer your first question, no they are not being fired every value, only when the player presses an input and it validated on client then it goes to server to verify and sets the ownership of that mess to the player and send back to client allowing them to animate the object. However I have found a new way of doing it.

So basically what I’ll end up doing since it wont need to be 100% accurate is I will create events on client for a bool value stored on server within an attachment (which tells the client where the object really is) and when the object’s bool changes, then it will start cleaning. This way it can remove the use of multiple remotes and will eliminate the delay time from server to client.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.