Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarf Fortress 3D Visualizer - EARLY ALPHA  (Read 10477 times)

I3erent

  • Bay Watcher
  • The mounted dwarf has gone bErZeRk
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #15 on: November 13, 2007, 11:56:00 am »

Still workin on this?
Logged
quot;I got really stoned a couple days ago and ended up talking to THIS GUY. anyway... I''m really drunk now. The guy said: There is this application called "Mya" MI-AH that makes animations of people that he paid $2000 for. F- that Jazz ARMOK ROCKS. FIGHT THE MAN, GO TEAM!

slugabed

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #16 on: November 13, 2007, 12:13:00 pm »

Where are you guys getting the specs for the df map format?
Logged

Mithaldu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #17 on: November 13, 2007, 04:00:00 pm »

this is still being worked on. in the time since my last post i've figured out a good way to load in map export made in DF directly by analyzing the bitmaps of the map as well and the tileset the player used, as well as a good and fast way to render the maps with display lists. next version will be out as soon as i've done the implementation on both, which will be mostly time-consuming.

future releases will be getting a copy on filefront as well, but fchan will stay my main server as it is, well, mine and thus easiest to use.

source code examples and such won't be much useful to me, as the time spent studying them is better spent reading up on the red book, but thanks for the offer in any case.  :)

regarding dfmap format: i tried asking SL, but he was worried about my loading implementation becoming public knowledge or something, as anything i write is, due to the nature of perl, automatically open source.
after doing some further looking into his programs though, i realized that it would be ultimately worthless for this anyhow, due to not providing any information on the actual content of each square.

Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #18 on: November 13, 2007, 04:32:00 pm »

Just analyzing the .bmp wont work because Toady is the only programmer in the multiverse skilled enough to make the computer for example recognize smoothed walls from bridges.

A better way might be by memory-hacking DF itself (like tileinfo.exe and Ricks and other peoples other applications), but thats just my suggestion and I don't know how to memory-hack.

Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #19 on: November 13, 2007, 07:12:00 pm »

A goal for me would be a complete 3D exloration program where you can see the two waterfalls of the XOR gate as you cautiously pass through it(Imagine the H shaped one, both inputs on) and everything else, it will probably take a "screenshot" of the current tile memory and export it to a file. Should be paused.

It would be compiled C or C++.

It will never get started, as I am self taught and still a teenager and do not know anything about making an actual rendering engine, although I think I can read the DF memory.

Logged
Eh?
Eh!

Mithaldu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #20 on: November 13, 2007, 08:21:00 pm »

quote:
Originally posted by Armok:
<STRONG>Just analyzing the .bmp wont work because Toady is the only programmer in the multiverse skilled enough to make the computer for example recognize smoothed walls from bridges.</STRONG>
Actually... I can.  :)
Bridges use that certain tile only when they are single-tile, and they don't create closed shapes like smoothed walls do. So if i encounter a tile like that, i only neet to check whether it is enclosed on all sides by wall tiles. If it is enclosed by real, non-four-directional wall-tiles, i can immediately say it is a wall. If there are other four-directional tiles around it, i will need to check those too. If i find other non-four-directional wall tiles next to them, then all of those are walls too, if i however find an empty space, or a rough wall or anything else, then it is a bridge.  :)
Problems however will be fly swarms and things like mist. :/
But well, one thing after the other.  :)

quote:
Originally posted by Armok:
<STRONG>A better way might be by memory-hacking DF itself (like tileinfo.exe and Ricks and other peoples other applications), but thats just my suggestion and I don't know how to memory-hack.</STRONG>
That would indeed be REALLY nice, but i don't know how feasible it is. Perhaps it is possible to do a more detailed export than what DF already does, but i don't know. I'll see if i can find and talk to Rick somehow.  :)

