Bay 12 Games Forum

Please login or register.

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

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

Exponent

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #45 on: March 16, 2009, 12:13:16 pm »

If we want a very dwarfy system, I suggest an exponential curve mapping Dwarf scale to Kelvin.  I'll explain why at the bottom.

K = aebD + c
or
D = 1/b * ln((K - c) / a)

where a, b, and c are computed constants, D is degrees Dwarf, and K is degrees Kelvin.

The computation of the constants should come from this system of equations (I tried to solve it last night, but I suck at solving non-linear systems):

273.15 = ae0b + c
373.1339 = ae1000b + c
1700.0 = ae2000b + c

The result:  A temperature scale in which water freezes at 0, melts at 1000, and the average temperature of magma is 2000.  Certainly these would be considered the three most important temperatures for a dwarf?  And even if water freezing/melting is not as important as some other temperature, certainly the temperature of magma is.  (And conveniently, as far as I am aware, magma is always exactly one temperature in DF.)


Logged

praguepride

  • Bay Watcher
  • DF is serious business!
    • View Profile
Re: Change temperature to Celsius
« Reply #46 on: March 16, 2009, 12:18:47 pm »

wow...just wow :D
Logged
Man, dwarves are such a**holes!

Even automatic genocide would be a better approach

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Change temperature to Celsius
« Reply #47 on: March 16, 2009, 02:00:06 pm »

Wait, what?  WHY in God's name would even magic need something colder than 'zero molecular movement'?

IIRC to make it able for a spell or enchanted item to suck the heat out of something faster.

Note that the current system has temperatures below 0K, and people use them.
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #48 on: March 16, 2009, 02:01:58 pm »

People, or Toady?

Seems like specific heat should cover most of it

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Change temperature to Celsius
« Reply #49 on: March 16, 2009, 02:24:56 pm »

  • Floating point math is slower than integer math.
  • Conversion between floating point and integer is very slow.

That was a while ago. The cycle count for integer and floating point operations are the same on principally all modern CPUs. If you can get some modern game code you'll see that they use almost only floating points.

I haven't seen cycle-count references for modern CPUs, and have not done my own timing tests in years,

My understanding (from memory) of the AMD Athlon series (not the newer Athlon64 series) is that float addition is the same as int32 addition, float multiplication lags int32 multiplication by at least one cycle, and float division lags int32 division by several cycles.  On the good side, rearranging the FP stack is effectively 0 cycles now.

That's based on the classic x86 floating point instruction set, not the MMX* or SSE* sets.

On the second point, naively using ftol() to convert results in a massive penalty because of changing the rounding method.  I believe this has been mostly fixed on ultramodern CPUs but there is still some penalty, just not 100+ cycles.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Change temperature to Celsius
« Reply #50 on: March 16, 2009, 02:50:32 pm »

People, or Toady?

Seems like specific heat should cover most of it

Some of the people in the modding forum like setting objects to very low temperatures.

Here is holy writ from on high about temperatures below absolute zero.

I don't know if tweaks to specific heat could cause the same result as a steep heat gradient.  At first glance, you would have to change the specific heat of the target item/creature being cooled, which strikes me as the wrong thing to do.
Logged

Granite26

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #51 on: March 16, 2009, 02:56:08 pm »

I hated "The Day After Tomorrow"....

LegoLord

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

When was the poll on this? I was never asked.  Don't say things like that, Legolord, unless you know for sure.  SO START A POLL! GO.
It's not opinion, it's statistics.  DF is not a very talkative game, so anyone who doesn't speak much English who would otherwise be able to play it can easily just learn a few terms and play on; there are several people from non-English countries on this forum, if you look around.  SI is the international system, and lives up to that name by being used internationally.  Even with countries that do speak English, more of them use SI than there are those that don't.

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.
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

Veroule

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #53 on: March 16, 2009, 04:42:37 pm »

Specific heat is so misapplied.  A nice simple example, take a tray of water (500ml) at room temperature (72F/22.2C) and place it in a freezer at (31F/-0.5C) .  Record how long it takes for that water to completely turn to ice.  Next place an identical tray of water into a vat of liquid nitrogen, record how long it takes that water to turn to ice.

