L
Lolimancer
Guest
Hi, this would be my first comment on this forum (and my first time using GMS). Nice to meet you all.
So... Right now i'm trying to make a platformer game, checked a few videos and ended with this:
and this...
I just wanted to have horizontal movement with vertical collisions til' now, so please ignore the lack of horizontal collisions, my main concern right now is this little offset when the player collides with "object_1" (floor) when he falls:
(Blue = Player / Red = Ground)
Is this supossed to happen or am I doing something wrong? I'd really appreaciate some help, thanks for checking my thread.
So... Right now i'm trying to make a platformer game, checked a few videos and ended with this:
Code:
// Character variables.
Gravity = 1;
Speed_Movement = 5;
Speed_Jump = 7;
Code:
// Inputs.
Mov_Left = -keyboard_check(vk_left);
Mov_Right = keyboard_check(vk_right);
Mov_Jump = keyboard_check_pressed(vk_space);
// Horizontal movement.
Dir = Mov_Left + Mov_Right;
hspeed = Dir * Speed_Movement;
if (place_meeting(x, y+1, object_1))
{
vspeed = 0;
}
else
{
if(vspeed < 10)
{
vspeed += Gravity;
}
}
(Blue = Player / Red = Ground)
Is this supossed to happen or am I doing something wrong? I'd really appreaciate some help, thanks for checking my thread.