• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Best way to deal with movement in platformer

S

saahy

Guest
Hi Everyone,
I'm new to GameMaker and just trying to deal with movement (including jumping, move to the left and right and collision) in a platformer game.

There is a lot of tutorials out there which I watched/read almost all of them :))
But cannot find what I looking for!

Currently I just make some movements and collisions using physics in GMS2, because this is the only way I found to handle with Ramps! so my problems are:

1- I just using apply force to make jump, but its not smooth as I want! is there any better way?
2- How can i detect a collision (in physics) is horizontal or vertical? because I want to add wall jump back so I need to know collision with my wall object is horizontal or vertical!

and last question:

Is it better to use Physics for movement and collisions in a platformer or using GML and write everything by myself at all?

Also I have experience in C#, C++, PHP and JS :D

Thanks a lot and have a lovely day
 
S

saahy

Guest
i don't think using physics its a good option, look for heatbeast tutorials, i started watching his videos
Hmm,
For some rolling objects like giant stone balls or similar I think Physics works fine!
But for movement! it seems you right :D its not working as like as I want.
And which HeartBeast tutorials you mean? they have some youtube tutorials and udemy! both?

Thanks a lot :)
 
R

Rukiri

Guest
i don't think using physics its a good option, look for heatbeast tutorials, i started watching his videos
Every Platformer in some way has used physics, Megaman had a lot of world based elements which coding those elements from scratch is probably not a good idea especially if your actually trying to mimic those elements that box2D already does pretty well.
The only downside to even using physics is that you can not have more than 1 collision shape which is almost essential nowadays.

However, to counter my own statement if you don't have an understanding of physics using frame based movement is probably a better choice and you can use 2 collision shapes albeit using objects but it get's the job done.
 

TheouAegis

Member
Shaun Spalding covers tile ramps in his tutorials. I think it was Shaun. No physics. Just avoid his jump-through platforms vid.
 
Top