[Resolved] Issues with v2.1.6

Hi,

My game stopped working with 2.1.6. I figured out that’s because the cc.Sprite.setFlipX() method is now called setFlippedX(). Shouldn’t breaking changes like this be mentioned in the change log?

Anyway, I’m still rollbacking to 2.1.5, because I’m getting very blurry graphics (in canvas mode). Is this a known issue, or should I report it?

Thanks.

It is listed on Upgrade Guide from Cocos2d-html5 v2.1.5 to v2.1.6

As to blurry graphics, I will check it, thanks for your report.

Hi,

Could you please give me a screenshot to let me know which graphics blurry are?

Hello,

I looked around but couldn’t find this upgrade guide. Thanks!

As for the blurry graphics, in my game, it’s specifically the player sprite, as you move it, it gets either more or less blurry.

Screenshots attached. Let me know if you’d like a link to the actual game, I don’t mind.

Thanks.

I see v2.2 just got released, and it still shows the same behavior as 2.1.6.

By the way, I’ve got more info about this issue: it happens when the sprite position contains non-whole values (ie: floats with digits after the decimal point).

Example:
X=100, Y=50 = no blur
X=100.2, Y=48.7 = blur

Can you confirm that this is a bug, or is this wanted behavior? I could change my code to round up all position values if I have to.

Yes, There is a problem.

We had try to round up the sprite’s position when drawing to Canvas, code like follow:
context.drawImage(image, locRect.x, locRect.y, locRect.width, locRect.height, 0|flipXOffset, 0|flipYOffset, locRect.width, locRect.height);

It works well when the sprite’s parent node’s scale value equals or less than 1. But if the scale value greater than 1, for example it equals 5, then the sprite will be move very choppy when it’s running a cc.MoveTo/cc.MoveBy action.

I could change my code to round up all position values if I have to.
Yes, you could do this.

Best regards
David

Mr. Dingping Lv, is it issue of the recent builds?
Does it mean that it won’t be changed in the future?

Of course, we could fix our code to make it look better.

Thank you!

Mikhail Bratus wrote:

Does it mean that it won’t be changed in the future?
Yes, it won’t be.

Of course, we could fix our code to make it look better.
Yes, you could as possible as set the position to integer value.

Hi Dingping,

Thanks for the confirmation. I think we will store float values internally, but round them up at the last moment for rendering.

Keep up the good work.