Problem Description
Hi, this might be a bug.
I encounter this problem every time, I try to make a platformer. As soon as I turn "pixel rounding" on, the platform is sometimes indecisive with the position of the sprite. It seems not to round down/up consequently (at the 0.5 threshold) between values thus causing the platform-sprite to shake between X Y and X+1 and Y+1.
test_example.capx
This is very simple and basic, just a platform behavior with scroll to the sprite object. Note how the spite and cam is shaking 1 px to any direction, when jumping or moving. Is there maybe a rounding bug causing this?
In my understanding, when "pixel rounding" is on, means - as you wrote in previous bug reports - that the drawn sprite (but not the object itself) is (displayed) at a rounded position. If the object position does not change, the displayed position still can vary, if rounding is not consequently deciding at a certain threshold.
test_round.capx
To visualize that further, the second example is with round(x,y) on both, the cam, and the object. As you can see, the object is floating 1px above the ground. As soon as you move horizontally, it drops 1px touching down.
Is there maybe a rounding bug? In my understanding, when pixel rounding is on, means - as you wrote in previous bug reports - that the drawn sprite (but not the object itself) is (displayed) at a rounded position. Is this then maybe related to the same not consequently rounding-error?
No matter, what I do, there is always a little unwanted shake on the platform object.
Steps to Reproduce Bug
- See test_example if you experience the shaking
- See test_round.capx to definitely see the described effect/problem
Observed Result
Platformer is shakin 1 px X and Y direction (in both files, the second is more obvious)
Expected Result
Platform object movement and scrolling should be without any shakes. No changes of Y, if moving horizontally on floor.
Affected Browsers
- Chrome: YES
- FireFox: YES
- Internet Explorer: YES
Internet Explorer 11: YES
Safari (MacOs): YES
Operating System and Service Pack
____ Windows 7 64x SP1 ____
Construct 2 Version ID
____ Stable v. 190 (64bit) ____
also tried 194 (64bit) beta and 194.2 (64bit) beta, and I already have that problem since v 168 or something, since I use construct 2