Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarf Fortress in 3D !!SCIENCE!!  (Read 17411 times)

Raz

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #30 on: December 08, 2010, 08:55:07 am »

It's astounding how little the OP knows about the topic. Not that there's anything wrong with that, but pretending you know anything about a game development pipeline when you're confusing 'graphics' with 'animations' and 'models' with 'sprites', or anything about CPU/GPU capabilities, is when I get annoyed.
« Last Edit: December 08, 2010, 08:56:55 am by Raz »
Logged
"I can't wait to procrastinate!"

lolghurt

  • Bay Watcher
  • [PREFSTRING:failures]
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #31 on: December 10, 2010, 05:00:16 am »

But other than interface issues, almost nothing changes going to 3D.

That hasn't been my experience; what I have observed is that a lot of the game changes when going to 3D: It gets dumbed down heavily. There is a general loss of depth of play. Going to 3D nerfs the game.

The only notable exception to this that I've seen recently is StarCraft 2, and they had an enormous staff.
Well, Blizzard took TWELVE YEARS to make it. It also doesn't need to work out how to render z-levels.
Logged
Quote from: acetech09 date=1343968486
It's probably made from baby bone, with a handle of baby leather. Probably uses the leg bones wound together for the handle, the pelvis for the handle/pick joint, and the pick is the spine.

But that's all in theory, of course. Not like I've made a pick out of my own 5 month old baby before.

Shades

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #32 on: December 10, 2010, 05:14:26 am »

That hasn't been my experience; what I have observed is that a lot of the game changes when going to 3D: It gets dumbed down heavily. There is a general loss of depth of play. Going to 3D nerfs the game.

Can you think of many that do get heavily dumbed down. For the life of me I'm having a hard time thinking of any games that made the transition at all.
Sure there was GTA, but I wouldn't have called that dumbed down.
There is a select of platformers, mario and sonic games being the most visible which you might count as dumbed down but platforms, fun as they are, tend to be fairly simplistic already.

Lots of sports games made the transition, not sure it really effected them overly.

I don't really see your point at all.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #33 on: December 10, 2010, 05:18:53 am »

Well lets be fair on blizzards behalf, most of those twelve years were failing to make Ghost and pleasing fat fan boys on WoW. They weren't putting 12 years of effort into that unbalanced, badly told story.

And anyway, although Brood war was  BRILLIANT game, and the most well balanced RTS in which each race wasn't just another clone of the first, it wasn't DF depth. And, yes, when you change interface, your model shouldn't be affected. If computers were fully capable of handling DF on large sized embarks and 200 population without lag, and were then able to handle full 3D graphics over this area, then there shouldn't be any lack of detail.

JujuBubu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #34 on: December 10, 2010, 07:36:08 am »

Yeah, you can't compare rts games to dwarf fortress, Starcraft has 3 to 4 z planes at best. ( underground, above1, above2, flyers ).

A fair comparison would be a overgrown X-Com game, which looks alot like Stonesense ( or the other way around :) ).

What you failed to mention is what the creatures can do to each other and what this means to the use of 3d models. 
I know of no game that really is able to visualize what creatures in DF are able to do, I must admit I am not up to date, what modern games can do with their models but ripping of body parts, throwing bleeding corpses, gouging out eyes and breaking legs .. thats really difficult to do. ( I remember Half Life 2 doing some of this, but not exactly how )




p.s. does anybody know a real 3d strategy game with base building that did not suck in matters of control, playability or others ?
Logged

languard

  • Bay Watcher
  • Meep
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #35 on: December 10, 2010, 10:02:51 am »

But other than interface issues, almost nothing changes going to 3D.

That hasn't been my experience; what I have observed is that a lot of the game changes when going to 3D: It gets dumbed down heavily. There is a general loss of depth of play. Going to 3D nerfs the game.

The only notable exception to this that I've seen recently is StarCraft 2, and they had an enormous staff.
Well, Blizzard took TWELVE YEARS to make it. It also doesn't need to work out how to render z-levels.

Hee, quote chain!  8)  Ok, on topic, I want to make a clarification.  In my 'almost nothing changes' comment, I was referring strictly to DF.  DF is already a 3D game, it's just that the interface presents it in 2D slices.  Everything under the hood though is in 3D.  That is why almost nothing would change in DF if it was rendered in 3D.  This is strictly an interface issue, not a game design issue.  This is drastically different from say the transformation of Metroid or Mario Brothers into 3D.

