Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 168 169 [170] 171 172 ... 329

Author Topic: Ironhand's Graphics Set (on Hiatus)  (Read 1246220 times)

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2535 on: August 19, 2010, 08:37:23 am »

Hmm.
I don't usually post, as I prefer lurking, but for the few posters lamenting the need for a more powerful gx card; I don't understand what the problem is.

If your laptop cannot handle this lushness (which is an added feature) just stop reading this thread.
What you don't know, will not hurt you in this case.

For you, there will be no difference in terms of hardware because the current system will still be supported.
For the majority of people using DF, they won't even be aware of this thread and it will not affect them.

I use DF on my Desktop PC with its 1.5 kilowatt psu and my NETBOOK with intel GX chip using under 150 watts, personally, whilst on the laptop, I prefer using ascii, and have occasionally used Ironhands or Maydays gx pack.

Agreed. It's pointless to complain in a situation like this.  :o
Logged

carebear

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2536 on: August 19, 2010, 09:23:10 am »

Exactly. It's time to start seeing DF as a brand new game. If your PC is old you can still run it alright, but not with maximum graphics. :P
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2537 on: August 19, 2010, 09:34:41 am »

Actually you can still run it with maximum graphics.

The stuff Baughn makes is his own project and is not related to actual representation of DF itself (which won't be upgraded at least for a dozen of years because Toady One has other stuff to do before that).

The fact that Toady One allows Baughn to upgrade the graphical part is a miracle by itself, so let's stop complaining.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2538 on: August 19, 2010, 09:46:19 am »

This is just a little bit upside down. It'd be trivial to fix in-shader, but every instruction has its cost; I'd rather fix it on the DF side, where it's free (done per-resize, not per-frame).

This is not DF, but it's running the same graphics code as DF. It can also play back DF .cmv files, so I'll get you a proper DF-like screenshot later tonight.

Code: [Select]
An example new-style tileset
# The first array specified *always* sets the base tile size.
# More specifically, the first .png file in that array.
# Oh, and this is a comment. Blank lines work too.
array base 1.0
base.png 16 16

# And here's a double-size copy of the same tiles, which is admittedly ignored by this fragment shader.
array extra 2.0 mipmap
base.png 16 16
Code: [Select]
#version 140 // -*- Mode: C++ -*-

// Default vertex shader. It uses 6 vertexes per tile; depending on profile results, it might be
// better to use a single one (a point), and convert that to triangles in a geometry shader.

// Inserted by DF:
// GRID_X: Number of tiles (horizontally)
// GRID_Y: Number of tiles (vertically)
// DISP_X: Horizontal tile size, in pixels
// DISP_Y: Vertical tile size, in pixels
// vec4[16] colors: colors.txt
#line 9

// Inputs from DF. DO NOT RENAME!
in vec4 screenpos;      // Normalized device location for this vertex
in ivec2 rel_tile;      // rel_tile.xy  = screen location.
in int gl_VertexID;
uniform uvec3 abs_tile; // abs_tile + rel_tile = fort location
uniform float time;     // Seconds since DF was started
// Buffer containing DF screen data
uniform usamplerBuffer tile_array;

// Output defined by OpenGL
out vec4 gl_Position;   // Location to actually draw the vertex at
// Output to fragment shader. Feel free to use whatever.
flat out vec4 color_fg, color_bg;
// Three-dimensional texture position. The actual tile to use is in z,
// but we also need texture coordinates ranging from 0 to 1.
smooth out vec3 texpos;

uint get_data(ivec2 loc) { return texelFetch(tile_array, loc.x * GRID_Y + loc.y).r; }
uint get_tile(uint data) { return           data & 0x00ffffffu; }
vec4 get_fg(uint data) { return colors[int((data & 0x0f000000u) >> 24u)]; }
vec4 get_bg(uint data) { return colors[int((data & 0xf0000000u) >> 28u)]; }

void main() {
  // Write the position through.
  gl_Position = screenpos;
  // Compute the foreground and background colors
  uint data = get_data(rel_tile);
  color_fg  = get_fg(data);
  color_bg  = get_bg(data);
  // Compute the texture position. Notice how we prefer a bit of extra calculation to ifs..
  // Though TODO: We can save quite a lot of work with a geometry shader.
  vec2 coords[6] = vec2[](vec2(0,0), vec2(0,1), vec2(1,0),
                          vec2(1,0), vec2(0,1), vec2(1,1));
  texpos = vec3(coords[gl_VertexID % 6], get_tile(data));
}
Code: [Select]
#version 140 // -*- mode: C++ -*-

uniform float time;     // Seconds since DF was started

flat in vec4 color_fg, color_bg;
smooth in vec3 texpos;

// Texture array according to the tileset
uniform sampler2DArray base;

void main() {
  // gl_FragColor = color_fg;
  vec4 color_tex = texture(base, texpos.yxz);
  gl_FragColor = mix(color_bg, color_tex * color_fg, color_tex.a);
}
« Last Edit: August 19, 2010, 10:03:05 am by Baughn »
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

qwert

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2539 on: August 19, 2010, 10:08:08 am »

Just a note, about only 1 in 5 gamers do not have DX 10/11 compatible cards, the first of which were released 4 years ago. (Heck I just bought a card to replace one that died, and it was only ~$30, fully DX10 compatible).
Logged

WormSlayer

  • Bay Watcher
    • View Profile
    • WormSlayer.com
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2540 on: August 19, 2010, 10:28:06 am »

Go Baughn! :D
Logged

Classico

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2541 on: August 19, 2010, 10:52:53 am »

Hello all, I've finally registered after lurking in here for many many months. Ironhand, Wormslayer, thank you muchly for the graphics set. Mayday got me into Dwarf Fortress, but you've both kept me hooked. I hope you two, Baughn, and Toady keep up the awesome work!
Logged
Urist McRipley: I say we take off and flood the site with magma. It's the only way to be sure.

WormSlayer

  • Bay Watcher
    • View Profile
    • WormSlayer.com
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2542 on: August 19, 2010, 01:34:11 pm »

Mein Führer! I can walk! :D
Logged

Classico

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2543 on: August 19, 2010, 01:50:47 pm »

[BOOM]

We'll meet again, don't know where, don't know when...

/end derail

Back on topic. When talking about computers, the smart ass used to ask if it could run Crysis. In the future, it'll be "Yeah, but can you run Dwarf Fortress?"  8)
« Last Edit: August 19, 2010, 02:20:07 pm by Classico »
Logged
Urist McRipley: I say we take off and flood the site with magma. It's the only way to be sure.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2544 on: August 19, 2010, 01:54:55 pm »

Mein Führer! I can walk! :D
Huh?

Just a note, about only 1 in 5 gamers do not have DX 10/11 compatible cards, the first of which were released 4 years ago. (Heck I just bought a card to replace one that died, and it was only ~$30, fully DX10 compatible).
My card costs 10$ (Geforce 9800) and it supports it too. My previous card (Geforce 8600 which died) served me a few years before that and it had dx10 support too. Honestly, you can miss one movie in iMax and buy yourself a Directx10 card. Well, unless you're like me spending all your money on your son and wife. But I've bought the card before so that's okay :D.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

WormSlayer

  • Bay Watcher
    • View Profile
    • WormSlayer.com
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2545 on: August 19, 2010, 02:34:10 pm »

Huh?

Classico's avatar is Dr. Strangelove - Absolutely classic movie, Peter Sellers at his best, cant recommend highly enough! :D

Also it's true, you can pick up dirt cheap DX10+ graphics cards now, I dont think anything less is even available?
« Last Edit: August 19, 2010, 02:36:10 pm by WormSlayer »
Logged

ghostxxx

  • Bay Watcher
  • and my Axe!
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2546 on: August 19, 2010, 02:34:23 pm »

This is great work guys! Keep it up! You're leaps and bounds beyond what I can contribute, but if there is anything you need, don't be afraid to post a request.

P.S.
Elona was a sweet game. Graphics were a bit rough, but I loved the concept.
Logged

Prastary

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2547 on: August 19, 2010, 03:30:30 pm »

My card costs 10$ (Geforce 9800) and it supports it too. My previous card (Geforce 8600 which died) served me a few years before that and it had dx10 support too. Honestly, you can miss one movie in iMax and buy yourself a Directx10 card. Well, unless you're like me spending all your money on your son and wife. But I've bought the card before so that's okay :D.

In many cases its not so simple, bacause to use a new card you must change almost whole computer (e.g. mainboard still with agp)... So it's not silly 10$.

Back to the theme - Ironhand you could throw us some graphical bone or you will have another few pages of offtop :)
Logged

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2548 on: August 19, 2010, 03:40:50 pm »

