Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Which ramp style is your favorite?

A) Angled Square
- 30 (31.3%)
B) Smoothed Square
- 21 (21.9%)
C) Angled Circle
- 39 (40.6%)
D) Smooth Circle
- 6 (6.3%)

Total Members Voted: 95


Pages: 1 ... 5 6 [7] 8 9 10

Author Topic: 3D GUI for DF [Discussion & Development]  (Read 54047 times)

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #90 on: October 02, 2009, 07:14:56 pm »

Welcome to the forum, Jonas.  That looks like a great start.  There are no current 2D isometric visualizers I know of, although the 3D visualizer Khazad has an isometric mode.
Logged

jonask84

  • Bay Watcher
    • View Profile
    • Stonesene at Google Code
Re: 3D GUI for DF [Discussion & Development]
« Reply #91 on: October 02, 2009, 09:21:08 pm »

Welcome to the forum, Jonas.  That looks like a great start.  There are no current 2D isometric visualizers I know of, although the 3D visualizer Khazad has an isometric mode.

Thanks mate :)

Yeah, I've been trying out Khazad. Love it. It was great for viewing things at a distance, making it ideal for mega projects and such. However, I had problems navigating up close, and I hope fix some of that in my program, so it will be more apt as a game user interface.

That, and also I just have a total fetish for good ol pixelart and isometric games
Logged

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #92 on: October 02, 2009, 11:37:22 pm »

Greetings jonask84, glad to hear your a fan of Khazad, I'd love to get some feedback on any problems/difficulties you experienced so we can try to adress them.  Navagation is a primary concern of mine and a big challenge in 3D space.

I's good to see that progress is being made on a 2D isometric engine.  Though I'm using 3D isometric, the 2D style is certainly a concept that should be explored.  I'ts also good to see that Peterix's dfHack library is getting used, it's really serving the purpose of getting people over the 'hump' of reading data from DF and right into the meat of making a renderer.  Good luck and keep in touch, I imagine we can share design tips and strategies.
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #93 on: October 03, 2009, 01:24:33 am »

The question I've made was about the implementation of 2d sprites, not the actual reason WHY. I agree that sprites would make DF more playable than 3d, but is there any progress on the transformation from 3d to 4-planes-view? Because currently everything in DF is already 3d, so it's possible to extract map info and "span some volume" by adding some height to Z axis by some 3d-building engine and make it visual, like the developers of Khazad, 3dwarf and Visual Fortress have made, but to make it isometric with ability to rotate you will have to write an engine which handles sprites with orientation and apply 2d images on 3d surface anyway, right? So, who currently picked up the coding part, or is it just a concept art thread yet (I hope someone is working on it :))?

Quote
Anyway, I'm dabbling with some isometrics myself, and using DFhack I made some stuff.
Wait, are these already ripped from the game (I mean terrain info), with the objects like trees, and your visualizer builds the picture based on it? If so, great :). At first I was afraid that this is another discussion thread with great ideas, artist and people talking but nobody taking the main role, but if you did it, that's a good starting point :D. Too bad I am a dabbling coder, using python and C here and there without much knowledge, but at least I will be one of those many who will praise your work and offer 2d images/3d models :).
« Last Edit: October 03, 2009, 01:29:02 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #94 on: October 03, 2009, 02:46:24 am »

hmm...if DF supported transparency, then 1-layer slicing could indeed just be "draw order and locations" as well as an unusual view selection.


Minerals (as current tiles) and ballista arrowheads and dwarves in something that should work so, with letters cut from my 8x8:


...the fg/bg system is too limiting for this, though, I think.

EDIT: Well, now I have written a gimp script that performs the operation in the first image. Using Sol's tileset, 32 tilesize 2 rows 8 cols x-offset 0 y-offset 32:


