Fluid dynamics - death to water tile?

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
Post Reply
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Fluid dynamics - death to water tile?

Post by Emdek » 12 Jan 2013, 11:56

This topic was extracted form here.

As discussed on IRC it could be good idea to explore possibility of ditching water tiles (not completely, to be backwards compatible) and going for simply setting sea level, or something like that. But it wouldn't be able to satisfy all users since it would mean end of individual levels for different water bodies. And making individual sea levels would be insane.

So the only idea that I could think of would be to add some kind of fluid dynamics to game engine, so we could get it done right. Then we would first create terrain and then use some tool to spill specified amount of water to specified place and let it filling so long as we get body water that we want. Which such system we could get "natural" water flow, proper rivers and waterfalls (by defining sources producing water at specified rate and kind of black holes to consume it, to avoid floods ;-)).
Such thing would require lots of work and change way how maps are done but would give lots of possibilities, just imagine scenario when you must fight with enemies to control shrinking land area due to progressing flooding or maybe even things like enemy destroying dam to generate tide to destroy enemy base (I was always curious what would happen if we would be able to destroy that dam in beta campaign). :-D
Also we could add ability to specify (maybe also predefined as sets, at least on map editor level) fluid transparency and color, or texture and particles for surface (water? who said water, I want acid and lava! ;-)). Maybe also density, that could impact naval bodies speed?
One more thing that could be cool, ice, especially if we would get full support for weather conditions.

There are also open questions, like what should happen to submerged structures (except that they should stop functioning after turret is submerged), should they be damaged only or completely destroyed (that would be most convenient, with custom animation, so no fire underwater ;-))?
What should happen to them in case when water level would drop and they would be no longer submerged, would they need to be repaired first or automatically become operational (but keep previous damage, just like "touch to make them alive again")?
Or how to deal damage in case of tide (completely destroying structure wouldn't be natural enough), trying to calculate pressure from given amount of fluid?
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Fluid dynamics - death to water tile?

Post by Shadow Wolf TJC » 12 Jan 2013, 15:24

What about keeping the ability to set down sea tiles on different heights intact, and adding a special brush that manually adjusts the height of the sea bed, that overrides any automatic height adjustments made to the sea floor?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Fluid dynamics - death to water tile?

Post by aubergine » 12 Jan 2013, 15:33

In terms of water and map making, one of the best map editors I ever used was in a game called Stronghold II by Firefly Studios.

Here are some screenies from one of my maps in that game:

Image

Image

Image

Image

Image

Image

Image

I could go on posting pics all day. Anyway, the way they implemented it was similar to what NoQ is doing- you'd paint water tiles and then the seabed or riverbed would be lowered automatically.

What made their water look so amazing, was the extra things you could do:

* You could paint the seabed tiles under the water. So you could paint them darker to make water look deeper, or make it look like there was seaweed, etc.
* The tile painter was like an airbrush, example: you could take a black brush and keep clicking to make the original ground under water darker and darker until it eventually became black
* You could overlay animated effects such as: waves crashing against shore, ripples (like in the dark water image above), waterfalls, splashes, mist (eg. at bottom of waterfall), etc. There were even flow effects that you could put on water tiles, that would give the impression of the water flowing in different directions, eg. so it looked like it was flowing round a boulder in a river (basically, rotating the water tile, but with more granular resolution (quarter tiles)).
* There were also two types of water: Freshwater and sea water. Fresh water was best suited to rivers, ponds, lakes, etc. Sea water was ideal for vast expanses of water - it was automatically darker and had more pronounced waves, and different units were required to cross it.
* You could add sound effects by placing special objects on the map (only visible in map edit mode). This meant that you actually heard rivers, the ocean and waves crashing on shore.
* You could add some animals, like birds, deer, stalks, etc., that you might expect to find associated with the water and terrain.

Having programmatical water as described by Emdek would be awesome, but if we can't get it maybe we can use tricks like those found in Stronghold II? At least then we could make water features look more awesome.
Last edited by aubergine on 12 Jan 2013, 17:30, edited 1 time in total.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: Fluid dynamics - death to water tile?

Post by Rman Virgil » 12 Jan 2013, 16:06

.

Aubergine, your image hosting seems to require permission on my end....

.
.

Impact = C x (R + E + A + T + E)

Contrast
Reach
Exposure
Articulation
Trust
Echo
.

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 12 Jan 2013, 16:28

Yeah, also no images here.
Well, we need to decide if we want to continue faking this or make it properly, once and for all. ;-)
Surely it would be easier to fake some basic things, but possibilities will be much smaller and moving away from it far harder.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Fluid dynamics - death to water tile?

