Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 9

Author Topic: Easy and intuitive SAND physics suggestions  (Read 35806 times)

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Easy and intuitive SAND physics suggestions
« on: May 30, 2010, 04:38:08 pm »

Tarn has commented a few times on DF talk that it's kind of absurd to think you could build a fortress, or indeed anything, out of sand.
Mining through sand, I noticed that the walls stay as rigid as any stone. I have a suggestion for sand physics which I believe can easily be implemented with just a few changes to the existing fluid system.

I don't know how to explain it, so I animated it instead:



Basically, while water stops flowing once it has leveled out, sand would stop flowing once it has reached it's "slip face." This would be a difference in elevation of, say, 2 or 3 levels. Get it?

Looking at my own animation, though, it's kind of silly to think that a miner could use a PICK on sand to make it DISAPPEAR. Instead of mining sand, perhaps you could designate a sand collecting zone, and the sand would be "mined out" by being placed into bags. Each bag would hold... 1/7 sand? Perhaps 7/7 sand? I'm not sure. I imagine it should be 7/7, considering you can make a full glass wall with it.

Additionally, this method of modeling sand could have interesting and fun interactions with water. Now, if sand is made to displace water, you could have full-fledged beaches!



If sand is able to displace water, you could have all sorts of fun... you would be able to move an entire subterranean lake up to the surface simply by pouring sand into it!

You could also have... sand dunes!



The only problem with this system is figuring out where to place the dwarves if they're climbing around on sand. I think it would be reasonable to place a dwarf on the bottom tile if standing on 3/7 sand, and on the top tile if standing on 4/7 sand. It's not perfect, and I'm not sure how this might mess up other interactions, but I think it just might work.

And how cool would it be to make a giant hourglass, or sand traps?

What do you guys think?
« Last Edit: May 30, 2010, 07:06:44 pm by Tehran »
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Safe-Keeper

  • Bay Watcher
  • "Situation normal; all ****ed up"
    • View Profile
    • FS Mod tester
Re: Easy and intuitive SAND physics suggestions
« Reply #1 on: May 30, 2010, 05:30:38 pm »

Nice graphics!

I believe the biggest problem with this kind of system is that it takes a lot of CPU power. A map with water only takes a lot of memory or processing power as it does -- adding sand physics would slow things down further, especially if you're throwing in interactions between sand and water.
Logged
"Sieging humans brought some war polar bears, and one of them started a camp fire. Highly trained!" --Today One accidentally introduces the panserbjørn into Dwarf Fortress lore

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #2 on: May 30, 2010, 05:36:27 pm »

I say its a interresting concept but i guess, as all the other liquid sim stuff, its quite calculation intensive especially if done wrong. Your animations are cool but do you have a good algorithm in mind? I ask just out of curiosity.

edit: Water is so slow because it calculates pressure and flows over big distances. The sand system could be faster since there is no pressure and  free flowing (aka dancing 7s) stuff.
« Last Edit: May 30, 2010, 05:43:04 pm by Heph »
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: Easy and intuitive SAND physics suggestions
« Reply #3 on: May 30, 2010, 05:49:43 pm »

Really, guys? You think it would be CPU-intensive? That would be a perfectly good reason to leave it out... however, I don't think it would be any more intensive than the regular water physics.

Have you ever had a lake with a single 1/7 missing, and you've got this ridiculous 6 which zips around the lake of 7's, trying to find a 1/7? That kind of thing is always running calculations, and slows down the CPU. With sand, however, that wouldn't happen. You wouldn't have to be constantly calculating anything, unless you're actively taking out sand (similar to the way you can channel upwards with ramps - it only calculates stuff one a ramp has been removed).

Of course, I have no idea how the fluid system works. And yeah, there might be some impossibilities when trying to combine a 3/7 sand and 4/7 water onto the same tile.
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #4 on: May 30, 2010, 06:12:49 pm »

The explanation for the water sim is at the end of this article. And yes pressure and dancing 7s are left out with sand but it can still generate a good amount of flowing - say if you have 3 or 4 layers of sand that flow into a cave out of a Mining accident.
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: Easy and intuitive SAND physics suggestions
« Reply #5 on: May 30, 2010, 06:20:24 pm »

The explanation for the water sim is at the end of this article. And yes pressure and dancing 7s are left out with sand but it can still generate a good amount of flowing - say if you have 3 or 4 layers of sand that flow into a cave out of a Mining accident.

Yeah, I've read that. And you're right, several levels of flowing sand would slow everything down. But as far as the CPU is concerned, there really wouldn't be much of a difference between a mining accident involving a bunch of sand and a mining accident involving an aquifer. In fact, the sand wouldn't take as long to settle because it wouldn't have pressure or seek a flat level.
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #6 on: May 30, 2010, 06:30:19 pm »

Nice animations. Toady has mentioned wanting sand and this seems like a nice way to allow piles of sand. He has also mentioned piles of bones/skulls but dev_single is down at the moment. I'd like to see piles of coins done in a similar way.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: Easy and intuitive SAND physics suggestions
« Reply #7 on: May 30, 2010, 07:02:47 pm »

Also:
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Hugna

  • Bay Watcher
  • Till the Earth!
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #8 on: May 30, 2010, 08:10:15 pm »

This makes me want to say yes, and a bit of no.

Yes, because it will give an increase in physics realism.

No because if you have nothing but sand, you can't build a fortress out of sand. However, it could be possible, by packing the sand.

