Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Physics and Fortress Building  (Read 1038 times)

anubite

  • Bay Watcher
    • View Profile
Physics and Fortress Building
« on: March 08, 2010, 03:31:35 pm »

I've been getting adventurous with my fort building lately, but I'm a little confused by how the physics in df works.

If I, for instance, build a huge tower with metal supports as a base and connect them to a lever, would the tower collapse if I pulled the lever? Would I only need to disable a few to make the tower crumble? Or all of them? A basic idea of what I'm thinking, only with the supports a few levels up:



Attached on the side will be a few peripheral towers, if I disable the supports, will those towers hold up the main one? Or will the game calculate the sudden mass of the "hanging" tower and cause attached structures to crumble? I think the latter is unlikely, that the peripheral towers will hold up the tower, no matter how big it is. I've heard you can make up-side-down pyramids with df, so I wouldn't be surprised if the physics part of the game allowed for such an occurrence.

My idea behind this fortress is that I want to create a huge tower which can collapse for people who explore it in adventure mode. If you're too greedy, pull one too many levers and step on one too many pressure plates, you'll realize that the tower you're in is slowly losing pillars to support it.

So can anyone suggest some ways for this to work? I've not really explored the physics of fortress building - if I make an upper level collapse, how much damage will I expect on the floors below it? Will it just take out the immediate floor below? Or could it potentially destroy the whole tower, if just a single floor collapsed? How much time would a player have to act when the tower starts collapsing?

Actually, I haven't even tried disabling supports yet. I noticed you can link them to levers, so I assume you can turn them off and rob a tower of support, but would that be enough to take it down? Would the game even realize that the supports are gone? Could you create a castle in the sky, so to speak?
« Last Edit: March 08, 2010, 03:34:10 pm by anubite »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Physics and Fortress Building
« Reply #1 on: March 08, 2010, 03:51:22 pm »

A single support can hold an infinite amount of weight, so your tower will remain standing until every one of the supports have been removed.  It would be possible to build some kind of mechanical or water-based logic engine to detect if more than a certain number of a given set of levers had been pulled and then trigger the self-destruct sequence based on that.

A collapsing wall or floor will continue downwards and destroy any floors or buildings in its path.  Walls, either natural or constructed, will not be destroyed by cave-ins falling on them.  Falling constructed walls or floors will deconstruct into their raw building material as they fall.

Cave-ins are essentially instantaneous, so the adventurer will have essentially no time to react.  What you could do if you were really clever would be to have a structure which collapses in segments, with timed mechanisms based on logic engines to control the collapse sequence.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Shrike

  • Bay Watcher
    • View Profile
Re: Physics and Fortress Building
« Reply #2 on: March 08, 2010, 04:00:01 pm »

Torque and center of mass do not exist in DF. A single wood support can hold up a lead/gold/steel/ stockpile plus whales.
Logged

anubite

  • Bay Watcher
    • View Profile
Re: Physics and Fortress Building
« Reply #3 on: March 08, 2010, 04:18:58 pm »

Thanks.

So if in my example, the whole top floor goes, I can expect all the floors below to be destroyed, provided they're basically symmetrical?

And will it really be instantaneous? What if I make the tower massive? Even if the player can't react, I'd be nice if he had a second or two to realize what was happening before the inevitable came.

Logic-based stuff sounds cool, but a lot of work, especially since it'd be hell to bring water up high enough to do that kind of stuff.
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Physics and Fortress Building
« Reply #4 on: March 08, 2010, 04:44:31 pm »

Falling floors will punch through all floor below them, until they hit a natural or constructed wall, which will stop them.  Although you can rig up a multi-stage collapse where floors collapse and destroy other floors that then remove the support for the walls, causing them to collapse, possibly triggering additional collapses as they slice through floors.

I've never experienced a cave-in as an adventurer, but in fortress mode they seem to happen instantly, even faster than the normal rate of falling objects.

As for bringing the water up, you don't need to.  You can have a lever or pressure plate high in the tower linked to a floodgate deep underground, letting water gradually fill a chamber.  Pressure plates at different levels in the chamber can then be linked to supports up in the tower.  All you need is a source of water, and it's not like you're worried about the device working more than once.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Physics and Fortress Building
« Reply #5 on: March 08, 2010, 09:56:39 pm »

Actually, having performed a few cave-ins when making my "water tank" for a particularly high-elevation subterranean river, I can say I've seen them collapse non-instantly.

They ARE, however, very fast.  I think they work by dropping one floor per step/tick. 

Cave-ins also produce dust clouds and fling objects.  This is what killed some of my dwarves, in fact, because the channeling they did cause a dust cloud that flung them off the ledge they were standing on, plummeting down 22 z-levels to their doom.  Objects like stones will actually be flung somewhat upwards, as well, if they aren't squished and immediately destroyed by falling floors from above.  This meant that after my dwarf fell to her doom, her arms and legs and head bounced about the chamber before coming to rest, then extra stones fell down, burying the body.

Anyway, you're mistaken if you think you need to put water-based timing mechanisms anywhere near the things they control.  Mechanisms work by plain-out telepathy.  They require no connection to the large, heavy objects they move, and no power, either.

I would suggest making your tower have small segments that collapse one at a time within the tower itself, so that individual floor tiles may fall away, one at a time at first, then a few at a time, then whole segments of the tower, for that nice, cinematic effect.

The easiest way to do this is to set up a pump (or even just a floodgate or door) near a large enough source of water, a long channel, and line that channel with pressure plates.  Each pressure plate along the line would trigger the support to fall away as the water went down the channel.  Provided the water is not pressurized, this shouldn't even be terribly quick, giving the adventurer time to make an Indiana Jones-type escape.  (Set stones around collapsing parts, so that they come falling down as your adventurer tries to escape with his life.)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

anubite

  • Bay Watcher
    • View Profile
Re: Physics and Fortress Building
« Reply #6 on: March 08, 2010, 10:29:18 pm »

The easiest way to do this is to set up a pump (or even just a floodgate or door) near a large enough source of water, a long channel, and line that channel with pressure plates.  Each pressure plate along the line would trigger the support to fall away as the water went down the channel.  Provided the water is not pressurized, this shouldn't even be terribly quick, giving the adventurer time to make an Indiana Jones-type escape.  (Set stones around collapsing parts, so that they come falling down as your adventurer tries to escape with his life.)

Awesome idea, I think I'll try this. Thanks. Will definitely be epic.
Logged