0 Members and 1 Guest are viewing this topic.
cool! Do you think it will be small enough to put into ztrumpet's Homescreen Gamepack?EDIT: 200th post!
:ClrHome:"3221110000→Str2:"MH →Str1:0identity(16→[A]:DelVar TDelVar SDelVar LRepeat S=20 and T=20:ClrHome:For(A,1,8:Output(A,9-8L,"++++++++:End:Output(1,9-8L,"PLAYER:Output(1,16-8L,L+1:1→X:1→Y:DelVar G1→R:Repeat R=11:Repeat K=21:For(A,0,expr(sub(Str2,R,1:Output(X+AG,Y+Anot(G)+8L,sub("* ",2-[A](X+AG,Y+Anot(G)+8L),1:End:If Ans=31:not(G→G:min(8-Gexpr(sub(Str2,R,1)),max(1,X+sum(DeltaList(K={25,34→X:min(8-not(G)expr(sub(Str2,R,1)),max(1,Y+sum(DeltaList(K={24,26→Y:For(A,0,expr(sub(Str2,R,1:Output(X+AG,Y+Anot(G)+8L,"*:End:Repeat Ans:getKey→K:End:End:DelVar HFor(A,0,expr(sub(Str2,R,1:H+[A](X+AG,Y+Anot(G)+8L→H:End:If not(H:Then:For(A,0,expr(sub(Str2,R,1:1→[A](X+AG,Y+Anot(G)+8L:End:If L:T+1+expr(sub(Str2,R,1→T:If not(L:S+1+expr(sub(Str2,R,1→S:R+1→R:End:End:not(L→L:End:1→X:Ans→Y:randInt(0,1→L:Lbl 1:Repeat S=0 xor T=0:ClrHome:For(A,1,8:Output(A,1+8L,"++++++++:End:Output(1,1+8L,"PLAYER:Output(1,8+8L,L+1:For(A,1,8:For(B,9-8L,16-8L:Output(A,B,sub(Str1,4-[A](A,B),1:End:End:1→X:9→Y:Repeat K=21:Output(X,Y-8L,sub(Str1,4-[A](X,Y-8L),1:min(8,max(1,X+sum(DeltaList(K={25,34→X:min(16,max(9,Y+sum(DeltaList(K={24,26→Y:Output(X,Y-8L,"S:Output(3,4+8L,sub("ABCDEFGH",X,1:Output(3,5+8L,Y-8:Repeat Ans:getKey→K:End:End:If 1<[A](X,Y-8L:Then:Output(5,1+8L,"TRY:Output(6,4+8L,"AGAIN:Pause:Goto 1:End:If not([A](X,Y-8L:Then:Output(5,3+8L,"MISS:3→[A](X,Y-8L:not(L→L:Pause:Goto 1:End:If 1=[A](X,Y-8L:Then:Output(5,3+8L,"HIT!:If L:T-1→T:If not(L:S-1→S:2→[A](X,Y-8L:not(L→L:Pause:End:End:End:DelVar [A]ClrHome:not(L→L:Output(4,5,"PLAYER:Output(4,12,L+1:Output(5,7,"WON!
just tried it out, and i am impressedi rarely play anything in basic anymore, but this one's a keeper. props =DEDIT: i glanced through the code really quickly and didnt see any obvious optimizations (cept mebbe where you used 1->x:1->y and then later 1->x:ans->y), but i like i said i havent messed with basic in a while and never on a screen this large, so...DOUBLE EDIT: here's the codeSpoiler For To keep this post smaller: Code: [Select]:ClrHome:"3221110000→Str2:"MH →Str1:0identity(16→[A]:DelVar TDelVar SDelVar LRepeat S=20 and T=20:ClrHome:For(A,1,8:Output(A,9-8L,"++++++++:End:Output(1,9-8L,"PLAYER:Output(1,16-8L,L+1:1→X:1→Y:DelVar G1→R:Repeat R=11:Repeat K=21:For(A,0,expr(sub(Str2,R,1:Output(X+AG,Y+Anot(G)+8L,sub("* ",2-[A](X+AG,Y+Anot(G)+8L),1:End:If Ans=31:not(G→G:min(8-Gexpr(sub(Str2,R,1)),max(1,X+sum(DeltaList(K={25,34→X:min(8-not(G)expr(sub(Str2,R,1)),max(1,Y+sum(DeltaList(K={24,26→Y:For(A,0,expr(sub(Str2,R,1:Output(X+AG,Y+Anot(G)+8L,"*:End:Repeat Ans:getKey→K:End:End:DelVar HFor(A,0,expr(sub(Str2,R,1:H+[A](X+AG,Y+Anot(G)+8L→H:End:If not(H:Then:For(A,0,expr(sub(Str2,R,1:1→[A](X+AG,Y+Anot(G)+8L:End:If L:T+1+expr(sub(Str2,R,1→T:If not(L:S+1+expr(sub(Str2,R,1→S:R+1→R:End:End:not(L→L:End:1→X:Ans→Y:randInt(0,1→L:Lbl 1:Repeat S=0 xor T=0:ClrHome:For(A,1,8:Output(A,1+8L,"++++++++:End:Output(1,1+8L,"PLAYER:Output(1,8+8L,L+1:For(A,1,8:For(B,9-8L,16-8L:Output(A,B,sub(Str1,4-[A](A,B),1:End:End:1→X:9→Y:Repeat K=21:Output(X,Y-8L,sub(Str1,4-[A](X,Y-8L),1:min(8,max(1,X+sum(DeltaList(K={25,34→X:min(16,max(9,Y+sum(DeltaList(K={24,26→Y:Output(X,Y-8L,"S:Output(3,4+8L,sub("ABCDEFGH",X,1:Output(3,5+8L,Y-8:Repeat Ans:getKey→K:End:End:If 1<[A](X,Y-8L:Then:Output(5,1+8L,"TRY:Output(6,4+8L,"AGAIN:Pause:Goto 1:End:If not([A](X,Y-8L:Then:Output(5,3+8L,"MISS:3→[A](X,Y-8L:not(L→L:Pause:Goto 1:End:If 1=[A](X,Y-8L:Then:Output(5,3+8L,"HIT!:If L:T-1→T:If not(L:S-1→S:2→[A](X,Y-8L:not(L→L:Pause:End:End:End:DelVar [A]ClrHome:not(L→L:Output(4,5,"PLAYER:Output(4,12,L+1:Output(5,7,"WON!
Making *any* game in a kilobyte or less is quite a task. I myself had a pack of 1 kilobyte games in a folder somewhere but i dont have them anymore...