quote:
Originally posted by qwertyuiopas:
<STRONG>It will never get started, as I am self taught and still a teenager and do not know anything about making an actual rendering engine, although I think I can read the DF memory.</STRONG>
It's not that difficult to get started.  :D
Try reading here: [ http://nehe.gamedev.net  ] and here: [ http://fly.cc.fer.hr/~unreal/theredbook/  ]. The real kick in the pants comes when you start trying to get it to run fast.  ;)
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #21 on: November 13, 2007, 09:15:00 pm »

Thank you, if I ever make something GOOD, it will be due to the second link there. A 4 MB download means I WILL learn SOMETHING.

dit: although I will need to look up "linear algebra, calculus, and differential geometry"(from the about.html)

[ November 13, 2007: Message edited by: qwertyuiopas ]

Logged
Eh?
Eh!

frostedfire

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #22 on: November 14, 2007, 07:00:00 am »

hmm maybe if you get to making the visualiser calculate which walls are on the same axis (ie joined via x,y, or z flat walls/floor/ceiling) and automatically make some crude rendering occluder that could work, least until you got into green glass blocks, but by those visuals that's a long way off  ;)
Logged
the spinning bb round hits jack johnson, scumbag in the lower body!
it is pierced through entirely!
his right kidney has been poked out!
his liver has been mangled!

jack johnson, raider has been shot and killed.

The above (including bbcode) neatly weighs in at 255 characters. Fallout meets DF

Mithaldu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #23 on: November 14, 2007, 08:51:00 am »

I'm actually doing that already. While analyzing the map, it stores the type for each tile and in a second step then removes all tiles that can't actually show up.

[ November 14, 2007: Message edited by: Mithaldu ]

Logged

I3erent

  • Bay Watcher
  • The mounted dwarf has gone bErZeRk
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #24 on: November 19, 2007, 02:18:00 pm »

Keep workin dude you need coffee?
Logged
quot;I got really stoned a couple days ago and ended up talking to THIS GUY. anyway... I''m really drunk now. The guy said: There is this application called "Mya" MI-AH that makes animations of people that he paid $2000 for. F- that Jazz ARMOK ROCKS. FIGHT THE MAN, GO TEAM!

Mithaldu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #25 on: November 19, 2007, 09:08:00 pm »

I don't drink coffee, but thanks for the thought in any case. Coincidentally, your post came close to a time where i finished and important step.

While dealing with a truckload of RL-related shit, i've been following up on the previous discussion re making the map *accurate*. By luck i managed to catch Rick on IRC and he's given me the source to his reveal tool and linked me to his memory research pages on the wiki. These two things, as well as the advice and help he's given me have been INSANELY useful, as they spared me from writing an image analyzer that would've only produced rather ambiguous output.

Instead i can bring you now a new dwarvis package with a little addition:
[ http://67.99.19.167/dwarf/dwarvis.rar  ] or [ http://rapidshare.com/files/70932804/dwarvis.rar.html  ]

The little addition is a script called map_extract that is being called by the .bat file of the same name.
Like reveal.exe it has to be called while the game is running. The suggested way to do it is to load the game and press ESC so you're having it run in the least cpu-intensive mode. The memory data is all still present.
Once started, it will then extract the map data in the memory of DF and output it as text files in two fashions:
lite: contains ONLY the type data and is formatted in a way that one can easily do ctrl+f to replace numbers with ascii symbols (as i've done here: http://67.99.19.167/dwarf/ascii_map.txt)
full: this is intended to be loaded by another application (i.e. 3d visualizer software). it contains for each tile the type, the designation flags and the occupancy flags (see here: http://www.dwarffortresswiki.net/index.php/User:Rick/Memory_research#Data_Block  )

Both files are formatted in such a way to represent the data exactly as seen in df, i.e. top left tile in game will be top left in the map file. Each z-level has its own file and each row represents one row ingame. In the lite files each number represents one tile on the x axis and in the full files each tile is represented by a number:number:number block, and the tiles are seperated by | characters. Unallocated tiles, those that would be invisible ingame in either case, are represented by a -1 in both cases.

Note that this data is strictly landscape data. Any creatures on the landscape will not show up as well as wagons. I have not tested yet whether workshops and such will be visible.

Now that this is done, i have a good base for data to use in the visualizer and can concentrate on making it faster.    :)

[ November 19, 2007: Message edited by: Mithaldu ]

[ November 19, 2007: Message edited by: Mithaldu ]

Logged

Arkan15

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #26 on: November 19, 2007, 10:01:00 pm »

Wow, that's really cool. I barely understood any of it but it's still cool.


...How long does it take you to make this stuff?

Logged
IP AND TEAR YOUR GUTS!
YOU ARE HUGE! THAT MEANS YOU HAVE HUGE GUTS!

sinoth

  • Bay Watcher
    • View Profile
    • http://sinoth.net
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #27 on: November 19, 2007, 10:35:00 pm »

Many thanks for this tool, Mithaldu!  This is -exactly- what I was hoping we could get out of memory hacking.  For once, I'm glad I delayed implementing something... the pixel scanning routines weren't very fun.  I'll give the output a look and hopefully we can crank out some nice vis.
Logged
[i do not regret]

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #28 on: November 20, 2007, 03:04:00 am »

Will this show different wall materials? vegetation? flows? etc. ????

If so, AWESOME!!! If not, still awesome.

Edit:
an idea to show wall materials;
I think that all tiles even if not currently shown save their ASCII tile, at least in the old version it was like this I think, if you included this information and textured the surfaces whit the correct ASCII character and color it would give if not the exact material at least the look, and as this is visualizer, that is really all you need, right?
This might also have the effect to show the ASKII for items not otherwise recognized by the visualizer, for good or bad.

I don't want my wooden tower, silt burrow, and marble engraved nobles quarters deep underground all to look the same

Another idea, there should ideally be a wide choice of camera movement and viewing modes, 2 example suggestions is;

free/flying - look around whit the mouse, move forward in all 3 dimensions by holding the left mouse button, and backwards whit he right mouse button;
Dwarf - move in the corridors and on the ground in firs person, fall down pits, blocked by walls.

But here should be many more.

[ November 20, 2007: Message edited by: Armok ]

Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Mithaldu

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 3D Visualizer - EARLY ALPHA
« Reply #29 on: November 20, 2007, 09:08:00 am »

quote:
Originally posted by Arkan15:
<STRONG>...How long does it take you to make this stuff?</STRONG>
Impossible to say. While i do not work very unorganized, it takes a certain measure of awakeness, motivation and inspiration to conspire into having me work on code.

---

quote:
Originally posted by sinoth:
<STRONG>Many thanks for this tool, Mithaldu!  This is -exactly- what I was hoping we could get out of memory hacking.  For once, I'm glad I delayed implementing something... the pixel scanning routines weren't very fun.  I'll give the output a look and hopefully we can crank out some nice vis.</STRONG>
Glad you like it.  :)

 

quote:
Originally posted by Armok:
<STRONG>Another idea, there should ideally be a wide choice of camera movement and viewing modes, 2 example suggestions is;

free/flying - look around whit the mouse, move forward in all 3 dimensions by holding the left mouse button, and backwards whit he right mouse button;
Dwarf - move in the corridors and on the ground in firs person, fall down pits, blocked by walls.

But here should be many more.</STRONG>


Awesome. Currently i have an RTS style camera and a free-floating FPS style camera. I'll definitely add a more dwarvenly one once the fancy strikes me, and i'd like to hear what other ideas you have regarding to cameras.

---

Now, some stuff i've been working a bit on since yesterday: a tile type list. This will be essential to teach the visualizer what it needs to display and i'd be more than happy about any help, either in the form of actual research or donations in form of savegames. The more varied, large and chaotic the savegame, the better.   :)

[ November 20, 2007: Message edited by: Mithaldu ]

Logged
Pages: 1 [2] 3