Replicated water

Hi,

I’m looking for a solution for a water plane with gerstner waves that is 100% replicated. All clients must see the exact same ocean.
Any input on how to solve a problem like that?
Any good assets that is already doing it?

All help/input/ideas are greatly appreciated.

To replicate the waves, you could just synchronize the starting server time and send it to the clients to compute all the waves based on this time.

Example: server start at “Fri Dec 18 2020 16:36:57 GMT+0000”
So each client compute the time elapsed from this time (for example 14853.5468 seconds) and will get the exact same waves (considering those waves are computed procedurally according to time).
You may also synchronize time from the server so that one client is not 10s late for example.

Thank you for your answer.
That is fine for the base case
I forgot to mention that the sea also needs to be server controlled where the server is sending wave parameters to the clients.
Changes on the server needs to be the same for all clients.

Doesnt matter.
Gerstener or any wave works only off of one truly meanigful parameter. Time.
if you sync time the values you "fish"out of your cpp function (for x and y loc) will match whatever the server calculations have, since its the same math.

what you dont do, is send the computed informarion out.
in that case the game will almost always be out of sync due to lag.

So essentially, just have all the clients double-check time and meaningful parameters - amplitude and what not, or get them periodically from the server.
then pretty much everything will always be in sync. Unless someone makes a client that skims time.

We are trying to switch an old system (a simulator) to the unreal engine.
And I was told that the way they used to do it was by sending the wave spectra, then calculating the surface with an inversed fft.
Im sure that with the Unreal Engine, there are some good ways of having a sea that all parameters are controlled on the server and quickly replicated to all clients.
I will experiment with the time replication and see how far I can push that

You should use a synchronized “Network Clock”. Servers clock is authoritative, clients sync to it.