Super Meat Boy movement system?
Frazzle
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
They probably used the accelerate behaviour, but there are a few ways this could be achieved.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
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.
Bump; any ideas?
@Frazzle ,
try this
Friction OFF in MeatBoy and Platforms
Meatboy behaviors:
The jump section obviously changes Linear Motion.Y
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
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)
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Ok, what does +25 refer to, by the way?
Was Super Meat Boy developed with GameSalad??
Could have been.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
+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.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
If your app is for mobile, you should definitely look into Leo's Fortune style of movement with a faster pace.
Thank you @Hopscotch!