0 Members and 3 Guests are viewing this topic.
1:real(0:If not(Ans:Then:ClrDraw:Text(-1,0,24,"Requires":Repeat Ans:AüC:BüD:randInt(0,12üA:randInt(1,7üB:Text(-1,8D,6C," ":Text(("B0 31" is an invalid token)1,8B,6A,"XLib":getKey:End:Output(1,1,"":Stop:EndRectGC:CoordOff:GridOff:AxesOff:LabelOff:ExprOff:Degree:Func:Normal:Float:Connected:Sequential:Real:Full[[29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,7,13,13,13,13,13,9,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,6,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,2,2,3,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,8,12,12,12,12,12,10,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]ü[A][[0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0]]ü[B]real(7,00üX:0üY:5üdim(LGUY:1üLGUY(1:1üLGUY(2:2üdim(LMAP:0üLMAP(1:0üLMAP(2:0üLGUY(5100üTReal(12,0,80,1,80,62,0:Real(12,0,95,1,95,62,0:Real(12,0,81,0,94,0,0:Real(12,0,81,63,94,63,0Lbl 1Real(2,1,0,0,10,8,0,10,0,8,100,0,8,0Real(2,0,LMAP(2),LMAP(1),10,8,0,10,0,8,100,2,8,1While 1If T÷0:Goto FNT-.2üTReal(8AnsüKdim([A])üLDIMLGUY(2üLGUY(4:LGUY(1üLGUY(3If K=3:LGUY(2)+1üLGUY(2If K=2:LGUY(2)-1üLGUY(2If LGUY(5)=1:Then:LGUY(1)-2üLGUY(1:2üLGUY(5:EndIf K=54 and LGUY(5)=0:Then:LGUY(1)-2üLGUY(1:1üLGUY(5:EndIf K=1:LGUY(1)-1üLGUY(1)If K=55:Goto FNLGUY(1)+1üLGUY(1)If LGUY(2)<1:1üLGUY(2)If LGUY(1)<1:1üLGUY(2)If [A](LGUY(1),LGUY(2))ø0:ThenIf [A](LGUY(1),LGUY(4))=0:Then:LGUY(4üLGUY(2:0üLGUY(5:EndIf [A](LGUY(2),LGUY(3))=0:LGUY(3üLGUY(1EndIf LGUY(1)>LMAP(1)+4:LMAP(1)+1üLMAP(1If LGUY(1)<LMAP(1)+4:LMAP(1)-1üLMAP(1If LGUY(2)>LMAP(2)+5:LMAP(2)+1üLMAP(2If LGUY(2)<LMAP(2)+5:LMAP(2)-1üLMAP(2If LMAP(2)<0:0üLMAP(2If LMAP(2)>LDIM(2)-10:LDIM(2)-10üLMAP(2If LMAP(1)<0:0üLMAP(1If LMAP(1)>LDIM(1)-8:LDIM(1)-8üLMAP(1If LGUY(2)øLGUY(4) or LGUY(1)øLGUY(3:Then:0ü[A](LGUY(3),LGUY(4)):29ü[A](LGUY(1),LGUY(2:LGUY(1üLGUY(3:LGUY(2üLGUY(4:Goto 1:EndEndLbl FNClrHome:Output(1,1,"":Stop
:1:real(0:If not(Ans:Then:ClrDraw:Text({-}1,0,24,"Requires":Repeat Ans:A→C:B→D:randInt(0,12→A:randInt(1,7→B:Text({-}1,8D,6C," ":Text({-}1,8B,6A,"XLib":getKey:End:Output(1,1,"":Stop:End //XLib Test and Report:Func:CoordOff:GridOff:AxesOff:LabelOff:ExprOff:Degree:Func:Normal:Float:Connected:Sequential:Real:Full:[[29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,0,0,0,0,0,7,13,13,13,13,13,9,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,6,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,2,2,3,0,11,0,0,0,0,0,14,0,0,0,0,0,0,0][5,0,0,0,0,0,8,12,12,12,12,12,10,0,0,0,0,0,0,0][5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0][5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]]→[A] //Map matrix:[[0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0,0,0]]→[B] //Blank map for screen clearing:real(7,0:0→X:0→Y:5→dim(∟GUY:1→∟GUY(1:1→∟GUY(2:2→dim(∟MAP:0→∟MAP(1:0→∟MAP(2:0→∟GUY(5 //Initialize variables (∟Guy: 1=new y, 2= new x, 3=old y, 4=old x, 5=jump on/off):100→T::real(12,0,80,1,80,62,0:real(12,0,95,1,95,62,0:real(12,0,81,0,94,0,0:real(12,0,81,63,94,63,0 //Draw HUD:Lbl 1:real(2,1,0,0,10,8,0,10,0,8,100,0,8,0 //Clear map:real(2,0,∟MAP(2),∟MAP(1),10,8,0,10,0,8,100,2,8,1 //Draw New map:While 1:If T≤0:Goto FN:T-.2→T //That T thing is to keep track of time that has passed so far:real(8:Ans→K:dim([A])→∟DIM:∟GUY(2→∟GUY(4:∟GUY(1→∟GUY(3 //Store new to old so I can check If theyv'e been changed and therefore update the screen:If K=3:∟GUY(2)+1→∟GUY(2 //checks for keys pressed and acts accordingly (Next 7 Lines):If K=2:∟GUY(2)-1→∟GUY(2:If ∟GUY(5)=1:Then:∟GUY(1)-2→∟GUY(1:2→∟GUY(5:End:If K=54 and ∟GUY(5)=0:Then:∟GUY(1)-2→∟GUY(1:1→∟GUY(5:End:If K=1:∟GUY(1)-1→∟GUY(1):If K=55:Goto FN:∟GUY(1)+1→∟GUY(1) //Gravity:If ∟GUY(2)<1:1→∟GUY(2):If ∟GUY(1)<1:1→∟GUY(2) //Check for off screen:If [A](∟GUY(1),∟GUY(2))≠0:Then //(Block of three lines) Checks if guy is not in open space:If [A](∟GUY(1),∟GUY(4))=0:Then:∟GUY(4→∟GUY(2:0→∟GUY(5:End:If [A](∟GUY(2),∟GUY(3))=0:∟GUY(3→∟GUY(1:End:If ∟GUY(1)>∟MAP(1)+4:∟MAP(1)+1→∟MAP(1 //(Next 8 Lines) Moves map with guy, keeping him centered, except when not possible:If ∟GUY(1)<∟MAP(1)+4:∟MAP(1)-1→∟MAP(1:If ∟GUY(2)>∟MAP(2)+5:∟MAP(2)+1→∟MAP(2:If ∟GUY(2)<∟MAP(2)+5:∟MAP(2)-1→∟MAP(2:If ∟MAP(2)<0:0→∟MAP(2:If ∟MAP(2)>∟DIM(2)-10:∟DIM(2)-10→∟MAP(2:If ∟MAP(1)<0:0→∟MAP(1:If ∟MAP(1)>∟DIM(1)-8:∟DIM(1)-8→∟MAP(1:If ∟GUY(2)≠∟GUY(4) or ∟GUY(1)≠∟GUY(3:Then:0→[A](∟GUY(3),∟GUY(4)):29→[A](∟GUY(1),∟GUY(2:∟GUY(1→∟GUY(3:∟GUY(2→∟GUY(4:Goto 1:End //Checks if the guys position is changed, if it is, redraw the map.:End:::::Lbl FN:ClrHome:Output(1,1,"":Stop //Game finish