Adding forces to you games - mainly gravity!

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 3

  • @ShubhamVerma
    @ShubhamVerma 6 років тому

    that was really helpful and so are other videos, thanks!

  • @etclee6630
    @etclee6630 5 років тому

    add flr function to deal with something like a z-ziggling: the red ball may stick to one of the border and keep ziggling since the float point arithmetics. I modify these two lines to solve this issue:
    --bounce
    if flr(x) < 0 or flr(x) > 127 then vx = -vx end
    if flr(y) < 0 or flr(y) > 127 then vy = -vy end

  • @jumbodude1987
    @jumbodude1987 4 роки тому +1

    my object manages to go beyond 0 and 127 on the x and y sometimes and it gets stuck (like what happened with yours) I tried to implement a for loop to check incrementally whether it is colliding with the wall using your box_hit function and collision video, but I don't think I did it properly
    damnit! back to the drawing board, oh well.
    thank you for your videos though they're great!