Mein Führer! I can walk! :D
Huh?

Just a note, about only 1 in 5 gamers do not have DX 10/11 compatible cards, the first of which were released 4 years ago. (Heck I just bought a card to replace one that died, and it was only ~$30, fully DX10 compatible).
My card costs 10$ (Geforce 9800) and it supports it too. My previous card (Geforce 8600 which died) served me a few years before that and it had dx10 support too. Honestly, you can miss one movie in iMax and buy yourself a Directx10 card. Well, unless you're like me spending all your money on your son and wife. But I've bought the card before so that's okay :D.

Huh? You probably meant $100 at least. :P
Logged

ginsweater

  • Bay Watcher
    • View Profile
Re: Ironhand's Graphics Set (0.48 released!)
« Reply #2549 on: August 19, 2010, 03:50:35 pm »

Huh? You probably meant $100 at least. :P

No, really - here is a $34 card that should be able to run shader-mode. Probably there are cheaper cards out there, that was the one I found in 30 seconds.

The real problem - and the reason most commercial games still have some legacy support for DX9 hardware - is laptops and all-in-ones. Of course, DF has legacy support for older hardware as well...

Back to the theme - Ironhand you could throw us some graphical bone or you will have another few pages of offtop :)

How about this? This is a mockup in Rendermonkey (ATI's shader editor) of depth-blending, which Artanis and I were talking about before the derail of the derail. Please excuse the cheesy Photoshop Cloud texture I used as noise:



As I see it, next job is to get some prettiness up and running to justify this semi-fancy hardware.

In 3D, you have to do all this crazy spherical math to do depth-blending, but in 2D it's dead simple. Here's the shader:
Spoiler (click to show/hide)

We don't have all the tile info, though, so blending cloud effects like that is kinda silly. At least until we can talk Toady into making multiple passes as mentioned earlier.

Pretty much, although as WormSlayer said, it might be possible to do something neat around the edges. And Baughn foolishly said that multiple passes might not be unreasonable!  :P
Logged
Pages: 1 ... 168 169 [170] 171 172 ... 329