Sign in to follow this  

Layers: Tiles with different dimensions

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

In a layer, can exists tiles with different dimension??? a floor tile of 16x16 and another floor tile of 32x32. or a wall tile (32x64) and another wall (64x64).

Share this post


Link to post
Share on other sites
I don't know if it can exist tiles with different dimensions, but why do you want to do this? why not to divide the big tile in several small tiles and then blit them together so it looks like one big tile. For example you could divide your 32x32 tile into 4 16x16 tiles and blit them together. The same with wall tile.


----------
http://gamescreators.sourceforge.net/index.php --- linux games programmers community

[Edited by - freenity on March 2, 2006 8:25:48 PM]

Share this post


Link to post
Share on other sites
Yes, this is the way that i do it.Divide the big tile into smalls tiles.

But i wanted to know if it's possible with tiles of different dimensions.
its curiosity

:)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by kiketom
Yes, this is the way that i do it.Divide the big tile into smalls tiles.
But i wanted to know if it's possible with tiles of different dimensions.
its curiosity
:)


Yes, it's possible. The easiest way is to have tiles that are multiples of the basic tile. (32x32, 64x32, 64x64, etc.) Then create a tile map where each entry contains either a tile info (tile type) or a pointer to the entry containing the top-left portion of the tile. The rendering algorithm has to check every visible entry and render everything that is seen directly (small tiles or top-left edges of larger ones) and everything that is referenced. This can create a large amount of useless draw operations, since a 256x256 tile has to be rendered, even if only it's top-left or bottom-right 32x32 part is visible.

Imho, it's better to have large tiles in your tileset by assigning them to neighbouring small tiles while drawing, and building support for large tiles into the map editor, so the editor will cut them up to small tiles when they are placed on the map.

Viktor

Share this post


Link to post
Share on other sites

This topic is 4303 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this