1
\$\begingroup\$

I am making a Pokemon Clone, using libgdx. I have the different types of sprites: e.g. Back, front, back shiny, and front shiny.

The current way the Texture Packer combines the textures seems to be semi-randomly. I would like to be able to tell it to put the sprites together based on number, because my sprites go:

  • 003
  • 003b
  • 003bs
  • 003s

Where the 003 is the pokedex number, and the b is for back, and s for shiny.

Two questions here:

  1. Is there a way to get it to sort the textures in some way?
  2. Is there a benefit to this sorting?
\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

There's no real benefit to sorting those sprites by not-Pokemon index; the texture packer doesn't care what order the not-Pokemon are in, it cares about minimizing the atlas size. I'd just let it do its thing, the atlas file already specifies the position, dimensions, and other settings for each sprite. All you have to do is reference them by name.

\$\endgroup\$
2
  • \$\begingroup\$ Reminds me that I stopped asking why the typeface sprite texture packer will do very strange things, like drawing the character flipped left to right or rotated 90 degrees (or both). I just assume it knows better than I do and walk away slowly (even if it does make changing fonts a pain in the arse later). \$\endgroup\$ Commented Dec 30, 2015 at 21:08
  • \$\begingroup\$ Unfortunate that you can't control the packer because switching textures ain't free. \$\endgroup\$ Commented Dec 30, 2015 at 23:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.