Jump to content


Photo
- - - - -

Platformer Physics movement with Double and Wall Jumping [Video]


  • Please log in to reply
2 replies to this topic

#1 GameFrnzy

GameFrnzy

    GMC Member

  • GMC Member
  • 245 posts

Posted 22 March 2016 - 12:16 AM

Hello! Here is a video tutorial showing you how to code physics movement in a platformer, including wall and double jumping!

Let me know what you think, it is my first tutorial on my youtube channel and more to come. Thank you!

 

YouTube!

 

Title: Platform Movement

Description: Advanced Movement

Version: GM:S Pro 1.4.17

Registered: Yes

File Type: gmz in .zip

File Size: 1 KB

File Link: https://app.box.com/...hmsi40h5frd098a

No extensions needed

No DLLs needed


  • 1

#2 chance

chance

    GMC Member

  • Global Moderators
  • 8762 posts
  • Version:GM:Studio

Posted 22 March 2016 - 11:34 AM

This is fine for the Tutorials Forum.  It's fairly basic, but it's focused and clear.  So it should be easy for any semi-experienced GML user to follow.   It's the standard platformer approach.   But it uses physics_apply_impulse() and physics_apply_force() to move the player around.  And it uses kinematic objects for walls.  It works fine. 

 

The only observation I'd add is that you don't really need to check for wall presence before applying the force -- i.e.,  it's not really necessary to test:

if !place_meeting(x-1,y,objWall)

Perhaps you mention this in the video (I didn't watch the entire thing).


  • 0

#3 GameFrnzy

GameFrnzy

    GMC Member

  • GMC Member
  • 245 posts

Posted 22 March 2016 - 11:48 AM

the reason I check for the wall before adding force is because without checking the player is slowed down when grinding against the wall and holding a movement key. It is mentioned that if that is the effect you like then don't add the check!
  • 0