And finally, z-levels.  Come on people.  The z-level issue is not that big of a deal.  Between LOD, occlusion and in-memory compresion (which is perfect for multi-threading), it is not that hard to deal with the z levels.  In fact, going to go do some calculations on this real quick.
Logged
He's now moping around, doing Armok knows what. As far as I can tell he's just going to stay there, in the party room. Forever.
Given our relationship thus far, I can genuinely say the party has just begun for me. - Captain Mayday,

languard

  • Bay Watcher
  • Meep
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #36 on: December 10, 2010, 10:53:50 am »

 0
0x---x---x
 |   /|   /|
 |  / |  / |
 | /  | /  |
 x---x---x
 |   /|   /|
 |  / |  / |
 | /  | /  |
 x---x---x2
            2

OK, this is the most basic way a terrain mesh can be represented.  Each X represents a data point, the lines show where the triangles would be drawn.  So we can see that to get a 2x2 square grid, we need a 3x3 grid of integers.  Also, for each square, we have two triangles.

Each embark square is 48x48 tiles, so this means we need a grid of 49x49, or 2401 ints.  Plus to draw it at full resolution we need to draw 4802 triangles.  Now assuming a default embark of 4x4 or 16 embark tiles, and we have 2401x16 = 38416 ints per z-level, and 76832 triangles.  Now let's assume 200 total z-levels, so we have 7,683,200 data points.  The triangles are a non-issue because as I've said several times, you only draw the ones that are visible.  This means unless the camera is pulled out really far, you'll never even see the full 76k triangles for a z-level.

Now we don't need to use a 32-bit, or 4 byte int.  A 32-bit int can range in value from -2,147,483,648 to +2,147,483,648.  We don't need 2 billion z-levels.  A 16-bit is just fine with a range of +/- 32768.  Unsigned that range becomes 0-65,536.    An 8-bit, or 1 byte, int is to small.  Unsigned that gives us 255 max z-levels.  Given that I think it is possible to have more than that right now, we need to stick with the 16 bit.  I really think that 65k z-levels is enough though.  So, 7,683,200 * 2 = roughly 15 MB per z-level, so for 200 z-levels we need 15*200=3,000MB or 3GB of memory.

Ok, stop the 'I told you so' right now.  We're not done.  Is it possible to see all 200 levels at once?  No.  Even if you had a shaft that reached all the way down, and you had the camera all the way at the top, you wouldn't see all the z levels.  All you should reasonably expect to see is a black hole in the ground.  Maybe some small detail a few z-levels into the pit, but not more.  Plus, 100 of those z-levels is potentially in the sky.  What exactly is in the sky?  Nothing.  So why define nothing?  In short, it would be very easy to only keep 10 z-levels in memory, which would only be a 150mb footprint.  You could take the optimization further, and implement the mesh such that you only define things of interest.  For the vast majority of the underground, is there anything to render besides solid rock?  Nope.  So why define it?  For the hotkey locations, You could keep those levels compressed in memory.  The data would compress very, very well, and with multi-threading wouldn't be much of a cpu load.  Plus you could keep a history of commonly accessed z-levels in compressed memory.  The rest of the levels would stay on disk, swapped in/out of memory as needed.

And finally you could always just give the middle-finger to 32bit OS users and make DF 64bit only.  :P

Yes there are technical issues, but they aren't unsolvable.  I hope this helps with the understanding of this.  Please keep in mind that using a terrain mesh like system is only one way of doing this.  There are other approaches as well.  This is just the 'brute force' method and easiest to explain.

« Last Edit: December 10, 2010, 06:27:54 pm by languard »
Logged
He's now moping around, doing Armok knows what. As far as I can tell he's just going to stay there, in the party room. Forever.
Given our relationship thus far, I can genuinely say the party has just begun for me. - Captain Mayday,

SalmonGod

  • Bay Watcher
  • Nyarrr
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #37 on: December 10, 2010, 04:18:33 pm »

What you failed to mention is what the creatures can do to each other and what this means to the use of 3d models. 
I know of no game that really is able to visualize what creatures in DF are able to do, I must admit I am not up to date, what modern games can do with their models but ripping of body parts, throwing bleeding corpses, gouging out eyes and breaking legs .. thats really difficult to do. ( I remember Half Life 2 doing some of this, but not exactly how )

Not quite DF-level detail, but...

http://en.wikipedia.org/wiki/Die_by_the_Sword

Also, Left4Dead
Logged
In the land of twilight, under the moon
We dance for the idiots
As the end will come so soon
In the land of twilight

Maybe people should love for the sake of loving, and not with all of these optimization conditions.

magilla_guerrilla

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #38 on: December 10, 2010, 05:37:07 pm »