I think you will find the 2 measurement of time are not equal.  Specific Heat is component in averaging the temperatures in the environment to guage the time required to reach a mean energy acrossed the entire environment.  It is only accurate if you consider the Specific Heat of all portions of the environment.  If you change the volume of liquid nitrogen adequately you can also measure a different time for freezing the water.  Making a significat change in the mass of liquid nitrogen will actually result in a measurable change in the time it takes to freeze the water, evidencing that water's specific heat is only a component in the actual function.

So why would we need values of negative Kelvin?  Simply put temperature is a measurement of the kinetic engery of molecules.  Kinetic energy is a function of motion, having both velocity and direction.  If all the molecules in a given mass are moving in a vector generally opposite to the mocules of another mass with sufficient velocity, then the collision the 2 masses will easily produce changes in molecular vectors exceeding a convetered 273 C/K.  Yes you may actually have to consider Relativity when considering temperature, since the specific vectors of each molecule are undefined you may also have to consider wave mechanics.

With all that said, please put away your Physics arguements.  Let us just agree that DF can use whatever scale it chooses, and it would be nice to have the raws support multiple scales.
Logged
"Please, spare us additional torture; and just euthanise yourselves."
Delivered by Tim Curry of Clue as a parody of the lead ass from American Idol in the show Psych.

Granite26

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #54 on: March 16, 2009, 05:04:21 pm »

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Specific heat is so misapplied.  A nice simple example, take a tray of water (500ml) at room temperature (72F/22.2C) and place it in a freezer at (31F/-0.5C) .  Record how long it takes for that water to completely turn to ice.  Next place an identical tray of water into a vat of liquid nitrogen, record how long it takes that water to turn to ice.

Chemistry isn't my strong suit, so I can't comment, although you're probably right.  Still... -K temperatures just seems... wrong

LegoLord

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

Negative K values don't work in the real world because there is no such thing as "anti motion" - if something changes position, the it has some heat.  My personal hypothesis on 0 K is that if something were to reach it, it would be the sole unmoving point in space (which is highly unlikely to happen, so I think 0 K is impossible, however close they may get to it).

In games, however, kinetic motion is not recognized and as stated before (as I understood it) the game runs better with a scale that goes below absolute zero.  Of course, the temp values for everything in the game could be greatly lowered so that game scale zero is K scale zero.  But that is not necessary; we can just have raws that recognize multiple scales and translate them into the game scale.
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 #56 on: March 16, 2009, 05:25:51 pm »

Although it may seem obvious to most of us, you would also need to consider thermodynamics.  Which I only know enough about to say that I think we need to look at it.
Logged
this sigtext was furiously out-of-date and has been jettisoned

Mikademus

  • Bay Watcher
  • Pirate ninja dwarves for great justice
    • View Profile
Re: Change temperature to Celsius
« Reply #57 on: March 16, 2009, 05:58:23 pm »

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Except when it causes space shuttles to explode.
Logged
You are a pirate!

Quote from: Silverionmox
Quote from: bjlong
If I wanted to recreate the world of one of my favorite stories, I should be able to specify that there is a civilization called Groan, ruled by Earls from a castle called Gormanghast.
You won't have trouble supplying the Countess with cats, or producing the annual idols to be offerred to the castle. Every fortress is a pale reflection of Ghormenghast..

Granite26

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

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Except when it causes space shuttles to explode.
That doesn't mean the formulas don't work, it just means there's a conversion factor that people can forget.  That's like saying that the formula for acceleration due to gravity changes depending on whether you're using feet or meters.

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #59 on: March 16, 2009, 07:01:55 pm »

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Except when it causes space shuttles to explode.
That doesn't mean the formulas don't work, it just means there's a conversion factor that people can forget.  That's like saying that the formula for acceleration due to gravity changes depending on whether you're using feet or meters.
Oh yes, it will work if you have a conversion factor.  But all that does is convert Fahrenheit to whatever unit is appropriate before running it through the rest of the equation.  I you use the ideal gas law to find the temperature of a gas, your answer will always be Kelvin scale.
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
Pages: 1 2 3 [4] 5 6 ... 14