Hello Guest

Author Topic: Is there a way to sort palette tiles?  (Read 5113 times)

mikkifr

  • Newbie
  • *
  • Posts: 2
    • View Profile
Is there a way to sort palette tiles?
« on: September 12, 2015, 02:12:08 am »
Hi,

Is there a way to sort palette tiles by something like their file name? I'm adding/removing tiles from my project as I go along and the default sorting system for the palette doesn't let me keep related tiles together.


Thanks!

LaserDinosaur

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Is there a way to sort palette tiles?
« Reply #1 on: September 14, 2015, 07:10:42 pm »
Am I correct in thinking that you want to be able to click your "Foreground" layer in the tile editor and only see the tiles from your sprite collection that apply to the foreground?

I don't think you can do that at the moment, but it would be nice to have. Perhaps if the tilemap detected that the sprite collection contains multiple spritesheets, you could choose which ones are available to the layer.

@Unikron: Do the performance issues you mentioned back in 2014 still apply today? Multiple sprite collections I could see being a performance issue, but if your just showing/hiding the available spritesheets in a single spritecollection, would that work?

mikkifr

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Is there a way to sort palette tiles?
« Reply #2 on: September 15, 2015, 02:20:50 am »
Hi LaserDinosaur,

Thanks for your reply. I was actually thinking that maybe there could be an option to switch the sorting of the tiles in the palette from ID to NAME, or something. Perhaps in ascending alphabetical order. But your proposition would be nice too.

I'm adding and removing sprites as I go along and the ordering just gets chaotic after a while!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is there a way to sort palette tiles?
« Reply #3 on: September 15, 2015, 02:39:39 pm »
@mikkifr - The scratchpad feature (http://www.2dtoolkit.com/doc/2.5/tilemap/reference.html) can help there. You can paint out mini tilemaps ordered any which way you like, and its always just a key away - bonus, its usually closer to your mouse cursor than the normal palette too.

@LaserDinosaur - Multiple spritesheets would still suffer from exactly the same issues as before, its really easy to break batching that way.

LaserDinosaur

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Is there a way to sort palette tiles?
« Reply #4 on: September 16, 2015, 08:02:55 pm »
@Unikron: Huh, interesting. I always thought that the spritesheets were just visual organizers inside sprite collections. I figured if everything is being saved off to a single sprite atlas on the disk, then the individual spritesheets are still in the same sprite atlas file, retaining sprite batching. Does that mean if I have a sprite collection containing two spritesheets which is being used for a tilemap, that's going to break batching?

(If my question is going off topic, I can move it to a new post)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is there a way to sort palette tiles?
« Reply #5 on: September 17, 2015, 11:12:55 pm »
Don't think I was clear enough - multple spritesheets inside a sprite collection is fine. Its multiple atlases that'll break batching.