GameMaker "Jump to Point" should be used for movement?

Suzaku

Member
Years ago I was used to make the character movement in a platform game using the DnD "set direction" + "set speed" in a "key press" event, and then when the player wants the character to stop moving, I used a a "set speed" to zero in a "key release" event. Im coming back to programming and now I want to make things in the right way, not just doing things from my head.

I wonder whats the popular and bug-free - but yet professional - way to make a character movement for platformers? I ve seen someone using "jump to point" for the movement with a "key down" event and relative checked, but my intuition says its just too limited and only for really newbies, but it seems to work. I would like some advice, or maybe a good tutorial that put me in the right track for eventual questions. Thank you.
 

Binsk

Member
A couple notes:

  1. There's no such thing as a "beginner method". In programming of it gets the job done satisfactorily then it is the correct way to do it.
  2. ALL movement essentially finishes with a "jump to point", even physics. The main difference is the checks done for collisions before hand.
You can 1) calculate collisions and modify your jump position to show it or 2) call the jump first and then backtrack as you figure out the collisions.

Both methods work.
 

saif

Member
A couple notes:

  1. There's no such thing as a "beginner method". In programming of it gets the job done satisfactorily then it is the correct way to do it.
  2. ALL movement essentially finishes with a "jump to point", even physics. The main difference is the checks done for collisions before hand.
You can 1) calculate collisions and modify your jump position to show it or 2) call the jump first and then backtrack as you figure out the collisions.

Both methods work.
Can you please tell me how can I calculate the collision with drag and drop? because when I put the gravity on my sprite and it hits the ground it gets stuck and I cant move it anywhere.. i kept searching and spent tons of house looking for a solution on youtube and google and no one was talking about it.. so please tell me how can I move my sprite on the ground
 
Top