• 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!

Simple Platformer Movement

C

Chris White

Guest
What is the simplest way to have basic, left, right and jump movements in a platformer game. I have been trying for hours and the way I'm doing it, the jump works but when the player hits the ground he can't move. He will only move left and right whilst in the air, not touching the ground. I'm sure what I've done is way to complicated and makes no sense, is there any other way I can do this, simpler?

Thanks
-Chris
 
T

TriiiKill

Guest
I'm assuming that when he touches collides with the ground you set his speed to 0? That would be the problem.
 
M

mr_starfire

Guest
You could follow a tutorial on that video sharing website we all love so much . Im not suggesting you copy exactly what they do but i found them very useful when i started out..


Again i would not do exactly as they do but they do give great insight and cool tips . of course if you want to get a prototype done quickly you can copy exactly
what these guys do I'm sure you will still learn a lot ... good luck and welcome to the forum :)
 
C

Chris White

Guest
I'm assuming that when he touches collides with the ground you set his speed to 0? That would be the problem.
When the player collides with the ground i set his vspeed to 0, yeah. How else can i do it?
 

Jakylgamer

Member
you probably havent set a mask for the player object, this happens sometimes when the sprites are slightly wider / taller than others.
just go into all the player sprites and set the mask(bounding box) for each sprite to be the same or make a separate sprite for the mask and set it in the object.
 
T

TriiiKill

Guest
When the player collides with the ground i set his vspeed to 0, yeah. How else can i do it?
I'm not an expert, but I think the problem comes from constant interactions with the ground. One option would be to have multiple objects for your player, like :
-obj_Player
-obj_Player_Jumping
And you switch between them. The regular player has no events involving the ground, but looks like he does. Because when you "jump" you switch to object "obj_Player_Jumping," and when he touches the ground, you set vspeed to 0 and change objects again.
 
Top