Bay 12 Games Forum

Please login or register.

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

Author Topic: Different tiles for different quality  (Read 3175 times)

mickel

  • Bay Watcher
    • View Profile
Different tiles for different quality
« on: August 26, 2007, 06:30:00 pm »

This ties in with my "alternative tiles" suggestion. If one could manage to illustrate this with 16x16 tiles, it would be interesting to have different tilesets for different quality levels of each item type. Let's say that instead of six different tiles for a door (for mere variation) there are six different tiles for every quality level for the door, allowing you to quickly see at a glance just how nice it is. Or you could just have one tile for every quality with that being the only variation...

Once tilesets begin getting fully implemented, this wouldn't be too hard to do, except that someone (or someones) will have to draw the tiles.

My pixel pushing days are largely behind me, but I don't shrink from returning to the breach yet again if it comes to that...   :)

Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #1 on: August 26, 2007, 07:10:00 pm »

Great idea! I gave it some though and my head just about exploded with awesome!

That can be done but it would need to fit with the ASCII simplicity. If i look at a door and see a chevron of a certain colour on it, that tells me right away the quality of the door.

For flooring, a + mark indicates smooth ground. If the colours are reversed it indicates engraved ground. With a little extra work you could add small indicators of only a few pixels:
1. The tile could have a coloured border. IE, grey square, black cross, gold box indicates a square of double detailed black stone with inlaid gold.
2. Single dots of colour at the corners of the tile. A black square with a grey cross and dots of green at the corners indicates smoothed plain stone with embedded green glass tiles.

The possibilities with this are endless!
1. You could have the cross indicating stone type superimposed by a smaller cross that covers the center point. Or the opposite with the tips of the cross coloured as an indicator.
2. The border of tiles could have different patterns of lines or shapes such as a "comb" or line of triangles.
3. The 4 right angles of the cross could be filled with triangles of colour.
4. Instead of just a dot of colour, the corners of each tile could be filled with triangles of other shapes.

If you make even a simple change to each tile, it forms a pattern. Triangles at the corner of each tile forms coloured diamonds when the tiles are repeated. All of this could be applied to doors as well. With even a few simple options we can form spectacular patterns for flooring, and make unique doors.

Unfortunaly this can not be implemented just yet. According to Toady there is no way to superimpose or display tiles on top of other ones yet. To do so would require a lot more coding.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

AlanL

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #2 on: August 26, 2007, 09:54:00 pm »

It would probably be a good idea to stick to the K.I.S.S. principle as much as reasonable, otherwise it could spiral up to a coding nightmare.
Logged

Savok

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #3 on: August 26, 2007, 11:16:00 pm »

DF has minimal graphics, and Toady plans to keep it that way.
Logged
So sayeth the Wiki Loremaster!

ctrlfrk

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #4 on: August 27, 2007, 12:22:00 am »

Actually toady is quite happy to include the possibility for extra graphics, as can be seen by his inclusion of object tiles. He just doesnt want to do it himself, and it isn't high on his priority list.
Suggestions like this id assume get put on one of the lists he has lying about the place. It may already be there.
Logged

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #5 on: August 27, 2007, 01:09:00 am »

This would in no way be a coding nightmare at all. As i said before currently DF can not support the display of tiles on top of each other. What i mean by this is a tile with a transparent background can not be displayed over another, it must replace the original tile.

If this was possible, futher detailing floors would involve the addition of a few pixels per tile using a seperate blank template. For example, the template would be 4 small triangles placed at each corner of the tile. A large patch of smoothed white stone, would be a black floor dotted with white + signs. The triangle template is coloured white and overlayed onto the tiles. You now have a grid of white diamonds interspaced with white + signs. This is combined to create the floor that you see in the game.

Another interesting possibility is diagonal walls. Since the grid is made of squares, there would need to be little triangles added to the interspacing squares or else the wall will appear to have triangle shaped gouges in it. If these triangles are added and the lines match up, you then have a continuous diagonal wall. The floor plan remains exactly the same.

Its really that simple, but i imagine it would take a lot of coding. Since it is nothing but window dressing it can wait, but i would like to see something like this in the future.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

mickel

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #6 on: August 27, 2007, 06:36:00 am »

I don't see why it would be a coding nightmare either. The ASCII simplicity is not actually an ASCII simplicity, it's graphical tiles with ASCII chararacters on them because nobody has bothered doing anything else. Since the ability is there it makes no sense not to use it. If Toady doesn't want to draw graphics beside doing everything else, which is pretty understandable, we'll just have to do it ourselves.

