Jump to content

Recommended Posts

I came across this site today https://gkanold.wixsite.com/homeputerium/kopie-von-basic-10liners-2019. I know we've done a similar contest in the past, but it allowed for DATA statements.

It would be fun to launch a new contest for games programmed with only 10 lines of XB and nothing else and see what we can come up with.

Any interest? We could submit them to the 2020 entries.

  • Like 2

Share this post


Link to post
Share on other sites

I think you misunderstand data loaded from secondary storage devices and DATA statements in the actual program, which the 10Liners contest definitely allows. You must not use it to load own machine code routines though, just for graphics or other purposes of filling arrays.

 

Does XB support multiple statements on the same line? Perhabs RXB or other modern versions of the language. I think the fact that reglar TI BASIC and TI Extended BASIC don't seem to support multiple statements on the same row is the reason why no TI-99/4A entries have been entered into the competition, as you normally can't pack anywhere near 80 columns of code without it.

Share this post


Link to post
Share on other sites

I think you misunderstand data loaded from secondary storage devices and DATA statements in the actual program, which the 10Liners contest definitely allows. You must not use it to load own machine code routines though, just for graphics or other purposes of filling arrays.

 

Does XB support multiple statements on the same line? Perhabs RXB or other modern versions of the language. I think the fact that reglar TI BASIC and TI Extended BASIC don't seem to support multiple statements on the same row is the reason why no TI-99/4A entries have been entered into the competition, as you normally can't pack anywhere near 80 columns of code without it.

 

TI Extended BASIC permits multiple statements in a single line. It's not quite as voluminous as other 8-bit machines, like the TRS-80 Color Computer which allows 255 characters, but it's enough you can write something decent in 10 lines.

 

The good thing about such contests is that we always get a lot of participation here; there's plenty of XB familiar programmers on the board. :)

  • Like 1

Share this post


Link to post
Share on other sites

Great! Previously I dabbled with Extended BASIC through emulation but didn't seem to get multiple statements to be recognized by the interpreter so I must've done something wrong.

 

Edit: Aha, it is not : but :: to separate statements!

Edited by carlsson

Share this post


Link to post
Share on other sites

I think you misunderstand data loaded from secondary storage devices and DATA statements in the actual program, which the 10Liners contest definitely allows. You must not use it to load own machine code routines though, just for graphics or other purposes of filling arrays.

 

What I meant was that in our previous contest the Data statements were in addition to the 10 lines. This will not be the case in this contest.
  • Like 1

Share this post


Link to post
Share on other sites

I believe TI BASIC qualifies for PUR-80 while Extended BASIC qualifies for PUR-120 if you don't make the lines too long. It might be an advantage to use RXB because it allows you to do more with less code.

  • Like 2

Share this post


Link to post
Share on other sites

How about we split into 2 categories: TI Basic and XB or any of its variants?

TI Basic with only 10 lines is going to be interesting to say the least... CALL CLEAR and you're already down 1 line!

  • Like 2

Share this post


Link to post
Share on other sites

 

TI Extended BASIC permits multiple statements in a single line. It's not quite as voluminous as other 8-bit machines, like the TRS-80 Color Computer which allows 255 characters, but it's enough you can write something decent in 10 lines.

 

The good thing about such contests is that we always get a lot of participation here; there's plenty of XB familiar programmers on the board. :)

He might be referring to changes in RXB from XB.

 

Like in normal XB you have CALL HCHAR(row,column,character number,repetition)

 

In RXB the change is HCHAR(row,column,character number,repetition,row,column,character number,repetition,HCHAR(row,column,character number,repetition,...)

 

Also many other commands have this change in RXB and as far as I know no other version of XB has this upgraded change.

Share this post


Link to post
Share on other sites

I believe TI BASIC qualifies for PUR-80 while Extended BASIC qualifies for PUR-120 if you don't make the lines too long. It might be an advantage to use RXB because it allows you to do more with less code.

Thanks.

If you use my CALL USER("DSK#.BATCHNAME") or pick a filename it allows you to use DV80 files and the lines can be up to the limit allowed in XB 163 tokens or 255 characters.

 

Also fixed the REDO key problem with recalling a line and being cut off.

Share this post


Link to post
Share on other sites

For once I would like to see a RXB program contest.

 

After all RXB is built into Classic99 and RXB is the only XB with SAMS support built into it.

  • Like 2

Share this post


Link to post
Share on other sites

I think we should let people pick the XB flavor they prefer. I will use RXB.

 

I guess then a lot speaks for using the advantages of RXB. Cool. I am on programming something already, will switch to RXB then :)

  • Like 1

