2D Toolkit Forum
2D Toolkit => Support => Topic started by: Quells122 on July 15, 2014, 04:07:49 am
-
I like to keep my tileset graphics simple so that I can compose them together during tilemap creation. So instead of having, say, three tiles for grass, building, and building + grass, I keep them separately as a building and grass tile, and if I need building + grass, I lay one above the other on separate layers like in the picture below.
This gives me more freedom and flexibility. In the example picture below, all three layers are in the background and should behave as one unit. Is it possible then to render this into one just layer, instead of three, to save on draw calls? I know 2DTK's tilemap has a SetTile function. Is it possible to call it without erasing the previous contents, so that I can effectively combine tiles together?
Picture example of what I'm trying to achieve:
(https://lh4.googleusercontent.com/-CkiabuvSJd8/U8SZaz3IpAI/AAAAAAAAES8/DDWD_rxpg8U/w1200-h792-no/tile_map_example.JPG)
-
You need to use multiple tilemap layers for this.
-
I know that this can be achieved with multiple layers. I'm specifically asking if it's possible to achieve this with just one layer? I'd like to call td2kTileMap.SetTile without clearing away the previous graphic to achieve this effect.
Correct me if I'm wrong, but TD2K is drawing to a texture, so would it not be possible to draw to the texture but not erase what was already on the texture - as in just draw over the texture?
-
tk2d is not drawing to a texture. Its creates geometry that draws the tiles.
-
I see. So it's not possible.
Multiple layers it is then. Thanks!