View previous topic - View next topic |
Author |
Message |
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Wed May 28, 2003 2:12 am Post subject: Tile methods |
[quote] |
|
I'm wondering if anyone else has developed interesting methods for drawing tiles. I thought I would share mine since someone could benefit from it.
In my game I developed "tilesets" which are an array of either 20 or 28 (depending on the type) quarter-sized (since I use 32x32 tiles, they are 16x16 each) blocks that are loaded from a graphic file. Thats 5 or 7 different types of tile for each corner (fully filled, horizontal edge, vertical edge, outside corner, inside corner, and alternately, two extras).
These are assembled into patterns based on the borders between different map tiles. So in other words, I only have one tileset for "shore" or "desert", and when I draw with it on the map, the edges are automatically built using this array of quarter-tiles. Which edges to use arent saved but they are computed and stored when the map is loaded. Tilesets can have "exceptions" where borders are drawn, so that within a "grass" tileset I can place a "deep grass" tileset. Tileset edges can also be used to block movement, as with the edge of a plateau.
Anyway this way I can provide neat edges to various areas of the map without having to go nuts putting different tiles together in my map maker and making my map files huge with too many possible tiles.
I have no idea if I'm explaining this well, or maybe everyone uses this method, but I thought I would share it. I'm interested to hear if anyone uses other methods.
|
|
Back to top |
|
|
Modanung Mage
Joined: 20 Jun 2002 Posts: 317 Location: The Netherlands
|
Posted: Wed May 28, 2003 6:56 pm Post subject: |
[quote] |
|
Bjorn was planning on implementing this method in our engine, both for tiles and fences/walls and the like... weren't you, Bjorn.
|
|
Back to top |
|
|
Bjorn Demon Hunter
Joined: 29 May 2002 Posts: 1425 Location: Germany
|
Posted: Wed May 28, 2003 7:42 pm Post subject: |
[quote] |
|
Well, indeed I was. Until now though, implementing that method would have been more troublesome and limiting than just drawing the tiles ourselves. If I would implement it later though, it will certainly be in a mixed way, still allowing individual tiles to be placed.
What I would like to try in the future though, is to have a basic terrain layer and implement any features with objects. The terrain would be like it is in UT2003 and Morrowind, 3D (so it can do hills and their shading) and with a combination of single-texture layers of which you can draw the alpha channel. I'm curious as to how this would work out.
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Wed May 28, 2003 10:52 pm Post subject: |
[quote] |
|
I do use a combination of tilesets and objects actually, here you can see.
So, the trees and house walls, rocks, etc are all regular tiles (my tiles can be oversized). The path, rough grass, water, and even the house roof are all tilesets.
Each row corresponds to a corner (upper left, upper right, lower left, lower right)
This is one of 6 tilesets used to manufacture the roof.
Its a little tricky at first learning the principles of how they go together, but I find its much easier to have my game assemble things for me rather than to go through assembling a unique tile for every possibility. When you include inside-corners, outside corner, and straight edges, there are 47 possible combinations (belive me thats how I used to do it). Thats a lot of work to manufacture, and a lot of memory wasted.
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Wed May 28, 2003 11:34 pm Post subject: |
[quote] |
|
Damn, I love those trees- Very stylized.
|
|
Back to top |
|
|
twinsen Stephen Hawking
Joined: 21 May 2003 Posts: 242 Location: Melbourne, Australia
|
Posted: Thu May 29, 2003 12:24 am Post subject: |
[quote] |
|
Forget stylized... those graphics are bloody awesome. Whoever drew them, can I marry you? Okay, maybe that a bit over the top. But yer- those graphics beat the hell out of anything I've ever seen in an indie game. _________________ Lovely girls & great prices always available at CLUB 859, 859 Glenhunly Road, Caulfield, Open 10am till late 7 days. +61-3-9523-8555. (Sorry, it was in front of me in the newspaper, I just had to use it as a signature!)
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Thu May 29, 2003 12:42 am Post subject: |
[quote] |
|
yeah, it looks kinda like paladin's quest for the snes- but better. Much better. PQ used all pastels, kinda like this, but it had next to no shading and looked really ametureish because of it. This does not.
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Thu May 29, 2003 1:43 am Post subject: |
[quote] |
|
Funny you should mention Paladin's Quest, that's one of my favorite games. I definately try to put a lot of nice bright colors in, and Lennus (Paladin's Quest) and Lennus 2 are definately good role models. I'm not much for "realism" in game graphics.
Anyway I try my best, I'd post more pics but since everything is still pretty much in-progress I prefer to keep things under wraps.
|
|
Back to top |
|
|
js71 Wandering DJ
Joined: 22 Nov 2002 Posts: 815
|
Posted: Thu May 29, 2003 1:55 am Post subject: |
[quote] |
|
By the way... Anyone know where I can get an ENGLISH Lennus 2 ROM?
|
|
Back to top |
|
|
Nephilim Mage
Joined: 20 Jun 2002 Posts: 414
|
Posted: Thu May 29, 2003 1:59 am Post subject: |
[quote] |
|
First off, great screenshot! Looks fun. The grass and path, especially, have a nice organic look to them.
My tiles are 32x32 also, but I just do full-frame tiles, not quarter-tiles like you're doing. Maybe I should. But hey, I gotta draw the line somewhere.
The way I do my tiles, I give 'em alpha channels so that I can lay any type of tile over any other type of tile to get a nice layered effect. I don't have, say, water to grass transition tiles. Instead, I just draw the water in the bottom layer, and a grass edger in the second layer. The water shows through the alpha-channeled edger. (Not sure if this is the same sort of thing you're describing. Mine is done at run-time, so that it can be changed dynamically if need be.)
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Thu May 29, 2003 2:31 am Post subject: |
[quote] |
|
I really like that kiddie feeling and happy-go-lucky bright colors. Not to put it down using those descriptions, but kewl.
|
|
Back to top |
|
|
twinsen Stephen Hawking
Joined: 21 May 2003 Posts: 242 Location: Melbourne, Australia
|
Posted: Thu May 29, 2003 2:52 am Post subject: |
[quote] |
|
I have only one criticism, and its not really a criticism. I know its a flower behind the character, but it looks like the third character is holding a giant banana. :) _________________ Lovely girls & great prices always available at CLUB 859, 859 Glenhunly Road, Caulfield, Open 10am till late 7 days. +61-3-9523-8555. (Sorry, it was in front of me in the newspaper, I just had to use it as a signature!)
|
|
Back to top |
|
|
ThousandKnives Wandering Minstrel
Joined: 17 May 2003 Posts: 147 Location: Boston
|
Posted: Thu May 29, 2003 3:08 am Post subject: |
[quote] |
|
Gee, thanks for all the positive feedback! Not really required but nice nonetheless. I like the point about the banana! hahaha I totally hadnt noticed that.
Quote: | The way I do my tiles, I give 'em alpha channels so that I can lay any type of tile over any other type of tile to get a nice layered effect. I don't have, say, water to grass transition tiles. Instead, I just draw the water in the bottom layer, and a grass edger in the second layer. The water shows through the alpha-channeled edger. (Not sure if this is the same sort of thing you're describing. Mine is done at run-time, so that it can be changed dynamically if need be.) |
I don't really know what "alpha-channeling" means (although I see it everywhere). Doesnt it mean a transparency? Actually, I do that (sometimes). The dark and light grass are just drawn on top of the full 32x32 regular grass tile (I do also use regular-sized tiles, I have indexing files that tell the game which graphics to load, how big they are. and how to read them). But, for example, with a water shore, the field is drawn as part of the shore, and the water is used as the background. I really have to choose one or the other because I cant have two backgrounds.
Actually, I can have two backgrounds. The path in from of the door is drawn on top of the rough grass, which is drawn on top of the regular grass. It's a little wasteful because the game doesnt know whether the background tile is going to even get shown, or completely drawn over: they all get drawn anyway. With all that excess blitting going on the game only runs at a 15ms loop (60FPS I think?, duh... math).
I use 8-bit paletted mode too, so I can do neat palette effects that I couldnt do in 16-bit RGB (I'm so jealous of consoles that get 16-bit paletted modes...). The only thing I miss having is transparency (which technically I could do but it would eat away at my palette more than I want).
And I definately don't take "kiddie" and "happy-go-lucky" as put downs. Thats totally the way I like it looking. Everything thats an obstacle or an object has a black outline around it to make it cartoony, something that was a concious decision (plus it saves having lots of dark colored-outline palette entries).
And actually Neph the the way you describe doing additional walking layers sounds both adequate and ingenious. There are obviously deficiencies but they can easily be hidden by just designing locations so that things like that dont happen! :)
|
|
Back to top |
|
|
twinsen Stephen Hawking
Joined: 21 May 2003 Posts: 242 Location: Melbourne, Australia
|
Posted: Thu May 29, 2003 3:12 am Post subject: |
[quote] |
|
Yes, alpha channel pretty much equals transparency. Its normally a value between 0-1 or 0-255 (depending on what system you use) which indicates how transparent something is going to be. In the 3D RPG I'm working on in OpenGL ATM I specify the alpha value with the color like so:
glColor4f(1.0, 0.0, 0.0, 0.5)
or... glColor4f(RED,GREEN,BLUE,ALPHA)
So you've got a red channel, green channel, blue channel, and that infamous alpha channel. _________________ Lovely girls & great prices always available at CLUB 859, 859 Glenhunly Road, Caulfield, Open 10am till late 7 days. +61-3-9523-8555. (Sorry, it was in front of me in the newspaper, I just had to use it as a signature!)
|
|
Back to top |
|
|
Guest
|
Posted: Thu May 29, 2003 3:19 am Post subject: |
[quote] |
|
I just noticed- the evergreen trees look like giant fountains of water- Try to make em more green and take out that black line between the 'sections', if you know what I mean.
|
|
Back to top |
|
|
|
Page 1 of 2 |
All times are GMT Goto page 1, 2 Next
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|