N
Ninjinister
Guest
Hello,
Working on a platformer in GMS 1.4.1788, I've basically copied the code from an old Mario fangame I'd started infinity years ago. However, it doesn't seem to work in GMS the way it did back in GM7.
In particular, the character jump speed - both rising and falling, are not to the speed I'd like them to be.
This is the jump/fallspeed from the old game
However, it is very much slower and I'd like it to be of the same speed as you see in this video. Character's jump height is perfect for what I need; it's just the speed that's vexing me, whether from a standstill, walking, or running.
Here's what I'm working with:
CREATE
ALARM 0
STEP
COLLISION WITH SOLID
JUMP BUTTON (CTRL for now)
Thank you for any help you may be able to provide.
Cheers.
Working on a platformer in GMS 1.4.1788, I've basically copied the code from an old Mario fangame I'd started infinity years ago. However, it doesn't seem to work in GMS the way it did back in GM7.
In particular, the character jump speed - both rising and falling, are not to the speed I'd like them to be.
This is the jump/fallspeed from the old game
However, it is very much slower and I'd like it to be of the same speed as you see in this video. Character's jump height is perfect for what I need; it's just the speed that's vexing me, whether from a standstill, walking, or running.
Here's what I'm working with:
CREATE
Code:
jumpcontrol = false
jump = false
Code:
jumpcontrol = false
Code:
gravity_direction = 270;
if place_free(x,y+1)
{
gravity = 0.5;
}
else
{
gravity = 0;
}
Code:
if keyboard_check(vk_control) and jumpcontrol = true
{
if keyboard_check(vk_shift)
{vspeed-=3.3}else
{vspeed-=3.0}
}
Code:
if other.y > self.y
{
if (vspeed > 0 && not place_free(x,y+vspeed)) move_contact(270);
vspeed = 0;
jump = false
}
else
{
if (vspeed > 0 && not place_free(x,y+vspeed)) move_contact(270);
vspeed = 0;
}
Code:
if (not place_free(x,y+1))
{
jumpcontrol = true
alarm[0] = 4
jump = true
}
Cheers.