Sprites + Scaling = very annoying BUG

@ANSCA

When you scale a sprite that has varying frame width or height (sprite frames are not of equal dimensions), the result is a sprite that changes position at each frame!

This has tragic consequences and makes sprites unusable for my project as almost all my sprites are of varying frame-dimensions and I always use scaling to: either scale down the graphics from an HD version of a spritesheet (on iPhone3) or to scale up low-res graphics on HD devices (when HD assets are not provided).

Please do something about this bug and provide a workaround or any other kind of solution…

You can confirm the bug by running a simple demonstration build I have uploaded to cloudapp. After you run once and have watched the animation, activate the line that scales up the sprite and run again to see the bug. The sprite is constantly moving on y-axis.

SIMPLE DEMONSTRATION PROJECT (just 29Kb)

Do you people confirm the bug? [import]uid: 7356 topic_id: 4904 reply_id: 304904[/import]

Ive had issues with this as well. They have sample code and are looking into it. [import]uid: 5354 topic_id: 4904 reply_id: 15867[/import]

Just checking in to confirm that we are looking at it, thanks for your patience! [import]uid: 6787 topic_id: 4904 reply_id: 26042[/import]

It’s a waste, but I decided to force all the sprite frames to be the same dimensions (no trimming).

The bigger problem for me is that the physics does not scale with the image. [import]uid: 6084 topic_id: 4904 reply_id: 30800[/import]

Hi there did anything come of this?. I’ve been trying to scale down @2x sprites to fit on 320 x 480 scaled up for the iphone 4 and it does exactly the same as the bug Magenda posted.

[import]uid: 13522 topic_id: 4904 reply_id: 30792[/import]

Yeah this is bad. Any updates Ansca? Pleeeeeeeeeeeez tell us you’re working on this. [import]uid: 10361 topic_id: 4904 reply_id: 32815[/import]

I posted a temporary solution for this bug here:

http://developer.anscamobile.com/forum/2010/12/08/dynamic-retina-spritesheets-heres-how#comment-33087 [import]uid: 46260 topic_id: 4904 reply_id: 33088[/import]

y’know, this may actually be desirable behavior in some animations. I mean, this is still a bug because the behavior is different before and after scaling, but it might be nice to always center the frame as it changes size.

The fix I would suggest is adding an alignment parameter to the command to create a sprite: align=“bottom” or align=“center” or align=“top” [import]uid: 12108 topic_id: 4904 reply_id: 36381[/import]

I wouldn’t consider the fix a bug, because Regular SpriteSheets work the same way the fix does for non-regular SpriteSheets. The fix is only making both kind of SpriteSheets behave identically. Any other thing you want to add could be called a feature. [import]uid: 46260 topic_id: 4904 reply_id: 37165[/import]

Was this fixed in the latest build? I just noticed that the build notes said they fixed an issue when scaling sprites… Anyone know? [import]uid: 10361 topic_id: 4904 reply_id: 40193[/import]

We fixed a bunch of them -

Was this entered in the bugbase? Do you have a tracking number? If not? how is my engineering team suppose to know about this?

We peruse the forums, but unless it is entered in our bugbase — :slight_smile:

Peach and others help in informing me and my staff of critical issues, but we can corrolate a bug with a forum post if there is some sort of tracking number we can follow.

Remember, the forum is a way to communicate with us, and if it is a bug, entering into the bugbase will go long ways.

C. [import]uid: 24 topic_id: 4904 reply_id: 40206[/import]