Endless Runner on landing..

0 favourites
  • 11 posts
From the Asset Store
Learn lowercase and uppercase letters in English.
  • I have made a general endless runner game with a double jump. On landing when reaching a certain speed (starting at 200 then reaching max 600 speed) every time I land at a higher speed my player slightly jolts back a bit. So if you jump enough etc you end up going off the back of the screen just from landing.

    imgur.com/a/84Wfp

    imgur.com/a/wyL9j <--- Got this at the moment, seems to of fixed it moving back just changing the player on landed +1 to +2. But now does a little glitchy thing on landed and twitches

    Thanks!

  • I'm guessing when in the air, your character's horizontal speed is slower than the levelSpeed. You need to compensate this somehow. Maybe simply by setting character X coordinate to a fixed value on every tick.

  • I'm guessing when in the air, your character's horizontal speed is slower than the levelSpeed. You need to compensate this somehow. Maybe simply by setting character X coordinate to a fixed value on every tick.

    It definitely looks like its jolting back on the land i tried adding this but it had no impact imgur.com/a/6GEGv (see 21 & 22)

    Also this did the opposite. Everytime i jump the player moves forward when jumping (in the air not on landing) imgur.com/a/J5R8Z <-- see 22 (player vector X to levelspeed)

  • Try replacing all those events with this one:

    On every tick-> Set player X to 105

    See if it helps.

  • Try replacing all those events with this one:

    On every tick-> Set player X to 105

    See if it helps.

    Doesn't seem to be doing anything, eventually the player just from running goes of the left side of the screen. It wouldnt be anything to do with the animation would it? As on landing the run animation starts from the beginning so it will twitch slightly form the falling animation.

    Another thing maybe.. Because the platforms are different heights you are jumping to, all the jumps don't last the same length of time, some small jumps some long jumps. Maybe that? But i wouldn't know what to do with that

    imgur.com/a/fAREz

    imgur.com/a/pQLk3

    ^ to give you an idea of the game and whats happening

    Edit:

    Or maybe something to do with this? imgur.com/a/Y958p

    Fairly new to construct so i don't know exactly what everything does and effects yet

  • > Try replacing all those events with this one:

    > On every tick-> Set player X to 105

    >

    > See if it helps.

    >

    Doesn't seem to be doing anything, eventually the player just from running goes of the left side of the screen.

    This is really odd. I tried that in the Auto-runner example and it works for me, even when the level is accelerating very fast.

    Are you sure this event is executed? (not in a disabled group or something like that)

    Run the game in debug mode, see if player.X stays at 105 or decreases.

    Also, is it possible that your layout is scrolling? See if ScrollX remains the same.

  • Why are you setting the player Platformer speed and vector x at all? This creates unnecessary movement.

    It's the background that needs to move, not the player.

    Keep platformer speed to 0 and don't set vector x, just continually set player x to 105 as dop2000 suggested, although you could put it in inverted Is falling condition, so the player falls off the bottom of the screen.

    Here's an example based off an edited version of the bundled auto-runner.

    Note: the example also uses 9-Patch platforms that lerp move, which I find look and perform better than bullet sprites platforms.

  • This is based from the endless runner template and the Set X bit was already put in there. (this is my first game created so fairly new)

    imgur.com/a/C1Rxw <-- Maybe i have messed up something here?

    imgur.com/a/xptvv <-- From the debug the platform Vector X isn't changing. But the Layout X is going down, would that be it? If so how would i change this?

    Thanks for your help

  • Nevermind! Fixed it thanks to your help both of you! from looking at the example i realized i set the wrong set X. But I amended this now and is working.

    Thank you guys means a lot!!

  • OddConfection dop2000

    So this seems to have fixed the player moving backwards. But there is another issue now.

    If i hit the side of a platform and hit jump my player teleports either on to the platform or is gliding in the air behind the platforms, then eventually falling and dying or teleports onto a platform.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you share your capx?

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