Log In  


So I'm converting my game OBSTACOURSE (builds here: https://www.lexaloffle.com/bbs/?tid=37669) to 60 fps but am finding it difficult to get the jump to not be so fast (the value for the jump is -9 so it moves at the speed too)

jump at 60fps

jump at 30fps

My jump code is currently

if btn(❎) and ground then
    jmp-=9
    ground=false
 end

and I've been using the code below to change the animation speed but having trouble adapting it for the jump, does anyone know what/how I should do this?

if time() - ani_time > wait then
 s+=1
 ani_time=time() end


I'd recommend just cutting your gravity and movement/acceleration speed constants in half. That way you won't have to spend extra tokens on translation code that could end up causing bugs. So instead of delaying jump animation, for instance, you could just make the upward jump acceleration -4.5 instead of -9, as long as you cut the gravity in half.


The movement/acceleration and gravity isn't the problem, more finding a way for the first half of the arc of the jump to meet the height I want it to and to have the same speed as the gravity/second half of the arc of the jump

EDIT: my jump code doesn't include an acceleration variable, just the height it goes to.



[Please log in to post a comment]