Platformer 2D Opengl

Advanced game related topics
threedslider
Enthusiast
Enthusiast
Posts: 555
Joined: Sat Feb 12, 2022 7:15 pm

Re: Platformer 2D Opengl

Post by threedslider »

Thanks @IceSoft for jumping :D

But for me i don't see the jump very well and it is quite fast, so my suggestion is :

Code: Select all

  If KeyboardPushed(#PB_Key_Space) And player\onGround
    player\vy = #JUMP_FORCE * 0.5
    player\onGround = #False
  EndIf

  ; -------------------
  ; PHYSIQUE
  ; -------------------
  player\vy + #GRAVITY * 0.3
  player\x + player\vx
  player\y + player\vy
User avatar
IceSoft
Addict
Addict
Posts: 1707
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Platformer 2D Opengl

Post by IceSoft »

threedslider wrote: Sat Jan 24, 2026 3:32 pm But for me i don't see the jump very well and it is quite fast, so my suggestion is :
The reason for this is: different fast devices
The speed in the example is not scaled.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Post Reply