Bay 12 Games Forum

Please login or register.

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

Author Topic: Advantages of the 2D version over the 3D version  (Read 4704 times)

Draco18s

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #30 on: January 07, 2008, 05:05:00 pm »

quote:
Originally posted by Nate879:
<STRONG>I agree that finer granularity in water would be nice.  But floating-point numbers are slow.  One way to have finer granularity would be to represent water level internally as a number from 0 to 255 (a byte).  If you want to keep the 0-7 water level, just show the player the quantity WaterLevel >> 5.  That would give a number in the range of 0-7.</STRONG>

Bit shifting 11110000 by 5 bits results in 10000111, which isn't less than 8.
Unless you mean to drop the bits off the end and not wrap them around to the front (which isn't taken care of automatically in any bit-shift opperation I know of).

It's easier to just Display = (Waterlevel / 16) as divition on an int results in an int.

Logged

Anjey aka PM

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #31 on: January 07, 2008, 05:45:00 pm »

quote:
Originally posted by Draco18s:
<STRONG>

Bit shifting 11110000 by 5 bits results in 10000111, which isn't less than 8.
Unless you mean to drop the bits off the end and not wrap them around to the front (which isn't taken care of automatically in any bit-shift opperation I know of).</STRONG>


this is the difference between ROR (first one you've described) & SHR (drops the bits off)

Logged
he greatest programming project of all took six days; on the seventh day the programmer rested. We''ve been trying to debug the *&^%$#@ thing ever since. Moral: design before you implement.

Align

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #32 on: January 08, 2008, 02:24:00 pm »

quote:
Originally posted by rkyeun:
<STRONG>So I can build a water pyramid that never drains?   :D</STRONG>
That would be exceedingly difficult without editing game files, but you do have a point.
Maybe a body of water could know the lowest and highest levels of water in it, and if THAT difference > 1, the squares with water that's higher than the lowest level can move about until said difference <=1.
Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.

Nate879

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #33 on: January 08, 2008, 04:02:00 pm »

Draco18s:  Dividing by 16 is just like bit shifting by 5, only 100x slower.  Every programming language I've seen uses arithmetic shift, not rotate.
Logged
There are 10 types of people in the world: those who understand binary and those who don''t.<P>The ultimate fate of the universe.

Yourself

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #34 on: January 08, 2008, 04:27:00 pm »

You mean right shifting by 4.  Or you mean dividing by 32.  Either way, right shifting by 5 is not the same as dividing by 16.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #35 on: January 08, 2008, 06:29:00 pm »

quote:
Originally posted by Yourself:
<STRONG>You mean right shifting by 4.  Or you mean dividing by 32.  Either way, right shifting by 5 is not the same as dividing by 16.</STRONG>

Touche >.>
My Base 2 isn't all that strong anymore (I became a Digital Media student and don't have to deal with low level code anymore and high level code only when I want to (yay! actionscript!))

Logged

Nate879

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #36 on: January 09, 2008, 03:03:00 pm »

Oops.  I just took Draco18s's response without checking it.  :(
Logged
There are 10 types of people in the world: those who understand binary and those who don''t.<P>The ultimate fate of the universe.

rkyeun

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #37 on: January 09, 2008, 07:41:00 pm »

Integers or not, a lot of the wasted calculations are in the randomness of the water movement. My point to using floating point was so that we could split 7 eight different ways, and split the results of those splits, so the flow ends after only a few frames and is easy to calculate, and doesn't lag thereafter. There's other ways to do it.
Perhaps water shouldn't move randomly, it should invoke pathfinding to seek out the lowest height of water it can reach in the same way dwarves seek narrow clothing in a seige, and then go that way at its speed until it gets there. If there is no better place for it, it just sits there and stops looking until something disturbs it. Some optimization over normal pathfinding could probably be done there. We don't need each 1 in a stack of 7 water pretending to be its own creature.
Logged

Aquillion

  • Bay Watcher
    • View Profile
Re: Advantages of the 2D version over the 3D version
« Reply #38 on: January 10, 2008, 05:02:00 am »

quote:
Originally posted by Fedor:
<STRONG>* A series of escalating underground challenges, each with its own rewards.  This is the feature I miss the most, by a long, long way.  The more valuable gems past the river, the iron and gold past the chasm, the magma, and finally, far far away and not just 10-15 z-levels down, the admantite beyond (not in front of) the deadly Pits - these add gameplay value and wonderment missing in the 3D version at the moment.</STRONG>
On one hand this is true -- but this is also the hardest thing you're asking, by far.  The others are mostly things that (I assume) were temporarily turned off until they can be re-adapted to 3D, or issues and optimizations that need to be dealt with eventually but are basically just coding.

This is different.  The idea the 2D version used here (a basically preconstructed, interesting environment that was ultimately designed to tell one specific story) is pretty directly opposed to the idea of the 3D version (a wide-open area where you can build fortresses anywhere in random unscripted environments and have your own story.)  Of course, various things can be added to try and make 'your own story' more interesting, but the basic conflict here is still not going to be totally resolved.

The game can't present river, chasm, pits in order like it used to; 3D just gives the player too much freedom to miss it or to start from the wrong place (not even if there were, say, 'mystic mountains' where those features were guarenteed.)  Likewise, even if you put more valuable things deeper in Z levels, it's still easy for the player to bore straight down and get the good stuff instantly.

I think you'll have to content yourself with the knowledge that, in future versions, the 'story' of Dwarf Fortress is going to focus more on nobles, civilizations, trade, armies and so on than on progressively finding new features and materials...  you may find some occasionally, but they're going to be random now, and I don't see any way of escaping that.

Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One
Pages: 1 2 [3]