Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

HPK

Tile Transitions

This topic is 5932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Pls could combody give me some codo of how to make tile transitions (from grass to dirt , dirt to water etc..). I Already read the article in this page but i cannot figure out how to do it..

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I think he means actually drawing the tiles. Like instead of just going from grass to dirt, you have a little grass and a little dirt at the transition. That way it doesn''t look as much like a bunch of blocks laid out. What you don''t want to do is create every possible combination of transition tile. For instance, you don''t want grass-water, grass-dirt, grass-forest, water-dirt, water-grass, water-forest, etc. If you do it that way, what happens when you create a new type of terrain? You would have to create a new trasition for all your existing terrains! yikes! I think I know which article you read. Was it this one:
http://www.gamedev.net/reference/articles/article934.asp

If not, check it out. If it is the one you read, what is the exact problem you are having.

Share this post


Link to post
Share on other sites
AP - No you wouldn''t want to generate all of the different tile permitations yourself...but we do have a computer that we can use to do that for us :D

All you would need is a set of different image maps and use them like a alpha channel...a zero meens to use the full pixel color of the first tile...a 255 meens use the full pixel color of the second tile...and the program then just mixes the colors for everything inbetween...a simple app. could be written to do this automaticly for you :D

Share this post


Link to post
Share on other sites
If i dont understand your question then ignore this but the way i do my transitions. (long and boring answer):

What you need: A set of tiles, one for the ground, one for the "blend" In the first pass you render your ground, in the second pass you render your color keyed blend sprite. So you have to choose a predominate terrain type. For example lets say you have some grass terrain and some sand terrain. I make my sand terrain the predominate tile so you have a tile with some sand spread around, and a color keyed background that will be transparent. So you''ve rendered your ground tile and in the second pass you render your color keyed sand tile on top of it, voila, instant blend. When you create your editor simply iterate through all of your tiles, locate the areas where two terrains are different and have it throw the blend tile on top of the subordinate terrain type. That way you dont have to do the blends anymore you can simply automate it.

Dreddnafious Maelstrom

"If i saw farther, it was because I stood on the shoulders of giants."

Sir Isaac Newton

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!