Perhaps if this was added, an ability to smooth (pack) sand could be a possiblity, to help make sure sand doesn't fall, until dug into. And also to move it around, to prevent it from overflowing.

Maybe dirt physics too.

Edit: Also, maybe sand could have a VERY slow time to move if it's over 1/7. At least 3x as slow as magma.

Edit2: Another thing for people. Having a way to remove physics, each individual. So sand doesn't have physics like that, and you can even remove water physics. Or hey, being able to change water pressure physics to flood a map for fun. Or add magma physics like water pressure. :P
« Last Edit: May 30, 2010, 08:40:19 pm by Hugna »
Logged

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: Easy and intuitive SAND physics suggestions
« Reply #9 on: May 30, 2010, 08:54:24 pm »

if you have nothing but sand, you can't build a fortress out of sand.

Well then, maybe you shouldn't be embarking in the middle of a DESERT!
Actually, that would be really fun. You'd have to dig an ever-widening hole in order to get down into the rock underneath. (Surely there is rock underneath deserts. I wonder how far down you have to go?)

But yeah, Toady might have to change around the world gen a bit so that sand doesn't show up in really inconvenient places. Still, I think it could be done with just a bit of tweaking.

Quote
Edit: Also, maybe sand could have a VERY slow time to move if it's over 1/7. At least 3x as slow as magma.
I respectfully disagree. First of all, that's not how sand works. That's more like... jelly or something. Secondly, it would slow down the CPU because it would be always checking to see if the sand can move yet.
The only thing that might make sand move around after it has settled is if your dwarves start walking all over it. But that would be a royal pain because they'd track it everywhere. (I know this happens already, but it's essentially a 0/7 very thin layer of sand.) Sand dunes are also moved around by the wind, but that kind of thing, while bad-ass, would cripple your computer.

Interesting about being able to "pack" the sand to make it stand up straight.
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Hugna

  • Bay Watcher
  • Till the Earth!
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #10 on: May 30, 2010, 09:09:47 pm »

Sometimes you have to embark on deserts. However, think of the Fallout mod. If lets say, it was made to work for a version of this. All ground is almost all desert and rock. I have sand inconveniently everywhere, so yeah, the physics would screw me over with 4 perfect spots in 4 worlds. No offence.

I'm not sure how sand physics are. I never get to play with sand, or see it. The sand packing seems to keep sand from moving, which is from watching shows with beaches, as packed sand seems to stand upright, so long as water does not hit them. This would make it a requirement for someone to first move a hole into the sand, pack it, then dig-and-pack. If smoothing allowed you to pack sand right, it could stay up than move around. Maybe if dirt was smoothable, perhaps it could somehow do the same, even though it does not cave-in as horribly as sand, and caves in easier than rock. However, smoothing dirt wouldn't help anything, unless you have supports. Sometimes i wish the game has support beams. You know, like in mines.
Logged

DDR

  • Bay Watcher
    • View Profile
    • Frogatto
Re: Easy and intuitive SAND physics suggestions
« Reply #11 on: May 30, 2010, 09:37:24 pm »

Hunga: Like upports? (build menu)

With all due respect, I think a sand sim would be blazing fast. :D It only has to futz around with local flows, like miasma already does.
Logged
Il Palazzo: "Urist, quick, grab your ax! There's a troll rampaging through the decimal conversion chambers!"
melomel: DF is like OCD candy, isn't it? existent: No, DF is like the stranger in the trench coat offering the candy.

b1gb0y2013

  • Bay Watcher
  • Santa from HELL
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #12 on: May 30, 2010, 10:10:17 pm »

This makes me want to say yes, and a bit of no.

Yes, because it will give an increase in physics realism.

No because if you have nothing but sand, you can't build a fortress out of sand. However, it could be possible, by packing the sand.

Perhaps if this was added, an ability to smooth (pack) sand could be a possiblity, to help make sure sand doesn't fall, until dug into. And also to move it around, to prevent it from overflowing.

Maybe dirt physics too.

Edit: Also, maybe sand could have a VERY slow time to move if it's over 1/7. At least 3x as slow as magma.

Edit2: Another thing for people. Having a way to remove physics, each individual. So sand doesn't have physics like that, and you can even remove water physics. Or hey, being able to change water pressure physics to flood a map for fun. Or add magma physics like water pressure. :P

However, you could mix a bucket of water with a wall of sand to make it packed harder.
Logged

orbcontrolled

  • Bay Watcher
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #13 on: May 30, 2010, 11:53:53 pm »

Logically the dwarves in your third image should also be able to use that sand as a ramp.
Lets say dwarves can path through sand as long as the height changes by 2 or less per square (at an increased movement cost of course, it is sand after all).
I think the ability to control the height of floor on a tile is pretty unprecedented at this point. I would be interested to see what players did with it.

Also, walking on sand should tend to make it spread out over time.
Logged

Ultimuh

  • Bay Watcher
  • BOOM! Avatar gone! (for now)
    • View Profile
Re: Easy and intuitive SAND physics suggestions
« Reply #14 on: May 31, 2010, 12:11:32 am »

Hmm.. this ould be a neat idea but it would, as someone else said, make the game lag quite a bit.
Also, whatabout sand around a chasm or a bottomless pit? That would be.. interesting to see.. And very laggy I bet.
Logged
Pages: [1] 2 3 ... 9