I registered so I could post in this very interesting thread.  I think the game is great just as it is, but I just wanted to chime in on the discussion and say that I agree that it's very possible to add a 3d view to the game.  Just like there are currently community-created tools to view a single frame of your fortress in 3d, it would be quite possible to add a layer of 3d interaction right on top of the existing game, especially since it's single threaded as noted above.

I don't advocate that the fine developer(s) spend their time doing such a thing anytime soon.  It is clear that a design decision was made to focus on deep gameplay and story telling rather than graphical presentation and I agree with that.  But all the information to be drawn already exists, it's just a matter of mapping it into a 3d space which is really not that big a deal compared to the work already done.

Also, note that there are currently no animations.  There need not be animations for everything, even in a 3d environment.  Indeed, there need not be any animations for anything, just pictures shifting around the grid, just like now!  Really the main draw for 3d for me would not be for animations or any such thing, but rather so I can view my fortress in all its glory in realtime!
« Last Edit: December 10, 2010, 05:38:59 pm by magilla_guerrilla »
Logged

SalmonGod

  • Bay Watcher
  • Nyarrr
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #39 on: December 10, 2010, 05:45:46 pm »

Really the main draw for 3d for me would not be for animations or any such thing, but rather so I can view my fortress in all its glory in realtime!

Not having to scroll up and down through z-levels would be glorious.  Totally agree that any kind of animation or detailed display of action wouldn't be needed.  Just saving us the tedious aspects of viewing the game world would do so much for playability of the game.
Logged
In the land of twilight, under the moon
We dance for the idiots
As the end will come so soon
In the land of twilight

Maybe people should love for the sake of loving, and not with all of these optimization conditions.

Drunken

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #40 on: April 19, 2011, 06:24:44 pm »

I have been thinking about this for a while now, and as the verdict seems to be "yes it is possible, but it wont be easy" I would like to add my two cents.

The reason I want to see 3d is not what you might expect. I see the huge amount of money that the minecraft guy is making and it seems that the only reason his game is so hugely popular, given that it is basically just a dumbed down version of DF, seems to be that it is 3d and multiplayer. Mostly it is the 3d. DF is not going to be multiplayer and that is another discussion anyway, but I can't help feeling that if DF had 3d it would mean massively increased donations for Toady which will trickle down to us players in the form of continued developement. I also want all those people who are currently loving minecraft to see just how much greater DF is. Once the crafting and digging side of things is fully implemented in adventure mode it will be almost the same as minecraft anyway, just 1000 times deeper and more complicated, and with a huge history and storyline.

This brings me to my next point: it only has to be for adventure mode. A topdown view is the best thing for fortress mode and wether you are seeing ascii, symbols or models makes little difference. In fact models might be the hardest one to read apart from for learners, as detailed models can be harder to make out than designated symbols. With adventure mode however a first person view would add a lot to the game. Adventure mode also has a built in limited view distance which is only about 20 squares. Drop that into the calculations earlier in the thread and you get closer to 400 ints and 800 triangles, which is nothing to your average graphics card.

I don't think the graphics would need to be that complicated either, people are used to minecraft blocky graphics and DF players are far more tolerant. I think fansourcing the models and textures would be the way to go, simply make a basic 3d engine that renders a grid, and have a filesystem just like the raws where each object in the raws has a path to a mesh and a texture image. The game could be released with a single unit cube mesh and no textures, with a default option of printing the object name on a white background if no texture is present. Then we would get a 3d world where everything was a white square block with its name on it and nothing more. Then people could release texture and model packs, the community could mix and match and eventually there would be full 3d content, without Toady having to draw a single texture or arrange a single mesh. I have built a system myself for reading in meshes and textures at runtime in a game I am working on, and with .x files which are just ascii, it is really not that hard. I don't know what animation support is like as I haven't got that far but I don't even think animations are necessary for DF, and they may be just as easy.

This leads me to the question, how could this come about. Firstly we would need Toady's blessing for such a project, you don't mess with another mans art without permission. Assuming he is on board we would need to get the basic 3d engine built. As there is one person who is great with graphics and knows DF better than anyone except Toady himself, namely Baughn, he would seem the obvious choice. As he often points out though, he is busy, and working pro-bono, even on a great project like this, is not something you just ask someone to do. Therefore I would suggest that either Toady or the community itself (ie me and you) start a fund to pay Baughn to implement such a renderer for DF. Given that the point of it is to increase the popularity, player base and donation base of the game there is an incentive for bay12 to do this. Given the number of people that desperately want 3d, there is an incentive for the players to do this.

What do people think, worth it? Waste of time? Just not possible? It was an idea that struck me I just wanted to get it out there.
Logged
A stopped clock is right for exactly two infinitessimal moments every day.
A working clock on the other hand is almost never ever exactly right.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #41 on: April 19, 2011, 06:35:06 pm »

