0 Members and 1 Guest are viewing this topic.
If pxl-Test(X/64,Y/64+10→A→B ;If it hits a barrier, zero the velocity ElseB+2→B+Y→Z ;2 is the value of gravity, so increment the velocity by 2, then add it to the positionIf (Z/64)-(Y/64)=2*pxl-Test(X/64,Z/64 ;in case you fell 2 pixels, test if you are on a barrierZ-64→ZEndZ→YEnd
:.ACCELL:44*256->X:28*256->Y:.X Accelleration:0->A:.Y Accelleration:0->B:repeat getkey(15):ClrDraw:Pt-On(X\256,Y\256,[FFFFFFFFFFFFFFFF]):If getkey(2):A-10->A:End:If getkey(3):A+10->A:End:X+A->X:Y+B->Y:DispGraph:End
Y>56?56→YX>88?88→X
:.ACCELL:44*256→X:28*256→Y:0→A:0→B:Repeat getKey(15):ClrDraw:Pt-On(X/256,Y/256,[FFFFFFFFFFFFFFFF]):If getKey(2):A-10→A:End:If getKey(3):A+10→A:End:If getKey(54):B-100→B:End:If X>>22528:22528→X:0→A:End:If X<<0:0→X→A:End:If Y>>14336:14336→Y:0→B:End:If Y<<0:0→Y→B:End:If getKey(2)=0 and (getKey(3)=0):A//2→A:End:X+A→X:Y+B→Y:DispGraph:End