Haven't posted in a while, but this is why… this, and I'm lazy. :)
I've made a Super Mario Maker-type game where you build out levels on the graph and then can play through them. Sounds simple, right? Here is the code:
DelVar JDelVar ZDelVar ADelVar B //initializing some variables
Menu("PlatJump","Creator",1,"Saved",2,"Editor",3 //menu select
Lbl 3
1→Z
Lbl 2
Input "Save:",W // a lot of loading...
ClrDraw
If W=1:Then
RecallPic 1
⌊P1(1)→C:⌊P1(2)→D:⌊P1(3)→J:⌊P1(4)→L:⌊P1(5)→Q:⌊P1(6)→R
End
If W=2:Then
RecallPic 2
⌊P2(1)→C:⌊P2(2)→D:⌊P2(3)→J:⌊P2(4)→L:⌊P2(5)→Q:⌊P2(6)→R
End
If W=3:Then
RecallPic 3
⌊P3(1)→C:⌊P3(2)→D:⌊P3(3)→J:⌊P3(4)→L:⌊P3(5)→Q:⌊P3(6)→R
End
If W=4:Then
RecallPic 4
⌊P4(1)→C:⌊P4(2)→D:⌊P4(3)→J:⌊P4(4)→L:⌊P4(5)→Q:⌊P4(6)→R
End
If W=5:Then
RecallPic 5
⌊P5(1)→C:⌊P5(2)→D:⌊P5(3)→J:⌊P5(4)→L:⌊P5(5)→Q:⌊P5(6)→R
End
If W=6:Then
RecallPic 6
⌊P6(1)→C:⌊P6(2)→D:⌊P6(3)→J:⌊P6(4)→L:⌊P6(5)→Q:⌊P6(6)→R
End
If W=7:Then
RecallPic 7
⌊P7(1)→C:⌊P7(2)→D:⌊P7(3)→J:⌊P7(4)→L:⌊P7(5)→Q:⌊P7(6)→R
End
If W=8:Then
RecallPic 8
⌊P8(1)→C:⌊P8(2)→D:⌊P8(3)→J:⌊P8(4)→L:⌊P8(5)→Q:⌊P8(6)→R
End
If W=9:Then
RecallPic 9
⌊P9(1)→C:⌊P9(2)→D:⌊P9(3)→J:⌊P9(4)→L:⌊P9(5)→Q:⌊P9(6)→R
End
If W=0:Then
RecallPic 0
⌊P0(1)→C:⌊P0(2)→D:⌊P0(3)→J:⌊P0(4)→L:⌊P0(5)→Q:⌊P0(6)→R
End
If Z=1
Goto 5
0→E
While not(E // character movment loop
If C≠A or D≠B:Then
C→A:D→B
Pxl-On(B,A
End
getKey→K
C-(K=24 and not(pxl-Test(B,A-1)))+(K=26 and not(pxl-Test(B,A+1→C //movement left and right
min(J,F+1)→F //gravity part 1
(K=25 and pxl-Test(B+1,C))*L→G //test for jumping
G+F→F /gravity part 2
If not(F:Then //gravity test-for-pixel-ground part 3
F→O
For(P,1,O,1
If pxl-Test(B+P,C):Then
P+1→F
O→P
End:End:End
If F>0:Then
F→O
For(P,1,O
If pxl-Test(B+P,C):Then
P-1→F
O→P
End:End:End:End //end of gravity part 3
F+D→D
If C=Q and D=R:Then
1→E:C+1→C
End
If C≠A or D≠B
Pxl-Off(B,A
End
ClrHome
Disp "Level Finished!
Stop
Lbl 1
ClrDraw
Line(0,0,96,0 //drawing out a box
Line(0,62,96,62
Line(0,0,0,64
Line(94,0,94,64
Lbl 5
46→A:31→B:47→C:31→D:0→J:2→L:0→F:0→E //more initializing variables
While not(F //drawing loop
If A≠C or B≠D:Then
L-1→L
C→A:D→B
If J≠2:Then
Pxl-Change(B-1,A:Pxl-Change(B+1,A:Pxl-Change(B,A+1:Pxl-Change(B,A-1
End
If J=2
Pxl-Change(B,A
End
getKey→K
C-(K=24)+(K=26)→C:D-(K=25)+(K=34)→D //movement
If K=22:Then
J+1→J
If J=3
0→J
Pxl-Change(B,A
End
If K=21
E+1→E
If E=3:0→E
If E=1:Pxl-On(B,A
If E=2:Pxl-Off(B,A
If L<0:0→L
If K=105 and L=0:Then
C+1→C:1→F
End
If A≠C or B≠D:Then
If J≠2:Then
Pxl-Change(B-1,A
Pxl-Change(B+1,A
Pxl-Change(B,A-1
Pxl-Change(B,A+1
End
If J=1:2→J
If J=2
Pxl-Change(B,A
0→Z
End:End
2→E
While E≥1 //MOAR loops :D
E-1→E
ClrHome
If E=1
Disp "Place Start
If E=0
Disp "Place End
Pause
46→A:31→B:47→O:31→P:0→F:2→L
While F=0
If A≠O or B≠P:Then
L-1→L
O→A:P→B
Pxl-Change(B,A
End
getKey→K
If L<0:0→L
If K=105 and L=0:Then
1→F:O+1→O
End
O-(K=24)+(K=26)→O
P-(K=25)+(K=34)→P
If A≠O or B≠P
Pxl-Change(B,A
End
O-1→O
If E=1:Then
O→C:P→D
End
If E=0:Then
O→Q:P→R
End
End
Input "Gravity:",J
Input "Jump:",L
Input "Save:",W //lastly, saving
If W=1:Then
StorePic 1
{C,D,J,L,Q,R}→⌊P1
End
If W=2:Then
StorePic 2
{C,D,J,L,Q,R}→⌊P2
End
If W=3:Then
StorePic 3
{C,D,J,L,Q,R}→⌊P3
End
If W=4:Then
StorePic 4
{C,D,J,L,Q,R}→⌊P4
End
If W=5:Then
StorePic 5
{C,D,J,L,Q,R}→⌊P5
End
If W=6:Then
StorePic 6
{C,D,J,L,Q,R}→⌊P6
End
If W=7:Then
StorePic 7
{C,D,J,L,Q,R}→⌊P7
End
If W=8:Then
StorePic 8
{C,D,J,L,Q,R}→⌊P8
End
If W=9:Then
StorePic 9
{C,D,J,L,Q,R}→⌊P9
End
If W=0:Then
StorePic 0
{C,D,J,L,Q,R}→⌊P0
End
ClrHome
Output(1,6,"Saved