@alpharock6 Here are some additional details concerning the wave generation.
We start by defining a line of points with a uniform x-spacing and random y-offsets from each other. This is our base wave. Every so often, a new target wave is defined. We then slowly morph our base wave into our target wave and display that. Once our displayed wave is exactly the target wave, we define it to be our new base wave and we generate a new target wave, etc. That way, we have something dynamic. We can control how fast we morph between waves and how large our random y-offsets are allowed to get. We use this to simulate weather effects on the water.
We generate a polygon based on this line (and update it constantly) to simulate the wave. Entities movements are constrained to the line (for the most part).
Of course, such a line hardly resembles a wave (sharp edges everywhere!). In fact, we use it as a basis for generating a Bézier curve, aka an easy way of obtaining actual curves. Bézier curves are defined using a set of position points alongside a set of control points. The position points are points through which the curve is forced to pass and the control points allow us to control how the curve behaves between these points. We are not very creative with control points for now, we could get some interesting wave shapes by putting less restrictions on them (we always define the pair of control points of a given point to form the same angle as the line going from the previous point to the next one).
Also, we don't use one wave but two that are swapped every so often (when the ship is on wave A, we can generate wave B and place it at the end of wave A; once the ship has reached wave B and can't see the end of wave A/beginning of wave B anymore, we can regenerate wave A and place it in front of wave B, etc). We have to take precautions so that the waves line up and have a continuous derivative at the transition point (in other words, they should line up smoothly). We really should be using only one wave and updating it continuously as it would be easier and more efficient, but we did not find the time to make such a change to the architecture once it became relevant.
We make use of shaders to add detail to the surface of the water (smaller waves), without any impact on entities movement.