Jump to content
Sign in to follow this  
FarmerPotato

10 Line XB entries: 10Liner 49er AND Gladiator

Recommended Posts

Joystick required.

Dig down.

Find the gold squares.

 

version 1

10 DIM A$(24)::W$="   a              aa aaa a a ahhhhxhxhxxxhhhhhxxhxhhxxxxhhxxxphpxpphhhxxxppxxxhppppxxppppx"::_=1::@=24
20 CALL CLEAR::CALL SCREEN(:: CALL COLOR(9,13,_)::CALL COLOR(10,7,_)::CALL COLOR(11,12,_)::CALL COLOR(12,15,_)::CALL COLOR(13,6,6)
30 F$="FFFFFFFFFFFFFFFF"::CALL CHAR(96,"18183C5A5A182858"&F$)::CALL CHAR(104,"55AA55AA55AA55AA")::CALL CHAR(112,F$)::CALL CHAR(120,F$)
40 FOR I=_ TO @::FOR J=_ TO 14::A$(I)=A$(I)&SEG$(W$,INT(RND*16+I*3),2)::NEXT J::PRINT A$(I)
50 NEXT I::FOR I=_ TO 5::DISPLAY AT(I,_):A$(I)::NEXT I::FOR I=6 TO @::CALL HCHAR(I,3,128,28)::NEXT I
60 C=16::R=4::CALL SPRITE(#1,96,14,R*8-7,C*8+9)
70 CALL JOYST(_,X,Y)::C1=C+X/4::R1=R-Y/4:: IF X<>0 AND C1>_ AND C1<28 THEN C=C1 ELSE IF R1>3 AND R1<@ THEN R=R1
80 IF SEG$(A$(R),C,_)="p" THEN G=G+_::DISPLAY AT(_,_) SIZE(3):G :: CALL SOUND(100,262,0,327,2,409,4) :: CALL SOUND(100,262,2,330,4,415,6)
90 IF R>4 THEN A$(R)=SEG$(A$(R),_,C-_)&CHR$(128)&SEG$(A$(R),C+_,28-C)
100 CALL LOCATE(#1,R*8-7,C*8+9)::FOR I=R-_ TO R+_::DISPLAY AT(I,C-_) SIZE(3):SEG$(A$(I),C-_,3)::NEXT I::GOTO 70

version 2. Graphic chars! Two color sprite! Rocks are unbreakable!

10 DIM A$(24)::W$= "    a  aa aahaahhahhhhhhhhhhhhhxhhxxxhhxhhxhpxxhxppxppxhhxhpxhhxxxxpp"&RPT$("x",16)::_=1::@=24::C=16::R=4
20 CALL CLEAR::CALL SCREEN(:: CALL COLOR(9,13,_,10,7,15,11,12,16,12,15,2,13,6,2)::F$=RPT$("F",16)::RANDOMIZE
30 CALL CHAR(96,"000C020509100000F00FF00FF00F1818606000FC606090D8",104,"33CC33CC33CC33CC",112,"FFDF8FDFFFFFFFFF",120,"74FAFA7A2AA98522",128,F$)::FOR I=_ TO @
40 K=I*3-2::E$=SEG$(W$,K,_)::A$(I)=E$::FOR J=_ TO 13::A$(I)=A$(I)&SEG$(W$,INT(RND*16+K),2)::NEXT J::A$(I)=A$(I)&E$::PRINT A$(I)
50 NEXT I::DISPLAY AT(_,_) SIZE(12):"10LINER 49ER"::FOR I=6 TO @::CALL HCHAR(I,3,129,28)::NEXT I::CALL SPRITE(#1,96,2,25,137,#2,98,16,25,137)
60 CALL JOYST(_,X,Y)::C1=C+X/4::R1=R-Y/4
70 IF X<>0 AND C1>_ AND C1<28 AND SEG$(A$(R),C1,1)<>"x" THEN C=C1 ELSE IF Y<>0 AND R1>3 AND R1<@ AND SEG$(A$(R1),C,1)<>"x" THEN R=R1
80 G$=SEG$(A$(R),C,1)::IF R>4 THEN A$(R)=SEG$(A$(R),_,C-_)&CHR$(128)&SEG$(A$(R),C+_,28-C)
90 CALL LOCATE(#1,R*8-7,C*8+9,#2,R*8-7,C*8+9)::FOR I=R-_ TO R+_::DISPLAY AT(I,C-_) SIZE(3):SEG$(A$(I),C-_,3)::NEXT I::IF G$<>"p" THEN 60
100 G=G+_::DISPLAY AT(_,25) SIZE(4):G :: FOR I=2 TO 14 STEP 2::CALL SOUND(-200,262,I,330,I*2,415,16)::NEXT I::GOTO 60

version 3. Press fire to dynamite! You get 5.

10 DIM A$(24):: W$= "    aa aa aahaahhahhhhhhhhhhhhhxhhxxxhhxhhxhpxxhxppxppxhhxhpxhhxxxxpp" &RPT$("x",16) ::_=1::@=24::C=16::R=4:$=CHR$(128)::M=999
20 CALL CLEAR::CALL SCREEN(:: CALL COLOR(9,13,_,10,7,15,11,12,16,12,15,2,13,6,2)::F$=RPT$("F",16)::RANDOMIZE
30 CALL CHAR(96,"000C020509100000F00FF00FF00F1818606000FC606090D8",104,"33CC33CC33CC33CC",112,"FFDF8FDFFFFFFFFF",120,"74FAFA7A2AA98522",128,F$)::FOR I=_ TO @
40 K=I*3-2::E$=SEG$(W$,K,_)::A$(I)=E$::FOR J=_ TO 13::A$(I)=A$(I)&SEG$(W$,INT(RND*16+K),2)::NEXT J::A$(I)=A$(I)&E$::DISPLAY AT(I,1):A$(I)
50 NEXT I::DISPLAY AT(_,_) SIZE(12):"10LINER 49ER"::FOR I=6 TO @::CALL HCHAR(I,3,129,28)::NEXT I::CALL SPRITE(#1,96,2,25,137,#2,98,16,25,137)
60 CALL JOYST(_,X,Y)::C1=C+X/4::R1=R-Y/4::CALL KEY(_,K,S)::IF K=18 AND D<5 THEN CALL SOUND(M,-6,0)::A$(R1)=SEG$(A$(R1),_,C1-_)&D$&SEG$(A$(R1),C1+_,28-C1):=D+1::GOTO 90
70 IF X<>0 AND C1>_ AND C1<28 AND SEG$(A$(R),C1,1)<>"x" THEN C=C1 ELSE IF Y<>0 AND R1>3 AND R1<@ AND SEG$(A$(R1),C,1)<>"x" THEN R=R1
80 G$=SEG$(A$(R),C,1)::IF R>4 THEN A$(R)=SEG$(A$(R),_,C-_)&D$&SEG$(A$(R),C+_,28-C)
90 CALL LOCATE(#1,R*8-7,C*8+9,#2,R*8-7,C*8+9)::FOR I=R-_ TO R+_::DISPLAY AT(I,C-_) SIZE(3):SEG$(A$(I),C-_,3)::NEXT I::IF G$<>"p" THEN 60
100 G=G+_::DISPLAY AT(_,25) SIZE(4):G :: FOR I=2 TO 14 STEP 2::CALL SOUND(-200,262,I,330,I*2,415,16)::NEXT I::GOTO 60

  • Like 4

Share this post


Link to post
Share on other sites

fixed - was

 CALL SCREEN(

I think it became a ( 8):: before I hit the <> button.

 

Changing of plain text into emojis - the 'feature' nobody ever wanted.

Edited by Asmusr
  • Like 2

Share this post


Link to post
Share on other sites
incredible 10 lines program, second version is much better!
but i am blocked, can't be continued and I can't go on the left border :P

 

post-24673-0-89032900-1559811077.jpg

 

  • Like 1

Share this post


Link to post
Share on other sites

 

incredible 10 lines program, second version is much better!
but i am blocked, can't be continued and I can't go on the left border :P

 

attachicon.gif2019-06-06_104903.jpg

 

 

 

I decided it should be hard to get all the gold. Like 'Klondike Solitaire'.

 

No you can't go on the edge columns 1 or 28. I put borders of rocks from row 13 down to indicate that. I made sure there was no gold in columns 1 or 28. Just for you Ciro! (But it made the game difficulty harder!)

 

How the maze generation difficulty happens:

 

In the string W$, there are 23 groups of 3 characters plus 16 'x', Corresponding to 24 lines of the screen.

 

You can see the structure better with commas between every third char:
W$
   , a , aa, aa,haa,hha,hhh,hhh,hhh,hhh,hxh,hxx,xhh,xhh,xhp,xxh,xpp,xpp,xhh,xhp,xhh,xxx,xpp,xxxxxxxxxxxxxxxx
 row:2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24

Space is blank, a is tree, h is dirt, x is rock, p is gold.

 

The first char of each group (position K) is the edge border for that row. See E$ . So line 1 has a space, line 5 has dirt, line 13 has a rock.

30 K=I*3-2::E$=SEG$(W$,K,1)

The other chars are chosen two at a time from the group of 16 starting at K:

SEG$(W$,INT(RND*16+K),2)

If you want to make the game easier, change the double 'xx' (rocks) to 'hx' or 'hh'. Especially that 'hxx' at row 12 can create a lot of difficulty for you!

  • Like 1

Share this post


Link to post
Share on other sites

 

but i am blocked, can't be continued and I can't go on the left border :P

 

Just for you, in version 3, I found a way to add Dynamite in line 60. It was tough, I kept getting LINE TOO LONG, but there it is. Dynamite away!

 

Thank you for all the feedback. I am done now!

  • Like 2

Share this post


Link to post
Share on other sites

Just for you, in version 3, I found a way to add Dynamite in line 60. It was tough, I kept getting LINE TOO LONG, but there it is. Dynamite away!

 

Thank you for all the feedback. I am done now!

 

 

coool ! :)

many thanks !

i like ! :)

Share this post


Link to post
Share on other sites

Inspired by 'Gladiator' (arcade) and 'Swashbuckler' (Apple II) and Video Brain Gladiator (oh god), here is Gladiator:

 

Instructions: Use joystick to move left or right, and raise shield up or down. Press fire, along with up or down, to ready your sword ; release fire to make an attack. If you get past your opponent's defenses, you defeat them. If your opponent's trident blocks your sword, or your shield blocks their trident, you both live another round. Otherwise you will die, nameless Gladiator.

 

Gladiator

It's kind of rough in the combat resolution. I'm putting it aside for a bit.

10 CALL CLEAR::CALL SCREEN(::CALL MAGNIFY(2)::S=2::T=1::R=80::C=128::Q=160::E=2
20 CALL CHAR(113,"003030300000000000000030303000000000000000303030",116,"2556360A06060A0A090F661F66060A0A00090606076E1665")
30 CALL CHAR( 97,"606848706070506860604078606050D86060406070686070",100,"1819121C101814641818101E1030484C30302030303E186C")
40 CALL CHAR( 105,"102040000000000000000000007000000000000000000070", 108,"020408000000000000000000000E0000000000000000000E")
50 CALL SPRITE(#1,104+S,12,R-4,C+6,#2,112+T,7,R-1,C-1,#3,96+S,2,R,C,#4,115+E,16,R,Q)
60 L=K::CALL JOYST(1,X,Y)::CALL KEY(1,K,Z)::Y=2-Y/4::IF K=18 THEN S=Y ELSE IF L=18 THEN F=4::S=Y+3 ELSE T=Y::IF X THEN C=C+X ELSE IF S>3 THEN S=S-3::F=0
70 E=INT(RND*3+1):: Q=Q-1::CALL PATTERN(#1,104+S,#2,112+T,#3,96+S,#4,115+E)::CALL LOCATE(#1,R-4,C+6,#2,R-1,C-1,#3,R,C,#4,R,Q) 
80 IF C+8+F<Q THEN 60 ELSE IF F AND S<>E+3 THEN 100 ELSE IF T=E OR S-3=E THEN C=C-8::Q=Q+8::GOTO 70
90 CALL COLOR(#4,9)::FOR I=1 TO 7::CALL SOUND(-100,999,2)::CALL SOUND(-100,880,::NEXT I::C=C-8::Q=Q+16::GOTO 50
100 CALL COLOR(#3,9)::FOR I=1 TO 7::CALL SOUND(-100,999-I*100,2)::NEXT I::C=C-16::Q=Q+8::GOTO 50

  • Like 1

Share this post


Link to post
Share on other sites

Just for you, in version 3, I found a way to add Dynamite in line 60. It was tough, I kept getting LINE TOO LONG, but there it is. Dynamite away!

 

Very nice. Good addition. Limited supply of dynamite, - which is fine.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...