Prevent Moving Platform from Jitter with Player on it

0 favourites
  • 9 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I've been developing a retro pixel platform game in Construct 2, but I've run into an issue which I don't think can be fixed.

    I've tested this with Construct 3 also, so I'm assuming that this is a continued problem.

    The problem is easy to re-create.


    1. Use the Retro Pixel Platform Layout

    2. Create a Platform with Solid Behavior

    3. Create a moving platform with Jump Through Behavior and Sine Horizontal

    4. Add a Player with default Platform Movement

    When the Player jumps onto the moving platform there is a noticeable jitter / shake / wobble / glitch in the movement. It's as if the two sprites are fighting with each other and their behaviors as they re-fresh.

    You would expect that the player locks to the platform and the platform just carries on, but the smooth animation is lost and looks very unprofessional as the platform jitters and the player is updated slowly.

    I can't be the only one to have noticed this issue, is there a way around this? It's more noticeable with low-resolutions such as 320x180, but it's still there none the less.

  • If you disable 'Pixel rounding' it looks much better.

  • Disabling Pixel Rounding does indeed help while the Player travels left to right on the moving platform, however, when the Moving Platform reaches the left side, the player moves left then right one pixel quite slowly. It looks rough.

    Additionally, a similar behavior can be seen when the platform goes vertically. the Player moves up one pixel, then down one, jittering all the way up and down.

  • I think that's the way it has to be. Retro is just not smooth! Beyond a certain moving speed of an object, one inevitably sees how it moves pixel by pixel, because of the very low resolution. As far as I remember, there was always a stuttering in very old games in similar situations. A smoother gaming experience simply requires a higher resolution.

    Please correct me if I am wrong.

  • Thanks, I thought that too.

    Instead of using the Sine behavior to move a platform, I implemented my own by using the Bullet behavior. I just reverse the angle when a position is reached and the same in the opposite direction.

    It's smooth and glitch free!

    The only caveat is that you have to design your moving platform to be symmetrical and an odd number of pixels in order for the origin point to be placed in the center. The angle change is essentially flipping the object on it's axis, similar to mirrored.

    Of course there are other ways to move a sprite, but this is the quickest and already has delta time added as far as I'm aware.

  • If you use Bullet behavior, you dont need to flipp or mirror your Sprite/TBG. You can change the angel of motion like this: [Condition] -> Set angle of motion to Sprite.Bullet.AngleOfMotion + 180

    And yes, all movement behaviors use dt, except Physics.

    But I still notice a stutter when the object is getting slower.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • JayH

    I have the exact same jittering problem as you. Yours is a platform, mine is a top down RTS game. My graphics jitter too, actually even worse with pixel rounding off.

    I wish I could help you, I too am searching for help in regards to why this happens. My objects should stay still! At first I thought it was something to do with my paralax layer, but disabling that has done absolutely nothing.

    Wish I could help, good luck.

  • Kriand, thanks for that, but it's not doing anything different, it still flips the sprites graphics. Maybe I don't understand?

    I'm getting what appears to be a tiny glitch at the end of the movement, but it's very tiny and not noticeable really. With the Bullet Behavior I have it set to no Acceleration to avoid issues, the sprite has a constant inertia and doesn't slow down.

    The Maddog, I feel your pain. I get so far, then I get stuck on one issue or another, mostly to do with things that are not working in Construct. Damn Construct 2 is supposed to be easy, until you start a project. Unity is calling, but it's a pain for 2D stuff, at least the last time I tried. Good luck too.

    My other gripe right now it the change in this forum, but that's another thing. Don't release a new forum until it's working, Grrrr!

  • I was going to go with Unity but found Construct right before making the move. Was using Source SDK for modding, then moved to UDK and was going to move to Unity and then came across Construct.

    Honestly, I'd rather smash my head against my keyboard for an hour using Construct rather than for 2 hours using Unity! As for UDK ... there'd be nothing left of both my head and keyboard. I lost my mind using that thing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)