edit 2: made andesite tile, flipped fg/bg (but not in raws, so it's inverted) sides could shade while symbol is monocolor, dug out a demonstration (had to hide the stone)-unfortunately, my version doesn't seem to be drawing sharp edges quite right.
Spoiler (click to show/hide)
« Last Edit: October 03, 2009, 07:41:54 am by CobaltKobold »
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

jonask84

  • Bay Watcher
    • View Profile
    • Stonesene at Google Code
Re: 3D GUI for DF [Discussion & Development]
« Reply #95 on: October 03, 2009, 08:29:24 am »

Greetings jonask84, glad to hear your a fan of Khazad, I'd love to get some feedback on any problems/difficulties you experienced so we can try to adress them.  Navagation is a primary concern of mine and a big challenge in 3D space.

I's good to see that progress is being made on a 2D isometric engine.  Though I'm using 3D isometric, the 2D style is certainly a concept that should be explored.  I'ts also good to see that Peterix's dfHack library is getting used, it's really serving the purpose of getting people over the 'hump' of reading data from DF and right into the meat of making a renderer.  Good luck and keep in touch, I imagine we can share design tips and strategies.
Honored to meet you Impaler! Let me tell you straight away I love your code, and let me also extend my thanks for making it so clear and easy to understand :)

I was constantly looking to your Khazad code as I wrote my dfHack interface, it was a great help.

Im sure we have a lot to talk about heh, all kinds technical stuff. I'm using MSVC and their compiler, so I had to do some mad ugly hacking to get dfHack to compile (but now it does!). I like the IDE I guess... For rendering I the allegro 2D gaming library.

Speaking of navigating in a 3D world.. When I played 3D strategy/god games, I found it very useful when you could 'lock' the camera in an isometric perspective. Having full 3D is great for some purposes, but sometimes (esp in strategy top-down views) it can get a bit disorienting? Maybe it would be an idea to introduce a mode that locked the camera angel, and use the keys to pan around instead? I dunno :)

PS. This already seems like a great forum, glad to be here
Logged

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #96 on: October 03, 2009, 09:40:09 am »

What you really want is the 40d## I/O source, which is probably publicly available. 
Some code comes with the d## linux version, at least.
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #97 on: October 03, 2009, 11:27:59 am »

hmm...if DF supported transparency
The 40d# versions do.  That's what the deal is with some of the newer tilesets, like PTTGV5.
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

Andir

  • Bay Watcher
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #98 on: October 03, 2009, 11:41:07 am »

hmm...if DF supported transparency
The 40d# versions do.  That's what the deal is with some of the newer tilesets, like PTTGV5.
To put it bluntly though... it doesn't matter.  You can't do psuedo isometric because each tile is in the same row.  Where iso requires alternating rows.  Not only that, the tiles are not placed via central coordinates.  Each tile uses an x,y linked to the top/left corner.  I would actually love to see the builds use a center point and align each tile to that.  You could have oversize tiles and allow them to overlap textures for better transitions.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #99 on: October 03, 2009, 01:14:39 pm »

One, look at the full text of what I said. Two, click on the spoiler. For this style tile(north=up-right) what was top left corner of 0,0 is now at (tilesize(rows-1),0) instead of the origin.
in tiles:
(+1, 0) -> (+1/2, +1/4)
(0, +1) -> (-1/2, +1/4)

Like I (and Toady) said: "draw order and locations". Transparency raises the issues of maybe needing to draw the underlying tile as well as unit/item, but if you're drawing anything with an alpha channel (which we can now do) then it just means draw tile then item, if you want to use painter's algorithm:
  1
 2 2
3 3 3, etc.  (With multiple z, you would just do each column bottom to top in that order- but then, you probably want to do occlusion checking, so you're not rendering every single cube each frame)
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #100 on: October 03, 2009, 04:59:08 pm »

[quote author=jonask84 link=topic=35050.msg793688#msg793688
Honored to meet you Impaler! Let me tell you straight away I love your code, and let me also extend my thanks for making it so clear and easy to understand :)

I was constantly looking to your Khazad code as I wrote my dfHack interface, it was a great help.

Im sure we have a lot to talk about heh, all kinds technical stuff. I'm using MSVC and their compiler, so I had to do some mad ugly hacking to get dfHack to compile (but now it does!). I like the IDE I guess... For rendering I the allegro 2D gaming library.

Speaking of navigating in a 3D world.. When I played 3D strategy/god games, I found it very useful when you could 'lock' the camera in an isometric perspective. Having full 3D is great for some purposes, but sometimes (esp in strategy top-down views) it can get a bit disorienting? Maybe it would be an idea to introduce a mode that locked the camera angel, and use the keys to pan around instead? I dunno :)

