Bay 12 Games Forum

Please login or register.

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

Author Topic: 14/14 total depths per tile.  (Read 2105 times)

OcelotTango

  • Bay Watcher
    • View Profile
14/14 total depths per tile.
« on: February 07, 2010, 07:09:14 pm »

Hello, I'm new to the forms, but I have been playing Dwarf Fort for a while.

I see many suggestions asking for things like depth in snow, and sand dunes, better water simulation, and more dynamic above ground features. A way to implement this would be to add another depth layer to each tile. So instead of a tile holding 7 units of water / lava, it would have 14 units of anything with a unit value, with 7 of the 14 tiles being removed upon digging.

The advantage this has is that it would be easier to model erosion, due to the fact that you can have the stone where water has been flowing for a while have less depth than the normal 7, eventually digging a channel to the next level, starting with a stone layer filled 14/14, and repeating the process.

This system would also allow sand dunes to form if wind was present. Sandy ground could have 2 or 3 / 7 on top of a more compact layer of sand below, letting some of the excess sand on top be moved by the external forces, like wind, water, or even dwarfs.

Snow could also work in a similar method. Once it had filled up 7 squares worth on the ground level, dwarfs would be able to dig into it, letting them dig about in the event of a blizzard. Snow would also be able to drift. Ice could form layer by layer from the top down, rather than just all at once.
Logged

opsneakie

  • Bay Watcher
    • View Profile
Re: 14/14 total depths per tile.
« Reply #1 on: February 07, 2010, 09:24:20 pm »

I like the idea, but I'm a little confused as to why this couldn't be done with the existing 7 depths, and maybe a bit of time-based code for erosion. Maybe I'm missing something though?

I would love to see sand and snow floods that you could dig out.
Logged
Collosal bronze man
With titanic strides he comes
Dwarves he will harvest

DF Twitter

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: 14/14 total depths per tile.
« Reply #2 on: February 07, 2010, 09:44:18 pm »

I think seven is the number solely because it can be a byte.  I'm no computer scientist but adding more than that for each tile would make maps a lot larger, storage and calculation-wise.
Logged

Asteranx

  • Bay Watcher
    • View Profile
Re: 14/14 total depths per tile.
« Reply #3 on: February 07, 2010, 10:02:34 pm »

I think seven is the number solely because it can be a byte.  I'm no computer scientist but adding more than that for each tile would make maps a lot larger, storage and calculation-wise.

This is likely correct, though not exactly for that reason.  First off, the number isn't 7, it's 8, since there are values between 0 and 7 inclusive.  That's not a byte, but it is the maximum range representable by three bits, which are easy to compress and isolate using some bitwise math.

I actually tend to believe it's four bits, where the extra bit is the type of fluid in the tile (water or magma).  The remaining four bits (or more if it's a chunk of a larger integer) could actually store other yes/no details such as such as the tile's visibility, whether or not it's been dug out, whether or not its floor has been dug out, etc.
Logged

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: 14/14 total depths per tile.
« Reply #4 on: February 07, 2010, 10:17:57 pm »

That's what I meant top communicate, though I was too lazy to type it out since I'd just gotten off work and am a bit loopy.

But yeah, adding numbers doesn't add much gameplay I don't think, but adds a lot of storage and computation size.
Logged

OcelotTango

  • Bay Watcher
    • View Profile
Re: 14/14 total depths per tile.
« Reply #5 on: February 07, 2010, 10:25:33 pm »

Yeah, I'm not really well versed with coding, and the technological aspect of implementing this.

Also, it doesn't have to be 7, I just picked it because the current 1/7-7/7 system is pretty clear. Honestly it could be a 1-3 for the ground level , and 1-7 for the top layer, or whatever would produce the best effect with the least effect on the games performance.

It would be nice if you had a total space in tile of whatever, so if a tile had less ground in a place it would be able to hold more water, and the like. But now that you mention it, I dont know how much impact this would actually have.

The main point of this post is that it would be cool if certain solid things could behave like liquids to a certain extent. Like sand, or snow.
Logged

Safe-Keeper

  • Bay Watcher
  • "Situation normal; all ****ed up"
    • View Profile
    • FS Mod tester
Re: 14/14 total depths per tile.
« Reply #6 on: February 07, 2010, 10:28:59 pm »

