Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarven Water Physics?  (Read 724 times)

Vagabond.

  • Bay Watcher
    • View Profile
Dwarven Water Physics?
« on: June 09, 2013, 09:08:24 pm »

So, basically, I want to, when I finish my base, make a dwarven water cannon that uses water flying at high speeds to throw goblins into the other wall, down a pit into lava (or do it vertically and launch them into space)
However, I have no idea how to pressurise water or have it fly out of a space half the speed of sound, and I couldn't find anything on the wiki about it, so could I get a bit of help?
Logged
If I do something incredibly idiotic, slap me.

laularukyrumo

  • Bay Watcher
  • Needs More Socks
    • View Profile
Re: Dwarven Water Physics?
« Reply #1 on: June 09, 2013, 11:08:29 pm »

Logged
Quote from: Dwarfotaur
Everytime one of my militia has given birth in the Danger Room, it's lead to instant baby smoothies for everyone.

Gotta Catch 'Em All!

Dat Sig Thread

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Dwarven Water Physics?
« Reply #2 on: June 10, 2013, 01:38:07 am »

I'm not sure how much pumps pressurize water, if that even factors into the calculations at all, but having the source of your water at a higher z-level than the output causes it to be pressurized.  Thus, a simplistic if likely not practical method is to build a reservoir at the highest z-level you can manage.  I think there's a limit built in that's somewhere around 10 levels above the highest terrain feature on your map.  If you do that, then put the output of your cannon on the lowest practical z-level, that should theoretically cause a lot of pressure.

Thing is, I'm not sure exactly how the game handles this.  I'm not sure if there's a limit on how high the pressure can go, or if the game even treats this in a manner like you'd expect.  It may well just spew water out on the z-level it comes out on and spread out too quickly to work as a weapon (that is, it may not actually produce much of a stream of water).

The minecart method would probably work better in general.  It would definitely be more immediately lethal.  I think being hit with a minecart's worth of water does pretty devastating damage now, whereas being hit by sprayed water can't hurt you directly so far as I know.
Logged
Through pain, I find wisdom.

Xinael

  • Bay Watcher
    • View Profile
Re: Dwarven Water Physics?
« Reply #3 on: June 10, 2013, 01:41:21 am »

Lmgtfy is a bit of an overreaction when a new player could easily not know or understand "minecart shotgun".

To return to OP's question, what you're asking for isn't currently possible for the most part. Water does push things around in some circumstances, but it does so by flowing, not through high-pressure firehose-like jets. There are some designs that use that flow behaviour to encourage items and creatures to move somewhere, though.

Minecarts can do something like what you want. When a minecart going at high speed comes to a sudden stop, it's contents go flying out at high speed. If its contents are water then the water will come flying out in one clump and smash the hell out of anything in the way. This is the "minecart shotgun".

By far the most common things to do with water though in terms of traps is to trap enemies and fill the room, drowning them, or to fill the room with water and then drop magma on it, casting the enemy in obsidian.

Does that help?
Logged

slothen

  • Bay Watcher
    • View Profile
Re: Dwarven Water Physics?
« Reply #4 on: June 10, 2013, 11:48:26 am »

I'm not sure how much pumps pressurize water, if that even factors into the calculations at all, but having the source of your water at a higher z-level than the output causes it to be pressurized.  Thus, a simplistic if likely not practical method is to build a reservoir at the highest z-level you can manage.  I think there's a limit built in that's somewhere around 10 levels above the highest terrain feature on your map.  If you do that, then put the output of your cannon on the lowest practical z-level, that should theoretically cause a lot of pressure.

Thing is, I'm not sure exactly how the game handles this.  I'm not sure if there's a limit on how high the pressure can go, or if the game even treats this in a manner like you'd expect.  It may well just spew water out on the z-level it comes out on and spread out too quickly to work as a weapon (that is, it may not actually produce much of a stream of water).

The minecart method would probably work better in general.  It would definitely be more immediately lethal.  I think being hit with a minecart's worth of water does pretty devastating damage now, whereas being hit by sprayed water can't hurt you directly so far as I know.

Pumps would be best.  In terms of pressure, for each pump that's fully supplied with water to its intake square every frame, thats one 7/7 cube of water placed every frame.  The concept behind magma/water cannons is that they place a LOT of 7/7 cubes every frame, and if done over empty space, will place water/magma out in space faster than it will fall to the earth.  The game's concept of pressure is just how high (z-levels) that water will be allowed to path to (if it behaved like actual pressure you wouldn't need 100 pumps for a magma pump-stack).  In that sense, pressure is limited only by how high the water source or pump is.  On the same z-level though, several pumps behind a 1-wide corridor will fill that corridor in seconds, but of course once things are submerged in 7/7 water, there is no longer any pushing that occurs, so instead of blasting invaders out, they'll most likely just drown while the water magically moves about them without pushing them.  There's a detailed discussion (with links to more detailed discussions) in my sig.

In practical terms, you can use moving water to kill things.  The simplest is a 1-wide ledge with water held on one side and empty space on the other.  You pull the lever, and water knocks them off.  You can do wider ledges, but the empty space (provided there is adequate drainage) will make sure the water flows off the edge, taking creatures with it.  More often than not though this results in explosions of water that overwhelms the drainage system, resulting in drowning instead of falling.  Its just as effective to let the water trickle out in 3/7's and 4/7's, although in-game this is still a sizable wave.

There's one more way to weaponize high velocity water that I recently saw, and it involved minecarts filled with water hitting their max speed and somehow stopping.  The result is a dense 'glob' of water flying at max-speed, crushing anything in its path as a projectile before being converted back into liquid water.
« Last Edit: June 10, 2013, 11:49:57 am by slothen »
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku

Crashmaster

  • Bay Watcher
  • CARP, Canada's new helth care plan for the elderly
    • View Profile
Re: Dwarven Water Physics?
« Reply #5 on: June 10, 2013, 12:13:49 pm »

I believe the greatest water 'pressure' (if by 'pressure' you mean the rate at which water fills the new area) is achieved by having maximum surface are at the top of the water source. An Ocean can fill an entire fort in a couple frames since (I think) the top level of the ocean water tiles will all try to teleport to the breach right away.

Pretty sure anyways...