MultipleChoice's Recent Forum Activity

  • 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

  • I also did another test with rounding the sprite position, but that has a strange effect. The platform now is 1 px above the ground, if you don't touch the arrow buttons. As soon, as you move HORIZONTALLY, the platform object snaps 1 px down on X, touching the ground.

    Is this maybe a rounding bug altogether? (Also when I'm not rounding, a similar effect happens to my platform, which should be drawn at a rounded X/Y position.)

    See here:

  • Thanks guys!

    cacotigon

    Unfortunatly it does not solve the problem. It is rather based on the pixel-rounding adjustment, which does not seem to work properly. It looks, like the moved sprite is not rounding first down, then up, between two whole number as it is expected, thus causing the platform sprite and the camera shake back and forth 1 px on both, X and Y axis.

    Good approach. The lerp movement causes combined with pixel rounding a better, but still uncool effect though. At the end of the movement when the values are less than a pixel. It looks also a bit odd, like jumping, since 1 px is too big for the last steps of the ease, and it takes ages before the last pixels snap to the final value.

    In my experience it is better to use the sine-behavior, if possible of course, since it is behaving with pixel rounding a bit smoother, the movement being less eased, I guess. But this is obvious, and not the problem at all.

    I already tried Scroll to ROUND(Sprite.X, Sprite.Y), which works for the cam itself. But the "Sprite"-platform itself is still not rounded properly and shaking

    It seems, like a pixel rounding-bug in the platform behavior.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here is an example-file to my problem. cacotigon ,

    The platform is shaking when moved. (Not moving constantly, but moving a bit back and forth one pixel while moved.)

    I'm quite sure it is due to pixel rounding. Switching it of at least solves the problem. But I need to turn it on, for seamless textures and so on.

    Do you guys have an idea how to solve this?

  • Hi, I need help with this problem:

    The platform is shaking when moved. (Not moving constantly, but moving a bit back and forth one pixel while moved.)

    I'm quite sure it is due to pixel rounding. Switching it of at least solves the problem. But I need to turn it on, for seemless textures and so on.

    Does anybody know, how to solve this problem?

    Feel free to take a look at the capx-fil:

  • I worked on the movement issue with the support of some testers.

    alvarop , GeometriX , Beldrama Be kind to test level 2 again, if it's more fun to move along:

    http://exitthegame.eu/movement/

    PLEASE POST SCREENSHOTS IF YOU ENCOUNTER ANY BUGS!

    (like stuck animations when landed or at doors)

    Thanks for your support!

  • NEW VERSION:

    (same link, new caching - please be patient while its loading)

    http://www.exitthegame.eu/movement/

    enjoythetale Thanks for you positive feedback. I hope to be let you play more of the game soon, after the controls are smoothed out.

    Burvey Max speed stayed the same, but the animations have a higher FPS, so it might feel faster. I set the Acceleration a bit lower again now, in between, as suggested.

    gillenew Deceleration is a bit higher, but altogether I don't think, it has to be more radical in acceleration/deceleration. What do you think?

    Altogether I think it might be OK now...

    BUGS:

    (like stuck animations when landed or at doors)

    I also added a display of some values I need for proper debugging, since I cannot reproduce the problem and I can not find in my code, how that should be possible. If you run into any bugs again, please post a screenshot, so I can see the situation and the values on the left top.

    PLEASE POST SCREENSHOTS IF YOU ENCOUNTER ANY BUGS!

    Thanks for the support!

    Any new testers? Please tell me what you think!

  • Hi Erfeo , Somebody , blackhornet , , enjoythetale , Burvey

    Okay, movement-model reworked.

    I took out the stopping animations, made all animations faster, turning even more. The Acceleration value of the platform-behavior is higher too. Please take a look, if you like it better now. Thanks in advance!

    (same link, new caching - please be patient while its loading)

    http://www.exitthegame.eu/movement/

  • This is not an easy effect, since its part pixel, part vector processing. The contour lines look exactly, like the Illustrator Object/Live Trace effect vector detection. In the background, there is another toon-pixel-effect on the original picture.

    Maybe, this helps...

  • cacotigon thanks, my project can be tested here - separated contol object though... I`m a bit surprised, nobody likes my favorite flawless animation style

    Still I have a major problem: when you move, sometimes the control object (an all attached) are rather one pixel above the "ground", then, sometimes just by pressing down, which should not do anything, it does touch down correctly. The biggest problem is, sometimes it does not detect landing it seems. There used to be a landing detection bug in earler versions of construct2 , which should be solved. still, the movement is never really smooth. Any idea, why that happens?

  • You are welcome

  • Yeah all errors despite using the same sprite and collision-box size.

MultipleChoice's avatar

MultipleChoice

Member since 25 Oct, 2013

None one is following MultipleChoice yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies