Super Meat Boy movement system?

FrazzleFrazzle Member Posts: 223

I've been working on a platformer recently, and recently decided I want a movement system that is kind-of airy, like super meat boy, where it takes half a second for the character to gain full speed when moving left and right. I typically use a 'constrain x-velocity' rule for running in platformers but this obviously wont be compatible with this, but I've seen other GS games (old templates) that have a similar system to SMB, any help?

Cheers, FM

Comments

  • ArmellineArmelline Member, PRO Posts: 5,421

    They probably used the accelerate behaviour, but there are a few ways this could be achieved.

  • FrazzleFrazzle Member Posts: 223

    Right, I tried that with the 'max speed' being applied at what i wanted to running speed to be, but this obviously ruined jumping/ gravity... must be another way.

  • FrazzleFrazzle Member Posts: 223

    Bump; any ideas?

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited July 2015

    @Frazzle ,

    try this

    Friction OFF in MeatBoy and Platforms

    Meatboy behaviors:

    The jump section obviously changes Linear Motion.Y

  • FrazzleFrazzle Member Posts: 223
    edited July 2015

    Cheers! How would you make the character slow down quickly instead of coming to an abrupt stop when you let go of the keys? I tried using drag but it makes the character spaz when on a platform...

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited July 2015

    @Frazzle said:
    Cheers! How would you make the character slow down quickly instead of coming to an abrupt stop when you let go of the keys? I tried using drag but it makes the character spaz when on a platform...

    The opposite of the speeding up.

    Change the Constrain in the Otherwise section to:

    Rule: if self.Motion.Linear Velocity.X > 0
    Constrain: self.Motion.Linear Velocity.X To max(0,self.Motion.Linear Velocity.X-25)

    Rule: if self.Motion.Linear Velocity.X < 0
    Constrain: self.Motion.Linear Velocity.X To min(0,self.Motion.Linear Velocity.X+25)

  • FrazzleFrazzle Member Posts: 223

    Ok, what does +25 refer to, by the way?

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Was Super Meat Boy developed with GameSalad??

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @As_Of_Latte said:
    Was Super Meat Boy developed with GameSalad??

    Could have been.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @Frazzle said:
    Ok, what does +25 refer to, by the way?

    +25 is the increment by which the actor speeds up, 900 is the maximum speed.

    Lets take the movement in the right direction:

    We constrain the actor's X velocity to the function min( X velocity+25,900)

    X velocity+25 increases the speed by 25 every game cycle.

    The function min() returns the smallest of a set of numbers.
    In this case it allows the actor to speed up to a maximum speed of 900.

    Mind-bending, but that is how it works. The max() function does the opposite.

  • 3absh3absh Member Posts: 601

    If your app is for mobile, you should definitely look into Leo's Fortune style of movement with a faster pace.

  • FrazzleFrazzle Member Posts: 223

    Thank you @Hopscotch!

Sign In or Register to comment.