Post by aubergine » 12 Jan 2013, 17:35

Moved images to my wiki, should be appearing in post above now.

Having proper water system would be certainly cool, bursting dams, rescinding islands, floods, etc. And it could be tied to weather system, so that the more it rains, the more water starts appearing on map. If your base gets flooded, tanks can't come out of factories unless they're using hover propulsion, etc. Huge scope for very varied gameplay in campaigns and challenges.

But for the current map system, I think the stuff NoQ was working on, with addition of being able to paint the land tiles below water (eg. to use different texture in deepest parts), will be a big visual improvement on current maps.

For real water, maybe it's worth creating a v3 map format, whilst retaining v2 for backwards compatibility, and maybe even a new renderer? It would be awesome if it was possible to properly paint the terrain, not just with textures but also with tint brushes (like in SH2 images above).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 12 Jan 2013, 17:38

aubergine, new map format is needed anyway, I have nothing against use of height maps for underwater terrain, but just find it not enough. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Fluid dynamics - death to water tile?

Post by aubergine » 12 Jan 2013, 17:50

BTW, for sound effects, we should already be able to do that in theory. Would need some way to have something visible in map editor but not visible in-game, and it would basically be a special feature that emits sound (in much the same way power gens or derricks emit sound) for a given radius (getting quieter the further away you go until volume hits 0 at the circumference). In SH2, you could also attach an audio feature to a map object, for example put it on a tree to create some forest sounds (birds chirping) and if the forest was destroyed the sound stopped when that tree was removed. See also: Proposal for new 'audio.ini'.

@Emdek: Yes, I agree, real water effect would be awesome. But for current map format, if we could make water better using NoQs approach that would make existing maps look better without needing to mod them. And, if we could allow painting of tiles below water, that would allow even more design options with current format.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 12 Jan 2013, 18:06

aubergine, sound sources? Why not. But probably those should be fully scripted, or at least optionally controlled by script bundled with map. "Static" source has less uses. ;-)

About water on maps, in simplest version it is simply eliminating water tiles, in case of NoQ proposal you need to paint tiles there anyway, but instead of explicit water tile you would need to specify amount of water to be spilled in specified area (done with graphical aid in map editor).
For now implementing NoQ approach is better than current state, but not enough to cover all possible uses (but surely enough to make navy useful, when we will also get support for map defined bridges, ability to build them could be added later).
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: Fluid dynamics - death to water tile?

Post by Goth Zagog-Thou » 12 Jan 2013, 18:36

We're almost talking new game engine .. or a full-on massive rewrite of the existing one.

I agree with keeping it simple. We have the game handle the water stuff, and we simply mark out where water starts (like current), but the game takes liberties and paints the nice new water. I like the element of randomness since it's more closely like real-life.

I still have the dream of all tilesets being available at once. ;)

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 12 Jan 2013, 18:44

Goth Zagog-Thou, my approach is also simple, at least from user perspective, since all "hard" things are to be done by engine. User would only need to setup height map (already required, except seabed) and then "spill" some water in specified place (doing that until it will get desired shape etc.). In advanced cases user could also specify water "sources" and water "consumers" to make it dynamic (flowing rivers, waterfalls, non constant water level etc.).
And of course all of that with backwards compatibility for current approach.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Fluid dynamics - death to water tile?

Post by Shadow Wolf TJC » 12 Jan 2013, 23:30

What NoQ is doing now is not only simple, but more importantly, it has NO known effect on the existing gameplay. Sure, the height of the sea floor has changed, but like the new terrain renderer that was introduced for version 3.1, it doesn't change how missions, multiplayer, skirmish, etc. play out.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 13 Jan 2013, 00:51

Shadow Wolf TJC, yes, as long we don't have (officially) navy those changes are only aesthetic (plus consistency, since seabed is no longer random), but required for that feature. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Fluid dynamics - death to water tile?

Post by Shadow Wolf TJC » 13 Jan 2013, 17:10

I forgot to mention earlier that what NoQ is doing now has a very high chance to be backward-compatable with older maps. On the other hand, I have trouble seeing how Emdek's proposal would be backwards-compatable.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Fluid dynamics - death to water tile?

Post by Emdek » 13 Jan 2013, 17:59

Yeah, that should be purely backwards compatible.
Anyway, we will probably need some kind of physics library sooner or later anyway (not only in case of this idea) if we want to progress. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

Post Reply