Platforms moving at angles + Platform Behavior = Weird Jump

This forum is currently in read-only mode.
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I have a platform that goes downward at an angle (the movement, not the sprite) into some lava and a ledge for the the player to jump onto just in time. For some strange reason however, while jumping off the moving platform, the jump is all wrong. It doesn't have the same height or momentum. I'm not using anything special to do the jumping. It is just the Platform Behavior. I suppose it has something to do with the combination of how Construct handles jumping, movement, and standing on platforms, but I have no idea what to do.

    How exactly does Construct handle Platform Behavior objects standing on platforms? It feels like it is applying some force to the player to keep him on the platform so then when he jumps, it feels like he's weighted down.

    Edit: I've tried both Custom Movement and Path Movement for the moving platform. Both do the same thing.

  • sounds just about right, it's a frame of reference thing.

    When you're going down, you have downwards speed. When you jump, you add impulse and change your vertical speed relative to your current frame of reference. Meaning, if the camera was following the platform, it would look like a normal jump.

    If you want the jump to be always as if you were standing still, you could substract the platform speed from the player speed upon a jump.

  • thats not very realistic for downward movement. a body under the influence of gravity standing on another one which is moving downward simply falls onto that body to stay "connected", it doesnt have some arbitrary force gluing it. if you were to move that platform away faster than gravity could accelerate the body downwards you would start to fall. i havent played with this yet in platform movement but speed should only be added for a sideways or upwards motion, where theres actually some opposing forces sticking things together. again im not sure how the behavior works right now but what im hearing here makes it seem wrong no?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thats not very realistic for downward movement. a body under the influence of gravity standing on another one which is moving downward simply falls onto that body to stay "connected", it doesnt have some arbitrary force gluing it. if you were to move that platform away faster than gravity could accelerate the body downwards you would start to fall. i havent played with this yet in platform movement but speed should only be added for a sideways or upwards motion, where theres actually some opposing forces sticking things together. again im not sure how the behavior works right now but what im hearing here makes it seem wrong no?

    Yes but it's been added as a fix to keep the player squarely on moving platforms. It's something David struggled with for a long time. Basically when you're standing on a moving object you need to be glued to it to avoid jittering and falling through.

    Perhaps the gluing thing could be disabled the moment you press Jump. That would probably fix it. As for a platform that falls away faster than the player is falling... probably not going to happen without Custom Movement.

  • But how then do professional/commerical platformers do it?

    I'm still not sure what to do. Also, even when the platform is set to move slower than the player, it still happens. Should I just only use platforms that move horizontally?

    Edit: What about some mixture of physics and friction? That's how it works in real life...

    Edit 2: This sounds like it makes sense. http://www.gamedev.net/community/forums ... _id=541104

  • For the record: some big expensive commercial 3D games do have problems with moving platforms.

    I've seen lots of jittery elevator sequences, for example in EA's Mirror's Edge you kind of sink into the floor while going up. In Pandora's Box (using Epic's Unreal Engine 3) there's a terrible bug where if you're doing over 60fps you go through the floor of the elevator right at the end of the game. There's lots of them so it seems there is no widely known perfect solution.

  • For the record: some big expensive commercial 3D games do have problems with moving platforms.

    I've seen lots of jittery elevator sequences, for example in EA's Mirror's Edge you kind of sink into the floor while going up. In Pandora's Box (using Epic's Unreal Engine 3) there's a terrible bug where if you're doing over 60fps you go through the floor of the elevator right at the end of the game. There's lots of them so it seems there is no widely known perfect solution.

    2D is entirely different than 3D. I don't think you can really compare them with something like this. I'm thinking more like 2D Mario.

    Edit: Just remember I'm not a programmer...

  • When David comes back I'll ask him about the downward moving platform jump gravity mess-up thing. He should be able to make a fix for it.

  • > For the record: some big expensive commercial 3D games do have problems with moving platforms. (...)

    >

    2D is entirely different than 3D. (...)

    Edit: Just remember I'm not a programmer...

    nice edit XD

    yeah it's different, but the motion problem is pretty much the same in concept and produces the same problems.

  • Yes but it's been added as a fix to keep the player squarely on moving platforms.

    yea but were talking about momentum transfered to the jump here, not the repositioning of the sprite.

    if im right the platform movement saves the x,y coords of the object relative to what its standing on checks to see if the solid object its standing on has changed position, and then moves it according to the coords saved before. when you jump, i assume that the rate of change (movement speed) of the objects position is saved aswell and added to the vectorx and vectory of the platform, but the "bug" were seeing now wasnt thought of.

    repositioning it is 100% fine its the best way to do it, but when you jump momentum transfer would only occur for upwards or horizontal movements. something like a check to see if the rate of change (vertical movement vector in our case) is a positive (downwards) value to negate the vertical momentum transfer is all thats needed, but little things like this are always neglected because thats just the nature of obscure bugs, they don't appear until something played with in weird ways.

  • What I did in 2.5d concept was:

    if the player is standing on a platform, set player velocity to platform. After that, do the normal movement stuff.

    This means if you jump off a platform, you'll carry momentum. All momentum is lost when touching the ground (which is kind of normal for a platform game, though you might want to do some other calculation instead)

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