A basic example (also attached):.GRAVTEST ClrDraw [FF818181818181FF]→Pic1 56→Y 0→V Repeat getKey(15) !If Y-56 0→V If getKey(54) 7→V End Else V-1→V End Pt-Change(44,Y-V→Y,Pic1) DispGraph Pt-Change(44,Y,Pic1) Pause 32 End | | Pseudocode:
Header Clear screen Object sprite Initialize y position Initialize y velocity Until user presses clear If object is at rest (bottom of screen) Set velocity to zero If user presses 2nd (jump) Set velocity to a positive value End Else, object is not at rest Decrease velocity End Update y position and draw sprite Update screen Clear sprite Delay End |