PS. This already seems like a great forum, glad to be here

[/quote]

Thanks for the complements on my coding style, I try to make it very readable.  I've used MSVC in the past but prefer Code Blocks because it's free, that said we should make an effort to get a MSVC project file in Khazad to make it easy on people who use MSVC.

With regards to 3D navigation, as you know Khazad's camera can tilt changing the angle at which it looks at the ground.  This is normally done with mouse motion in the vertical axis when the left mouse is pressed.  But we have whats called a 'vertical lock mode' in which snaps the camera to looks strait down and ignores the mouse motion that would normally change the tilt, the intent is to somewhat replicate the feeding of playing DF in its current top down state. 

It might be desirable to extend that in principle to locking the camera tilt at any angle, the player simply positioning to camera tilt to their liking and then locking it.  Or a lock to 'equilateral' (when all three axis are of equal length as in your projection) or other similar angles could be included.

Panning is currently done by depressing (but not turning) the mouse wheel and then moving the mouse, this functions very much like a 'grab' on a pdf, moving the mouse the right pans leftward.  It is probably not intuitive enough and having the directional keys pan is a good idea.

I'll give you a heads up when I get these changes made so you can test a snapshot and tell me what you think, likewise I look forward to testing your viewer (which really needs a name by the way).
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

jonask84

  • Bay Watcher
    • View Profile
    • Stonesene at Google Code
Re: 3D GUI for DF [Discussion & Development]
« Reply #101 on: October 03, 2009, 06:27:28 pm »

Code Blocks eh? I gotta try that out some day.

Didnt know about the wheel panning, glad to hear it's in there :)

Yeah, I guess I do need a name for it. heh gotta think about that one for a bit.

If you PM me your email, I can send you a build if you want to try it out?
I've got another tread going looking for people to alpha it. it looks too shabby to launch right now, that's why im not going public juuust yet :)
Logged

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #102 on: October 03, 2009, 09:47:45 pm »

Quote
If you PM me your email

Right under my User name, same as Peterix
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

Andir

  • Bay Watcher
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #103 on: October 04, 2009, 12:02:38 am »

One, look at the full text of what I said. Two, click on the spoiler. For this style tile(north=up-right) what was top left corner of 0,0 is now at (tilesize(rows-1),0) instead of the origin.
in tiles:
(+1, 0) -> (+1/2, +1/4)
(0, +1) -> (-1/2, +1/4)

Like I (and Toady) said: "draw order and locations". Transparency raises the issues of maybe needing to draw the underlying tile as well as unit/item, but if you're drawing anything with an alpha channel (which we can now do) then it just means draw tile then item, if you want to use painter's algorithm:
  1
 2 2
3 3 3, etc.  (With multiple z, you would just do each column bottom to top in that order- but then, you probably want to do occlusion checking, so you're not rendering every single cube each frame)
One, what I was talking about is putting a tile set in the engine as it is now.  It's impossible.  Two, don't talk to me that way.  (it's late, I'm grumpy and your post sounds condescending.)  The game engine would have to change for that to even work.  When it was mentioned that the current engine has transparency, I stated the blunt obvious that it wouldn't work with the tiles as they are now where (0,0) is top/left and not staggered.  You'd need code changes and simply plugging in an isometric looking tile set WILL NOT work.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: 3D GUI for DF [Discussion & Development]
« Reply #104 on: October 04, 2009, 07:23:27 am »

Sorry, I didn't mean to sound condescending. The screenshots show that it doesn't work. (Cavalier projection almost does, since you can pick angle so that nothing would be occluded anyway)

Yes, it would require code changes, I agree.
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets
Pages: 1 ... 5 6 [7] 8 9 10