i'm new to ruby and programming in general and i'm using a gem called ruby2D. Im trying to get a cube to jump, but when i press my jump key, my interpretor just crashes without any saying any errors
I've had problems actually identifying the problem, but i've tried with while instead of until and that didn't seem to work either
on :key_down do |jump|
if jump.key == 'j'
if player.y == 520
gravity = -15
player.y = 510
until player.y == 520
player.y += gravity
gravity += 1
end
end
end
end
i would want my cube to jump, and fall down again, but i just get crashes