I think the easiest, best, and fastest way to impliment 3d into DF would be to show areas of a different, lower Z level in a darker font.  This would naturally require divorcing the "pseudo-ASCII" interface from the current 16 colors it now supports.

Z levels below the current would be rendered darker and darker until they were just black, at which point the current "open space" areas would be shown. Or possibly fade them to the open space color.  Either way, it would make viewing hills much easier and would not require much more overhead than we have now.  The Z levels below are already computed, just not displayed.  Displaying them would be a trivial process, computationally, compared to calculating fluid flows or pathing on those levels, as is already done.
Logged
I like fortresses because they are still underground.

MasterMorality

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #42 on: April 19, 2011, 07:39:03 pm »

Forgotten beast rendering in 3D...
It would have to first search through the entire archive history to figure out what it needs.
The engine would have to load a base mesh, add or subtract parts from it, based on physical limbs/head/internal organs, etc. It would then have to do skin/materials, so either give a mesh the right texture, or else completely convert it into mass particles (for things like steam), or run a shader all over it for something like water (which would then require advanced lighting calculating to account for distortion, direction, etc. It would then have to generate tertiary features, such as 'covered with/patchy feathers (More 2D planes, extra eyes, teeth, etc. Then it would have to generate potential places for various additional behaviours (spit, powder, etc) and work out how to render them, the physics behind them, etc.
After that it would have attribute and run scripts for characteristics, randomly generated effects.
It would then have to load animations.
It would then have to apply physics to everything.
It would then have to run AI scripts.

That alone would take a fairly significant amount of processing.
Logged

Dave1004

  • Bay Watcher
  • This is getting personal.
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #43 on: April 19, 2011, 10:05:24 pm »

I think my computer can handle it. I'd love DF in 3D, but I would still play the 2D a lot more. Although, then again, I do use Ironhand's texture pack. So, who knows.

Any computer that's hand built by even a newbie can handle any game out there, with good hardware. Go to can-you-run-it, and test, say Crysis 2. If you have a max bar (Past recommended requirements) then you could handle 3D DF with ease.

I have 100% recommended for Crysis 2 :D. And my computer cost me 700$. Well, cost me 300. I'm a lazy ass, so my grandpa paid the other 400. Just wish my mother would stop using it...*sigh* can't wait until we have proper internet. Man, I am so going to game my life away.
Logged


Hardcap of 200 MB/24 hours.

Cromage

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress in 3D !!SCIENCE!!
« Reply #44 on: April 20, 2011, 02:05:25 am »

Forgotten beast rendering in 3D...
It would have to first search through the entire archive history to figure out what it needs.

O(1). You don't "search"; you do a table lookup.

Quote
The engine would have to load a base mesh, add or subtract parts from it, based on physical limbs/head/internal organs, etc.

A bit tricky, but see the Spore comment. All you really have to do is another table lookup, and a simple, straightforward algorithm. Basically, this would be the EXACT same process DF does every time it loads a forgotten beast with no graphics, except it might take 0.3 ms instead of 0.1 because you'd be loading a few hundred numbers rather than like 50. And remember, it does this ONCE when it loads; after that it's all in memory.

Quote
It would then have to do skin/materials, so either give a mesh the right texture, or else completely convert it into mass particles (for things like steam), or run a shader all over it for something like water (which would then require advanced lighting calculating to account for distortion, direction, etc. It would then have to generate tertiary features, such as 'covered with/patchy feathers (More 2D planes, extra eyes, teeth, etc.

Or you could just slap on a procedurally-generated texture (hey! three more table lookups!) and call it a day.

Quote
Then it would have to generate potential places for various additional behaviours (spit, powder, etc) and work out how to render them, the physics behind them, etc.
After that it would have attribute and run scripts for characteristics, randomly generated effects.
It would then have to load animations.

More table lookups.

Quote
It would then have to apply physics to everything.

Unless you're redesigning the physics from the ground up, no.

Quote
It would then have to run AI scripts.
...Which ASCII DF already does.

Quote
That alone would take a fairly significant amount of processing.

In a word, no. It would take a fair amount of resources and grunt work, neither of which Toady has, but very little processing.

"High load" is not carrying out a complicated algorithm once. "High load" is carrying out that algorithm several hundred times per second.

A theoretical DF 3D could be made from the ground up to be difficult to render (think realistic physics, actual lighting, collision checking, and bloodspatters for everything in the world), but just transferring the game we have now into 3D would not break the computer running it.

That said, I doubt it's financially feasible even if it is technically possible. But it's nice to dream.
Logged
Pages: 1 2 [3] 4