The Platform Behavior doesn't perform normally under certain conditions

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hi.

    I was thinking to use the platform behavior for a co-op game with 2-4 players but I noticed some issues while I was testing the prototype.

    Both players have the platform and jumpthru behavior.

    1. The first issue is that when one of the players is on top of the other there is this delay when falling, is it normal? Here is the video example:

    https://streamable.com/wso341

    2. The second issue is also when one of the players is on top of the other and they are both falling, if the one on top is moving to left or right until is not touching the one on bottom, there's a moment when he looks like he's flying. Here is the video:

    https://streamable.com/om2zka

    Is there a way to fix the 2nd issue?

    It's probably an issue with the Y vector. I think it would help if the platform behavior would have a checkbox that fixes this when multiple objects with the same behavior are in contact.

    Here is the example file:

    dropbox.com/scl/fi/7rqqlw7wptj3z99sjuq3b/PlatformerTestBug.c3p

  • The engine processes objects with the Platform behavior one by one. When Player #1 is standing on top of Player #2 and both are falling, the engine handles it like this:

    • Player #1 is standing on a solid object → don't move it.
    • Player #2 doesn't have a solid below → move it down a few pixels.

    That’s why a gap appears between them.

    Now, when Player #2 is on top of Player #1:

    • Player #1 doesn’t have a solid below → move it down.
    • Player #2 also doesn’t have a solid below → move it down.

    So both fall at the same speed, and no gap appears.

    I believe the processing order is based on the objects' Z-index. A simple fix could be:

    If Player1.Y < Player2.Y → Move Player1 in front of Player2 
    Else → Move Player2 in front of Player1
    
  • It doesn't work with your example.

    I also have to fix the other issue. I should probably try using physics for this.

  • I've seen similar issues with Platform behavior in certain cases, like with slopes or moving platforms. Tweaking collision shapes or movement settings can sometimes help. Could you share more about the exact conditions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've seen similar issues with Platform behavior in certain cases, like with slopes or moving platforms. Tweaking collision shapes or movement settings can sometimes help. Could you share more about the exact conditions?

    Hey!

    I showed the conditions in those 2 videos about the issues I encountered and there's also an example project.

    I'm pretty sure there isn't an easy fix for this.

  • This is strange. Changing the Z-order in the layout editor definitely fixes the gap, you can test it yourself:

    dropbox.com/scl/fi/0a0coxqeyq8a20qowjt9s/PlatformerTestBug2.c3p

    But for some reason, doing the same via events doesn't work. I’m still convinced the issue lies in the order in which the Platform behavior processes objects, but I don't know how to control that order.

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