Hello Guest

Author Topic: Spritesheets to import  (Read 4429 times)

mygamingproject

  • Newbie
  • *
  • Posts: 37
    • View Profile
Spritesheets to import
« on: July 13, 2014, 01:40:22 pm »
Ive read http://2dtoolkit.com/forum/index.php/topic,1636.0.html and can't say I fully understand it.

I have also read http://www.unikronsoftware.com/2dtoolkit/docs/latest/html/classtk2d_sprite_collection_data.html#aa2297da8bece8c3b6047e838cc4cb261 but if I go the runtime route I guess this is best for establishing spawnable enemies etc rather than fundamentals like menu buttons, backgrounds etc which would be candidates for sprite batching.

Then comes the further complication of multiple resolutions where the right texture needs to be assigned and used.

I have over 100 images so importing into a spritesheet first is far more convenient that having to rename and resize every image 3 times for x1, x2, x4 and then use Platform Support on the sprite collection. 

What is the best way of achieving this as I can't be the first person to be askin but not finding an answer other than a very manual approach of individual assets that bypass any external convenient tools.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Spritesheets to import
« Reply #1 on: July 13, 2014, 09:15:16 pm »
We don't have any plans of supporting any additional sprite sheet import options for the reason mentioned below, but you can always use imagemagick to batch rescale multiple directories of images. Once you get your workflow sorted there, it becomes pretty stragihtforward.

The reason you don't want to rescale the atlases is that if anything in your atlas starts at a position that isn't perfectly divisible by two, you end up with pixels filtering incorrectly. This is made worse when downscaling 4x, as everything would have to align to a multiple of 4. We can enforce whatever is necessary when reconstructing the atlas.

mygamingproject

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Spritesheets to import
« Reply #2 on: July 13, 2014, 09:20:38 pm »
OK thanks for the response