Jump to content
  • Advertisement

Archived

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

sam_roshan

How to lay Fringe Tiles in Automatically

This topic is 5629 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

Hi Friends! Suppose I have a map with Grass tiles in the 1st layer. Now when I place a sand tile somewhere on the map, it should automatically lay the related fringe tiles around the sand tile. This may be easy. But if a put another Sand tile beside it again it should repeat the above process. Please tell me how it is done? I have seen this happening in Starcraft Map Editor/Kohan Scen%%@ Editor. Please tell me also about the fringe layer. and terrain transistion in Isometric World Thank U Hope u got the Q sammy

Share this post


Link to post
Share on other sites
Advertisement
When placing the tile, check the adjacent tile types. Based upon that tile type, set the border tile accordingly. This means checking each of the directions.

For instance, if you represent each tile by a number and you have 5 tile types not counting border tiles...this gives you tiles of type 1, 2, 3, 4, 5. So, you place a type 2 tile on the upper-left tile on a map. You check the adjacent tiles and see that there are none so this tile is fine. To the right of this tile, you place another type 2 tile. It checks and sees that the tile to the left is also type 2 and no other tiles are present. It is fine. Then you place a type 3 tile to the right of this second tile. The type 3 tile sees that the tile to the left is of a different type (type 2). This requires that a border tile be placed. You can either do this as an overlay or as a seperate tile type. Your implementation choice will determine how subsequent tiles are handled.... but you get the idea.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!