In coding terms it seems fairly simple to me. Instead of having one object type having one tile, they just need an array of tiles. Let's say a two-dimensional array, where one dimension is for quality and the other is for variation. Then the game would pick the correct dimension based on quality, and choose in the other dimension either randomly, or based on player preference.

And if one really needs the code to recieve one and only one tile, the above procedure could be made entirely opaque to the rest of the code.

Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #7 on: August 28, 2007, 02:24:00 pm »

One thing Toady said in his interview awile back was that adding something to the game would add so many big and little things to the game that we can not even predict because we havent discovered them yet!

Even if he made the mechanics possible it would allow the whole community to create custom stuff so he does not have to.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

mickel

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #8 on: August 29, 2007, 10:14:00 am »

quote:
Originally posted by Tamren:
<STRONG>One thing Toady said in his interview awile back was that adding something to the game would add so many big and little things to the game that we can not even predict because we havent discovered them yet!</STRONG>

That's one of the things I love about this game and which I feel makes it so life-like. There are tons of things, each just a little detail, but added together they make a very vivid image. Rather like an impressionist painting.

I feel my suggestion would add not so much (in fact nothing at all) to the game mechanics, but a great deal to the look of the game.


quote:
<STRONG>Even if he made the mechanics possible it would allow the whole community to create custom stuff so he does not have to.</STRONG>

I'm not sure I understand that sentence. Could you rephrase it?

[ August 29, 2007: Message edited by: mickel ]

Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #9 on: August 30, 2007, 02:33:00 pm »

quote:
Originally posted by mickel:
<STRONG>I'm not sure I understand that sentence. Could you rephrase it?</STRONG>

Take for example the RAW files in the DF directory. They allow players to change stuff without digging into the game and changing the code. Now if for example i wanted to make cats tameable i could go into the RAW and change one line instead of asking Toady to do it.

In regards to floor tiling, a RAR would allow us to make custom tiles and point the game towards them without manually coding them into the game. Different lines in the RAR would point to seperate tiles in the source BMP.

The file might look something like:
[SOURCE]customtile.bmp
[1]

A1 where a1 points to the first tile in the bmp
You could add a second i guess
[2]
A2

Now that would be as far as it would go if we only wanted a simple patterm that is the same on all tiles. If you wanted to be more detailed you could add more lines for tiles on the edges and corners of a room. Even tiles to fit onto diagonal walls if such were ever implemented.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

mickel

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #10 on: August 30, 2007, 05:37:00 pm »

Aah.

I usually get by pretty well, but ever so often the fact English is only my second language catches up with me and I just fail to understand. Sorry about that.

As far as I can tell, most if not all of the infrastructure for my suggestion is already there, if not completely implemented yet.

There is a file where you can tell which graphics file belongs to which object, and as long as the graphics file is in the correct format it all works perfectly. The graphics files are plain bitmaps, so you can change them to your heart's content.

In my above example, every object might have a bitmap file that is a nx6 grid of 16x16 px icons, where the x axis is a scale of quality, and the y axis is just for variation. At the top left you'd have your lowest quality item graphic, with five variations. Then you'd have a row of... well, you get the picture.

And if you didn't want to bother doing all the variations you could do two or three and repeat them.

Logged
I>What happens in Nefekvucar stays in Nefekvucar.

mickel

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #11 on: August 30, 2007, 05:40:00 pm »

Having corner and edge tiles as you suggested would be a nice step up. I don't know if the game currently supports it or will at some point in the future, but I like your idea for implementing it. Simple and effective enough for me at least. I like the combination plain text file + plain bitmap file, and the longer we can expand on that before we need to replace it, the better.
Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #12 on: August 31, 2007, 03:15:00 pm »

You could probably do this now. The problem with it though is that you can only change the entire tile. Want a + sign with trim on it? you have to combine the two, and all areas must be coloured the same.

Transparent overlays adding the trim on top of existing graphics is whats needed but then the whole system becomes horribly complicated. For example, the smiley face representing a dwarf, if you put layering in, you would be able to show the smily face on top of whatever terrain he is over. But because of the way it is coloured, a mechanic standing on smoothed ground would be a red smily face with a grey + inside of him.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

mickel

  • Bay Watcher
    • View Profile
Re: Different tiles for different quality
« Reply #13 on: August 31, 2007, 03:51:00 pm »

Transparent overlays would probably make things easier, but I don't see it as necessary at all. This kind of thing has been done since Ultima, the method is already there.
Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Different tiles for different quality
« Reply #14 on: August 31, 2007, 05:45:00 pm »

I guess the only problem is all the little details you have to imput. The smiley for example, you want the outline and the features to be red lines right? Well when you want to have said smiley stand over the terrain you have to speciff the space INSIDE the sprite to be opaque and not let the terrain show through.
Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?
Pages: [1] 2