Need help on physics for platformer.

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi guys, I could really use some advice on character movement for a platform game I'm making, were a new Dev team and have so far been really successful, but we seem to have hit a bit of a wall.

    The idea is to implement physics behaviour to certain interactive objects.

    Think of rolling boulders and dragging boxes, similar to Limbo.

    Now since Physics and Platform behaviour don't mix very well, I'm having some trouble finding a good way to create smooth character movement.

    So far I've tried to do the movement and interaction in 3 different ways. As can be seen in the following .capx files.

    Method 1 (click for .capx file):

    Platform behaviour on the character with manually added force/impulses/torque on objects by using the on collision/on overlapping conditions.

    Method 2 (click for .capx file):

    Physics controlled movement. Character moves by force and jumps by impulse.

    Method 3 (click for .capx file):

    The character has platform behaviour and gets replaced by a physics controlled character on collision/overlap with an interactive object.

    However, each of these 3 methods have some issues, mainly the following:

    Method 1:

    The character sticks to almost vertical walls.

    The interaction with objects is limited and somewhat unrealistic, giving the character a stuttering movement.

    Method 2:

    The character gets airborne when he moves over a ramp. I would like it to stick to the floor unless the jump button is used. I would like the movement to be very similar to platform behaviour.

    Method 3: Like in the first method, the character pushes an object with stuttering movement. Also the character starts moving in a strange way whenever he is on top of an interactive object, this is probably because of how I made the event sheet, but I can't seem to fix it.

    I would really like some advice here, it's my first time using construct.

    Which method do you guys think is the best for a platform game with physics? And how would I set it up to avoid the problems I have in these examples?

  • Hi mate,

    I'm pretty new to this stuff, but was looking for something similar. The easiest way I found was creating a sprite set to invisible on start the same size as my character, I placed the box over the character and applied physics to it, and platform behaviour to character. I then said- every tick-pin to- character. This way I can use the character for movement and the box works with physics interactions.

    Now I just have to figure out how to manipulate the platform behaviour.

    Hope this helps

  • Moved to correct section.

    "Help Wanted" is meant to be "Help for Hire" not, "Something doesn't work, please help" just for future reference.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, for smooth character movement, since there isn't a nice way for doing WASD, I did the Key Is Pressed event, took the characters current position, and then added around 3.5 pixels to each part of the character, eh?

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