Hello Guest

Author Topic: Tiled Sprite not displaying full width/height  (Read 4753 times)

Dujj

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Tiled Sprite not displaying full width/height
« on: October 14, 2013, 05:57:07 pm »
I have a 16x16 png that I am using for a Tiled Sprite.  When the Tiled Sprite is at certain dimensions it is not displaying all the sprites in the row/column.  In the attached image you can see the box colliders from the Tiled Sprite are scaling themselves to the correct dimensions, but the sprites do not.

In the step-wise part of this image, the width of the Tiled Sprites is as follows (in Pixel Units, * indicates the full sprite tiling is not displayed): 128*, 144*, 160, 176, 192, 208, 224, 240, 256*, 272*, 288*, 304

It's possible that this is happening as a result of me using an image that is a power of 2.  The round gray object in this image is 18x18 and does not display the problem (pictured dimensions of the tiled sprite are 144x144 pixel units).  On the other hand the 4-color checkerboard is 32x32 and it DOES display the problem (pictured here at 256x256).
« Last Edit: October 14, 2013, 06:05:58 pm by Dujj »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tiled Sprite not displaying full width/height
« Reply #1 on: October 14, 2013, 06:15:58 pm »
It could be a rounding error missed somewhere. I'll investigate this.

Dujj

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Tiled Sprite not displaying full width/height
« Reply #2 on: October 14, 2013, 06:32:50 pm »
Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tiled Sprite not displaying full width/height
« Reply #3 on: October 15, 2013, 11:10:48 am »
A fix will be in the next release. If you need it sooner, drop me an email at support at unikronsoftware.com, and I'll send that over. It was an obscure floating point overflow bug, a combination of the dimensions and also the physical size of the sprite (pixels per meter). Good find ;)

Dujj

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Tiled Sprite not displaying full width/height
« Reply #4 on: October 16, 2013, 02:31:27 am »
Awesome, thanks again, that'll definitely easier than working around it.