megaglest-source icon indicating copy to clipboard operation
megaglest-source copied to clipboard

Feature/water waves

Open titison opened this issue 5 years ago • 4 comments

Adding simple water waves to MegaGlest. See https://forum.megaglest.org/index.php?topic=9949

titison avatar May 03 '19 16:05 titison

I've tested this patch and it works.

I made a local edit to autumn.xml in data to fill in the values @titison listed in this forum post.

here are some demo videos:

This uses the values titi_son suggested https://www.twitch.tv/videos/420122531

This uses the values waveAmplitude="0.44" waveSpeed="0.033" waveFrequency="0.8" https://www.twitch.tv/videos/420121425

andy5995 avatar May 04 '19 05:05 andy5995

waves have same size in oceans and in rivers. Titi_son and me talked about it how to fix it.

titiger avatar Nov 01 '19 16:11 titiger

Cool. I'm looking forward to it

andy5995 avatar Nov 01 '19 18:11 andy5995

waves have same size in oceans and in rivers. Titi_son and me talked about it how to fix it.

Did you decide on how to fix this yet @titison and @titiger ?

Looking at the code, it would be quite easy to make it dependent on the depth of the water. If you wanted to make it dependent on the depth and the area of the body of water (more accurate), this would be more difficult.

I think the 2 modifications I'd make before merging this is make the wave amplitude and frequency depth dependent:

  • Greater depths => smaller frequency + bigger amplitude.
  • Smaller depth => larger frequency + smaller amplitude.

This might lead to weird looking waves in rivers with a deep trench, but I think it would be ok.

Jammyjamjamman avatar Jun 27 '20 18:06 Jammyjamjamman