beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
182 stars 95 forks source link

Dynamic water (plane) level #1446

Open sprunk opened 3 months ago

sprunk commented 3 months ago

Bill of materials to be done before starting this ticket:


It would be good if the water plane height could be adjusted dynamically. This is a pretty common request but has historically been considered difficult, both to implement in engine and to workaround game-side. Currently to raise the water level by X you have to adjust the entire terrain by -X instead, which comes with its own caveats.

A water plane level getter function exists but is not used comprehensively (see #1445). The core of this ticket is a request is to pair it up with a setter, initially just for the plane, and of course expose it to Lua.

sprunk commented 3 months ago

Down the line the "always flat plane" limitation would be good to remove as well. It is way out of the scope of this ticket but it is good to keep it in mind in case it crops up when designing the implementation. The two approaches would be