Hello Guest

Author Topic: Customizing Tile Palette  (Read 169 times)

Michoko

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Customizing Tile Palette
« on: June 18, 2017, 01:08:26 PM »
Hello,

I currently have some tiles and my character animation frames in the same sprites collection (which I suppose is pretty standard). However, my character is bigger than the tiles, and has a good number of animation frames. So my tiles palette appears pretty scattered (because it uses the biggest tile size as the reference), and it actually contains many tiles which I will never use to build my levels, as they are the character frames.

So my question is: is it the best practice? Or do generally people put character animations in a separate collection, so the animations and tiles don't mix up in the tile palette?

In case I do things properly, I think it would be great to add a checkbox for every sprite in the sprite collections, something like "exclude from tile palette". That way, we could keep clean tile palettes which don't contain useless sprites for map building. Thank you! :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9644
    • View Profile
Re: Customizing Tile Palette
« Reply #1 on: June 20, 2017, 03:10:46 PM »
Hi there,

You can set up the scratch pad for this (http://2dtoolkit.com/docs/latest/tilemap/reference.html)
You can basically draw out the palette in the way that makes most sense, and you can also set up multiple tiles as needed (eg for a corner, a feature, etc)

Ideally though, it would make sense to keep the characters separate from the tilemap itself.

Michoko

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Customizing Tile Palette
« Reply #2 on: June 21, 2017, 11:53:18 AM »
Hmm, thank you for the suggestion, I'll do that.

By the way, I understand the need for sticking to a single atlas, to reduce draw calls. However, if I only target desktop or modern consoles, I suppose having two might be OK, right?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9644
    • View Profile
Re: Customizing Tile Palette
« Reply #3 on: June 21, 2017, 02:33:11 PM »
Hmm, thank you for the suggestion, I'll do that.

By the way, I understand the need for sticking to a single atlas, to reduce draw calls. However, if I only target desktop or modern consoles, I suppose having two might be OK, right?

Two draw calls is almost negligible nowadays even on low end mobile (iphone 4s i guess?). You'll likely end up with 20 or so, which is perfectly fine. its not as bad as it was on 3gs, where 10 draw calls = doom!