MegaGlest Forum
MegaGlest => Feature requests => Topic started by: titi_son on 23 March 2017, 15:15:06
-
I just tried if it's possible to add some simple (sinus) waves to MegaGlest to make the water a little less "static".
This is what i came up with until now:
https://youtu.be/t6vFBpFE35Y
Of course sinus waves arent very realistic but they wont have a great effect on performance like this (also i am lazy ;) )
It would be great though if a big water area has bigger waves than a river has, but i am not sure how to differ a river from an ocean. And maybe some splash effect on hills or something.
But for now i think this would be a nice addition to make mg look greater without great effort. (Really. its a change of ~10 simple lines in the code :D )
One thing i could add would be to have waves from other directions. At the moment the waves always come from east.
What do you guys think about it?
Do we want to have options for that in the tileset? or in the map editor? or just activate it on all maps?
Does anyone have ideas how to improve them without great performance loss?
-
i think this is a great addition, and that it comes at a small cost is even better!, Good job!, Can we get this in SVN asap please people? ! XD.
-
Can we get this in SVN asap please people? ! XD.
SVN? What year is it? :P
-
Before i can make a pull request for this, i need to know how to implement this the best way.
Should there be options in the tileset? or should a mapmaker decide whether to have waves or not? or do i just activate it on all maps?
Or make a default setup which can be overridden by the tileset or map?
-
It makes sense to have it turned on/off by a switch in the tileset. Some tilesets want big choppy waves while others want calm smooth water.
It would be awesome if there was also a value to control the height of the waves for bigger/smaller waves.
Glad to see someone finally did something to improve the water in MG :)
-
This is awesome :thumbup:
I actually think they look subtle enough that they would work in any tileset. I wouldn't worry too much about adding a switch, but an on/ off switch could be added to video settings.
As wciow was suggesting, it would also be nice to be able to modify the waves in the tileset e.g. by adding extra attributes to the <water> tag:
<parameters>
<water effects="true" height="1.4" wavelength="5.3" speed="0.5">
....
</water>
</parameters>Where height is the amplitude of the waves, wavelength is how big/ small the waves are and speed is how fast they propagate.
-
Pull request is open https://github.com/MegaGlest/megaglest-source/pull/187 (https://github.com/MegaGlest/megaglest-source/pull/187)
Syntax is the following
<tileset>
<parameters>
<water effects="true" waves="true" waveAmplitude="0.14" waveSpeed="0.013" waveFrequency="0.4">
</water>
</parameters>
</tileset>I did not limit those values, but frequencies over 1.0 do not look good (they even look buggy sometimes).
This is because i do not adapt the vertices of the water (which would obviously also slow down performance and cause other issues)
I decided to not implement any options in the option menu.
-
Very cool Indeed!
I hope it will be merged soon,
bit off-topic: are you going to get into coding MG as well? ;)
-
I applied the patch locally and made a couple demo videos (https://github.com/MegaGlest/megaglest-source/pull/187#issuecomment-489296986).
-
The videos look good :)
-
bit off-topic: are you going to get into coding MG as well? ;)
Well i think i wont start active development. Sorry to disappoint you :P
But i always made some additions to the code.
For example the health bars, blocking units in scenarios and the Uniformselection (this is why you can select multiple buildings)
I just sometimes have an idea or read a great feature request and if i am in the right mood i'll try to implement it.