Share this post


Link to post
Share on other sites

Here is a silly little XB slot machine 10 liner I threw together.... Let me know if anyone pulls off the jackpot (space invader, man, pacman & ghost - in this order).

100 RANDOMIZE :: DIM B(13):: CALL MAGNIFY(2):: FOR I=1 TO 4 :: READ A(I):: B(I)=A(I)::B(I+4)=A(I)::B(I+=A(I):: NEXT I :: READ W$ :: X=1000::S=1::CALL CLEAR::PRINT "YOU START WITH $1,000." : :
105 CALL CHAR(97,"00003C5A7E2442000018003C5A18242400003E6C787C3E0000003C5A7E7E5A"):: INPUT "WHAT IS YOUR MAXIMUM BET PERGAME? $":C :: IF C<=1000 THEN 110 ELSE PRINT "TRY AGAIN"::GOTO 105 
110 GOSUB 900::IF X-C>=0 THEN 130 ! WIN *MEGA JACKPOT* BY SPINNING SPACE INVADER, MAN, PACMAN & GHOST - IN THIS ORDER.
120 PRINT "INSUFFICIENT FUNDS TO       CONTINUE." : : "         GAME OVER     ": :"STARTING BALANCE WAS $1,000":"YOU LOST ALL YOUR CASH":"IN "&STR$(S)&" SPINS.   LOSER."::STOP
130 X=X-C :: GOSUB 900 :: s=s+1::DISPLAY AT(14,10)BEEP:"GOOD LUCK!" :: FOR D=1 TO 4 :: CALL COLOR(#D,2):: FOR I=1 TO 12 :: CALL PATTERN(#D,B(I)):: CALL SOUND(30,110+I*30,I):: NEXT I
140 I=INT((RND*4)+1):: CALL PATTERN(#D,A(I)):: A$=A$&CHR$(A(I)):: Z$(D)="-"&A$&RPT$("!",4-D):: NEXT D :: FOR D=1 TO 4 :: WI(D)=POS(W$,Z$(D),1):: NEXT D :: FOR D=4 TO 1 STEP -1 :: IF WI(D)<>0 THEN 170
160 NEXT D :: DISPLAY AT(14,10):"* NO WIN *" :: FOR I=1 TO 100 :: NEXT I :: GOTO 110
170 E=VAL(SEG$(W$,WI(D)+5,4))*C :: DISPLAY AT(14,4):"CONGRATS! YOU WIN $"&STR$(E)&"." :: FOR I=1 TO 10 STEP .5 :: CALL SOUND(-500,I*110,0):: NEXT I :: X=X+E :: FOR I=1 TO 500 :: NEXT I :: GOTO 110
900 CALL CLEAR :: DISPLAY AT(1,1):"AVAILABLE FUNDS $"&STR$(X):"BETTING AMOUNT $"&STR$(C)&"    " :: FOR I=1 TO 4 :: CALL SPRITE(#I,45,2,80,70+I*20):: NEXT I :: A$="" :: DISPLAY AT(24,1):S::RETURN
1000 DATA 97,98,99,100,-aa!!0001-bb!!0001-cc!!0001-dd!!0001-aaa!0010-bbb!0010-ccc!0010-ddd!0010-aaaa0100-bbbb0100-cccc0100-dddd0100-abcd1000
Edited by Bones-69
  • Like 7

Share this post


Link to post
Share on other sites

Here is a silly little XB slot machine 10 liner I threw together.... Let me know if anyone pulls off the jackpot (space invader, man, pacman & ghost - in this order).

Sweet!

Share this post


Link to post
Share on other sites

Whoever tries to quickly update the Screen, check out CALL MOVES from RXB.

You can establish sort of scrolling pretty easy.

Yesterday I got my code down from over 20 lines to 8 :) But there are main features missing still :)

It is fun :)

  • Like 1

Share this post


Link to post
Share on other sites

 

Here is a silly little XB slot machine 10 liner I threw together.... Let me know if anyone pulls off the jackpot (space invader, man, pacman & ghost - in this order).

100 RANDOMIZE :: DIM B(13):: CALL MAGNIFY(2):: FOR I=1 TO 4 :: READ A(I):: B(I)=A(I)::B(I+4)=A(I)::B(I+=A(I):: NEXT I :: READ W$ :: X=1000::S=1::CALL CLEAR::PRINT "YOU START WITH $1,000." : :
105 CALL CHAR(97,"00003C5A7E2442000018003C5A18242400003E6C787C3E0000003C5A7E7E5A"):: INPUT "WHAT IS YOUR MAXIMUM BET PERGAME? $":C :: IF C<=1000 THEN 110 ELSE PRINT "TRY AGAIN"::GOTO 105 
110 GOSUB 900::IF X-C>=0 THEN 130 ! WIN *MEGA JACKPOT* BY SPINNING SPACE INVADER, MAN, PACMAN & GHOST - IN THIS ORDER.
120 PRINT "INSUFFICIENT FUNDS TO       CONTINUE." : : "         GAME OVER     ": :"STARTING BALANCE WAS $1,000":"YOU LOST ALL YOUR CASH":"IN "&STR$(S)&" SPINS.   LOSER."::STOP
130 X=X-C :: GOSUB 900 :: s=s+1::DISPLAY AT(14,10)BEEP:"GOOD LUCK!" :: FOR D=1 TO 4 :: CALL COLOR(#D,2):: FOR I=1 TO 12 :: CALL PATTERN(#D,B(I)):: CALL SOUND(30,110+I*30,I):: NEXT I
140 I=INT((RND*4)+1):: CALL PATTERN(#D,A(I)):: A$=A$&CHR$(A(I)):: Z$(D)="-"&A$&RPT$("!",4-D):: NEXT D :: FOR D=1 TO 4 :: WI(D)=POS(W$,Z$(D),1):: NEXT D :: FOR D=4 TO 1 STEP -1 :: IF WI(D)<>0 THEN 170
160 NEXT D :: DISPLAY AT(14,10):"* NO WIN *" :: FOR I=1 TO 100 :: NEXT I :: GOTO 110
170 E=VAL(SEG$(W$,WI(D)+5,4))*C :: DISPLAY AT(14,4):"CONGRATS! YOU WIN $"&STR$(E)&"." :: FOR I=1 TO 10 STEP .5 :: CALL SOUND(-500,I*110,0):: NEXT I :: X=X+E :: FOR I=1 TO 500 :: NEXT I :: GOTO 110
900 CALL CLEAR :: DISPLAY AT(1,1):"AVAILABLE FUNDS $"&STR$(X):"BETTING AMOUNT $"&STR$(C)&"    " :: FOR I=1 TO 4 :: CALL SPRITE(#I,45,2,80,70+I*20):: NEXT I :: A$="" :: DISPLAY AT(24,1):S::RETURN
1000 DATA 97,98,99,100,-aa!!0001-bb!!0001-cc!!0001-dd!!0001-aaa!0010-bbb!0010-ccc!0010-ddd!0010-aaaa0100-bbbb0100-cccc0100-dddd0100-abcd1000

Cool! Just need to add some color :)

  • Like 1

Share this post


Link to post
Share on other sites

Let me know if anyone pulls off the jackpot (space invader, man, pacman & ghost - in this order).

 

Oh so close! I feel so cheated and want my money back!

post-47499-0-90415100-1559658346.png

Share this post


Link to post
Share on other sites

 

Here is a silly little XB slot machine 10 liner I threw together.... Let me know if anyone pulls off the jackpot (space invader, man, pacman & ghost - in this order).

 

Did it at least 4 times, I think. :-o Currently over $180,000, over 700 spins and still going. $50 bets.

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites

$540.000, bets $500, 56 spins so fare...

1.000.000, 500, 150

1.500.000, 500, 160

1.600.000, 500, 275

2.140.000, 500, 300

8.950.000, 500, 2675 - Looks like this will go on for ever...
12.500.000 500, 4400

13.041.500, 500, 4430

13.680.000, 500, 4475

14.234.000, 500, 4495

48.454.000, 500, 17025

103.360.000, 500, 37700

109.333.000, 500, 39606 - 40.000 Spins is it!

109.515.000, 500, 40000 - "Game Over"

How do I upload a pic. to show off :P ?

Edited by oddemann

Share this post


Link to post
Share on other sites

Hit another one (maybe two...I was outside tearing up some rotted deck steps)—now at $244,800 and 949 spins. Of course, I am not doing anything but watching it happen. :grin: The $50 betting choice at game start was apparently the key.

 

...lee

Share this post


Link to post
Share on other sites

I let it run overnight, appears there may have been some excess generosity with the payout levels set..... :lol:

 

It is disturbing how mind-numbingly entertaining it is just to watch it - and even weirder the undeserved feeling of satisfaction/accomplishment when four of a kind spin up.

post-26079-0-49972700-1559686901_thumb.jpg

  • Like 1

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...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...