Bay 12 Games Forum

Please login or register.

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

Author Topic: Change temperature to Celsius  (Read 32972 times)

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Change temperature to Celsius
« Reply #15 on: March 15, 2009, 04:39:20 pm »

Toady stated somewhere that this scale is intended for some esoterical reason. The pro is that toady has 4.294.967.295°Fahrenheit respective 2.386.092.941° Celsius for playing with a signed it would be the half. I think unsigned int is also a pro for some calculations



I ,as much as i hate to say this, think Fahrenheit is better for DF because its more finegrained.

What would be nice is if we could do the scaling in Fahrenheit and Celcius.
So instead of [HOMEOTHERM:10067] would work as well [HOMEOTHERM:35C].
« Last Edit: March 15, 2009, 04:45:42 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.

Derakon

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #16 on: March 15, 2009, 04:50:47 pm »

There's two main issues pointed out: wasted space (values below absolute zero are highly unlikely to come up, as are values so high they'd reduce everything in a kilometer of the site to plasma), and lack of fine control at the levels that most organisms care about (there's a comparatively big difference between 36° and 37°).

Both of these cry out for a value that's floating point, not integer, since floating point is all about increased precision near zero (wherever you happen to define zero to be) at the cost of decreased precision in the very large numbers.

As for scale, I don't really care between the two, but it should be Kelvin or Celsius. Of course, given how much boiling points depend on atmospheric pressure, we'll also need barometers for our cooks...
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #17 on: March 15, 2009, 04:55:45 pm »

What would be nice is if we could do the scaling in Fahrenheit and Celcius.
So instead of [HOMEOTHERM:10067] would work as well [HOMEOTHERM:35C].
That is brilliant.  Having the game use the same scale, but allowing the raws to work in a way so that 35 oC is read as 10067.

As for the fine-grained thing, there's a reason decimals were invented.  I'm fairly certain there are some values in game compatible with that; if temperature is not one of them, it can be implemented.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: Change temperature to Celsius
« Reply #18 on: March 15, 2009, 04:59:57 pm »

I recommend unsigned somthing, definitely decimals, using Kelvin.
Logged
this sigtext was furiously out-of-date and has been jettisoned

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #19 on: March 15, 2009, 05:04:35 pm »

I recommend unsigned somthing, definitely decimals, using Kelvin.
Why not have that and what Heph said?
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Granite26

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #20 on: March 15, 2009, 05:11:07 pm »

I recommend unsigned somthing, definitely decimals, using Kelvin.

That's not the way numbers work in programs.  Either it's an integer(whole number) or it's a float(ing point number).  There is merit (size) in keeping it an integer, although relative merit (whether it's worth it in this case) is arguable.

That said, there's no reason you can't use an int(eger) and have each number represent .1 or .01 degrees Kelvin.  (AKA divide by 100 to get Kelvin)

Although Heph has a neat idea.  use whatever crazy system Toady wants internally, but scale K,F, and C where applicable....

praguepride

  • Bay Watcher
  • DF is serious business!
    • View Profile
Re: Change temperature to Celsius
« Reply #21 on: March 15, 2009, 05:13:15 pm »

I like the Urist scale. It makes things seem dwarfy rather then "american" or "european"
Logged
Man, dwarves are such a**holes!

Even automatic genocide would be a better approach

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #22 on: March 15, 2009, 05:20:08 pm »

I like the Urist scale. It makes things seem dwarfy rather then "american" or "european"
SI is the International System (excepted by scientists and citizens the world over), not European.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Granite26

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #23 on: March 15, 2009, 05:25:33 pm »

I like the Urist scale. It makes things seem dwarfy rather then "american" or "european"
SI is the International System (excepted by scientists and citizens the world over), not European.

accepted

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Change temperature to Celsius
« Reply #24 on: March 15, 2009, 05:28:26 pm »

Quote from: Derakon
values below absolute zero are highly unlikely to come up, as are values so high they'd reduce everything in a kilometer of the site to plasma

I have 4 words and 1 acronym regarding this issue: Spheres, Planes, Gods, Magic and HFS.

Ok Fahrenheit was a bit to patriotic for my taste but Toady is good enought at programming to choose a floating point number if he would have thought it would be better. Fact is for the really important stuff (Ice, Magma, biomes and !!fireballs!!) a nonfloat C or Fahrenheit measurment is more then enought.

Also toady said that the entire temperature engine needs a overhaul because it is a pretty narrow bottleneck on the gamespeed.
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.

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: Change temperature to Celsius
« Reply #25 on: March 15, 2009, 05:42:16 pm »

 Screw it. Make the temperature values in the raws dependent on the letter at the end of a string of numbers issued. No letter at the end will use the DF scale.
[SPEC_HEAT:30F]
[MELTING_POINT:1270C]
[BOILING_POINT:15150]

 There, all of you happy? Also, I find it childish that Americans are considered stupid for using a system every bit as arbitrary as the preferred method. I'm sure some third-world country will adopt Kelvin for their daily life and berate the world for using such a cruse measurement as Celsius.

 Also, if you have a temperature checker in DF:
 [TEMPERATURE_SCALE:(DF units, Kelvin, Celsius, Fahrenheit)]
 In the init file. There. All better.
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

praguepride

  • Bay Watcher
  • DF is serious business!
    • View Profile
Re: Change temperature to Celsius
« Reply #26 on: March 15, 2009, 05:43:59 pm »

I like the Urist scale. It makes things seem dwarfy rather then "american" or "european"
SI is the International System (accepted by scientists and citizens the world over), not European.


 ::). Also "fixed" the "fix. If you're going to correct someone, you had better be correct yourself :D My point is that we already have original units all across the board, why not have a dwarf-version of the temp. scale?
Logged
Man, dwarves are such a**holes!

Even automatic genocide would be a better approach

Belteshazzar

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #27 on: March 15, 2009, 06:16:48 pm »

Hurray for Kelvin where 'everything' starts at zero!
Logged
In the year 570, Kjerdregus occurred.

NikkTheTrick

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #28 on: March 15, 2009, 06:20:11 pm »

I think kelvin times 10 in unint32 would be a good scale. Values below 0 Celsius are common in freezing climates and during winter. Values below 0 Kelvin are not.
Times 10 because 1 degree Celsius/Kelvin step may be too much if we may want to have things precisely controlled around 0C or in 36C-42C range (later being important for diseases). 0.1 Celsius seems precise enough (eliminating "fine grained" argument for Farenheit).

And for display purposes, temperatures can be easily converted to Celsius (or, for players from countries like Belize, Liberia and Myanmar, Farengheit). That conversion would be done rarely (relative to how much temperature is used in calculations), so would not require too much computing.
Logged
Dwarf Fortress- where nightmare fuel is recycled into business plan.

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: Change temperature to Celsius
« Reply #29 on: March 15, 2009, 06:27:44 pm »

 It won't matter how much temperature is used in calculations, it is purely for display purposes. DF will still use it's internal scale because there is no point to changing the scale except for display purposes. Thus it will only be converted from the raws when DF first goes through the numbers and when DF displays temperature information, if we ever get a temperature display.
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
Pages: 1 [2] 3 4 ... 14