I'm not sure what you're asking. If you want liquids to be able to fill more than one z-level, they already can. If you have, for example, a reservoir three z-levels deep and the lowest level is filled to the brink (all 7's) and you add more water, it will start filling the next z-level, starting on 1. Like this (side-view):

|000000000|
|000000000|
|000000000|
|112122212|
|777777777|

In the pic above, the water level is 8 to 9 (7+1 and 7+2).

If I've misunderstood you, please correct me.
« Last Edit: February 07, 2010, 11:29:20 pm by Safe-Keeper »
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

Vieto

  • Bay Watcher
    • View Profile
Re: 14/14 total depths per tile.
« Reply #7 on: February 07, 2010, 11:37:54 pm »

I'm not sure what you're asking. If you want liquids to be able to fill more than one z-level, they already can. If you have, for example, a reservoir three z-levels deep and the lowest level is filled to the brink (all 7's) and you add more water, it will start filling the next z-level, starting on 1. Like this (side-view):

|000000000|
|000000000|
|000000000|
|112122212|
|777777777|

In the pic above, the water level is 8 to 9 (7+1 and 7+2).

If I've misunderstood you, please correct me.

he's basically asking for:
1. things like sand and snow to have depths and to  be able to be moved around by wind and accumilate
2.rock layers to (to an extent) behave like this, for purposes of erosion.
Logged

Nikov

  • Bay Watcher
  • Riverend's Flame-beater of Earth-Wounders
    • View Profile
Re: 14/14 total depths per tile.
« Reply #8 on: February 08, 2010, 12:13:54 am »

The problem is that turns sand and snow into flows, and flows are CPU-intensive.
Logged
I should probably have my head checked, because I find myself in complete agreement with Nikov.

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: 14/14 total depths per tile.
« Reply #9 on: February 08, 2010, 12:24:52 am »

The problem is that turns sand and snow into flows, and flows are CPU-intensive.

Correction:  The current flow IMPLEMENTATION is CPU-intensive, it needs to be re-written badly at which point other fluids become an option
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

Nikov

  • Bay Watcher
  • Riverend's Flame-beater of Earth-Wounders
    • View Profile
Re: 14/14 total depths per tile.
« Reply #10 on: February 08, 2010, 12:45:40 am »

I cannot imagine a 6x6 fortress covered in flowing, windblown snow ending in anything but tragic FPS loss, no matter how it is optimized. Now sand I can see 'giving way' into ramps if you dig too aggressively into it. But snow is just far too dynamic.
Logged
I should probably have my head checked, because I find myself in complete agreement with Nikov.

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: 14/14 total depths per tile.
« Reply #11 on: February 08, 2010, 01:35:33 am »

IIrc its 1 Byte for water. the first 3  bits for, depth 1 for flow, 1 for Magma/water, and 2 Statusbytes of some other sort.
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.

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: 14/14 total depths per tile.
« Reply #12 on: February 08, 2010, 08:42:13 pm »

The main problem I have with increasing the range of fluid depth is that we wouldn't be able to display the fluid depth as a tile if it's more than one digit.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: 14/14 total depths per tile.
« Reply #13 on: February 08, 2010, 08:52:54 pm »

The main problem I have with increasing the range of fluid depth is that we wouldn't be able to display the fluid depth as a tile if it's more than one digit.

This is very very true.
Logged

Nikov

  • Bay Watcher
  • Riverend's Flame-beater of Earth-Wounders
    • View Profile
Re: 14/14 total depths per tile.
« Reply #14 on: February 08, 2010, 09:12:45 pm »

Now I do like the idea of rolling sand dunes sweeping across the lowlands surrounding my dwarf-fortified mesa, with walls built to control the flow of timeless sand away from the gates. I just don't think changing depths will make progress toward acheiving this. Toady has talked about 'semi liquids' but I seem to recall that he wants to optimize flow pathfinding before making changes to sand or adding new sorts of liquids. Each little layer is handled like an individual unit trying to move to a lower adjacent slot, so increasing the number of little layers would probably only increase the amount of pathing calculated. Pure dwarfgrime logic, however.
Logged
I should probably have my head checked, because I find myself in complete agreement with Nikov.
Pages: [1] 2