Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [minor] Ramps and tile capacity  (Read 1610 times)

¿

  • Bay Watcher
    • View Profile
[minor] Ramps and tile capacity
« on: March 01, 2009, 06:15:55 pm »

A single unit of area in DF holds 7 units of water. A ramp should cut away half of the area to make a triangle. Regardless of the other half of the unit of area still containing half of the original land, it also holds a max volume of 7/7 units of water.
What?
It should hold 3.5 units of water, but we'd have to round that to 3 or 4.

What was the reasoning behind the 7 units of liquid per tile? I propose we use 8 or 6 so we can properly represent liquids on ramps.
Logged

Fieari

  • Bay Watcher
    • View Profile
Re: [minor] Ramps and tile capacity
« Reply #1 on: March 01, 2009, 08:29:33 pm »

Liquid levels utilize 3 bits out of a 32 bit integer that provide information about each tile.

000 = 0 (aka, no liquid)
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7

No room for eight.  If another bit was used, we'd be able to go all the way up to 15... but adding another bit would require DOUBLING memory requirements in both RAM and disk drive space for each save game.

For more details, see: http://www.dwarffortresswiki.net/index.php/Designation_flags_in_DF_memory

The right three bits are the ones I'm talking about.
« Last Edit: March 01, 2009, 08:33:01 pm by Fieari »
Logged

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: [minor] Ramps and tile capacity
« Reply #2 on: March 01, 2009, 08:44:52 pm »


 Trees already cause water on their tile to be stuck at 2. Now I know trees are not the same as terrain features, but it shows it can be done.
Logged
Buck up friendo, we're all on the level here.
I would bet money Andrew has edited things retroactively, except I can't prove anything because it was edited retroactively.
MIERDO MILLAS DE VIBORAS FURIOSAS PARA ESTRANGULARTE MUERTO

¿

  • Bay Watcher
    • View Profile
Re: [minor] Ramps and tile capacity
« Reply #3 on: March 01, 2009, 08:54:48 pm »

Then should we round it to 6 total, so we can have 3/6 units, or should we go with 3/7 or 4/7?
If trees can do it, it's not a difficult tweak so that ramps do too.
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: [minor] Ramps and tile capacity
« Reply #4 on: March 01, 2009, 09:08:48 pm »

Liquid levels utilize 3 bits out of a 32 bit integer that provide information about each tile.

000 = 0 (aka, no liquid)
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7

No room for eight.  If another bit was used, we'd be able to go all the way up to 15... but adding another bit would require DOUBLING memory requirements in both RAM and disk drive space for each save game.

For more details, see: http://www.dwarffortresswiki.net/index.php/Designation_flags_in_DF_memory

The right three bits are the ones I'm talking about.

Except the tile memory format changed recently, since spatters are handled under a dynamically allocated system now.  So there should be room for this or other tile format changes.
Logged