megaglest-source
megaglest-source copied to clipboard
Feature/water waves
Adding simple water waves to MegaGlest. See https://forum.megaglest.org/index.php?topic=9949
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
waves have same size in oceans and in rivers. Titi_son and me talked about it how to fix it.
Cool. I'm looking forward to it
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.