Hello Guest

Author Topic: Tiled with multiple spritesheets  (Read 3571 times)

JakeTBear

  • Newbie
  • *
  • Posts: 10
    • View Profile
Tiled with multiple spritesheets
« on: February 25, 2014, 10:45:00 pm »
Hello, I attempted to create a Tilemap by exporting a TMX file from the Tiled editor, it worked fine when I only had a single spritesheet, but now that I have 2 spritesheets (one for collision only, hidden in the actual game, only used for colliders, and one for the actual graphics) the process is not working, I attempted to create a single sprite collection with both spritesheets, this solution didnt work at all, is there a way to successfully add multiple spritesheets to a single Tilemap? right now I resorted to save 2 TMX files per spritesheet and creating a tilemap per entry, this feels very clunky and it would end up being a lot of trouble in the end.

Any help is greatly appreciated!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tiled with multiple spritesheets
« Reply #1 on: February 26, 2014, 10:59:23 am »
tk2d tile maps only support one sprite sheet per tile map. This is by design for performance reasons. If you need more than one, you should have multiple tile maps in the scene, there is no penalty in doing this. About the clunky TMX import I recommend modifying the tk2d tmx import code to only import the relevant layer. So you work as usual, export one tmx, and your wrapper will import the appropriate layers into the correct tile maps.