#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Super Meat Boy movement system?

Posts: 223Member

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

• Posts: 4,747Member, PRO

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

• Posts: 223Member

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.

• Posts: 223Member

Bump; any ideas?

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

try this

Friction OFF in MeatBoy and Platforms

Meatboy behaviors:

The jump section obviously changes Linear Motion.Y

• Posts: 223Member
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...

• Posts: 2,782Member, PRO
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)`

• Posts: 223Member

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

• Posts: 343Member, BASIC

Was Super Meat Boy developed with GameSalad??

• Posts: 2,782Member, PRO

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

Could have been.

• Posts: 2,782Member, PRO

@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.

• Posts: 510Member, PRO

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

• Posts: 223Member

Thank you @Hopscotch!