Jump to content
IGNORED

BASIC Ten-Liners Contest 2015


Bunsen

Recommended Posts

Where is the source for these posted? How do we know they are 10 lines? Plus I want to type them in for fun

0GR.0:POKE710,0:POKE82,0:CLS:POKE752,1:F.F=1TO15:F.I=1TO21:?".";:N.I:?:N.F:CLR:HI=PEEK(1536)=RAND(21):Y=RAND(15)

1POS.25,2:?"  F*CK-MAN  ":F.F=1TO15:A=RAND(21):B=RAND(15):POS.A,B:?" ":N.F  

2DO:Z=Z+.2:P=(Q-Z):POS.X,Y:?"o":M=X:N=Y:S=STICK(0):IFZ>=200ORP<-20:P=-20:EXIT:ENDIF:POS.25,9:?"SCORE:  ";INT(P);" "

3POS.25,10:?"HISCORE:";HI:X=X-(S=11)+(S=7):Y=Y+(S=13)-(S=14):IFX<0ORX>20ORY<0ORY>14:EXIT:ENDIF

4LOC.X,Y,H:IFCHR$(H)=" ":EXIT:ENDIF:POS.M,N:?" ":IFCHR$(H)<>".":G.2:ENDIF:SO.0,121,10,5:SO.1,182,10,10:SO.2,30,12,3

5SO.:Q=Q+1:LOOP:POS.25,5:?" GAME OVER! ":SC=INT(P):IFSC>HI:HI=INT(SC):ENDIF:POS.25,10:?"HISCORE:";HI:POKE1536,HI

6 REPEAT :UNTIL STRIG(0)=0:G.0

Try this :) . It's still a beta, but full playable. I have three lines left. Much space to cram something in... animated character, title screen, music ...

 

Don't forget to type POKE 82,0 before typing in. Otherwise the editor won't accept the whole line.

Edited by Bunsen
  • Like 1
Link to comment
Share on other sites

Oh, man. I've just seen, that I can save some more characters by changing first two lines. I stared yesterday the whole day on the code to optimize it here and there... :)

0GR.0:POKE710,0:POKE82,0:CLS:POKE752,1:F.F=1TO15:F.I=1TO21:?".";:N.I:?:N.F:CLR:HI=PEEK(1536)

1POS.25,2:?"  F*CK-MAN  ":F.F=1TO16:A=RAND(21):B=RAND(15):POS.A,B:?" ":N.F:X=A:Y=B 

14 characters saved :-D

Link to comment
Share on other sites

4 Entries so far:

 

Beitrag/Entry #1: Chase

Platform: Atari

Author: Holger "Rockford" Bommer

Language: Turbo BASIC XL

Category: PUR

Beitrag/Entry #2: Micronoid

Platform: Amstrad/Schneider CPC

Author: Markus "Devilmarkus" Hohmann

Language: Locomotive BASIC

Category: EXTREM

Beitrag/Entry #3: Get!

Platform: Atari

Author: Chris "atariland2600" Read

Language: Turbo BASIC XL

Category: PUR

Beitrag/Entry #4: K1nderc0mp

Platform: Atari

Author: Chris "atariland2600" Read

Language: Turbo BASIC XL

Category: PUR

Link to comment
Share on other sites

Beitrag/Entry #7: Hangman


Platform: Atari


Author: Adrian Groves


Language: Atari BASIC


Category: PUR



Beitrag/Entry #8: Navigator


Platform: Commodore 64


Author: "e5frog"


Language: Commodore BASIC V2


Category: PUR



Beitrag/Entry #9: Racer


Platform: Commodore 64


Author: Georg "Endurion" Rottensteiner


Language: Commodore BASIC V2


Category: PUR


Link to comment
Share on other sites

I understand that SYS and USR (Commodore speak) are not allowed, perhaps WAIT is fine as long as it polls an address handled by the OS. For instance something like POKE198,0:WAIT198,1 on the VIC/C64 would clear the keyboard buffer and wait for any key to be pressed instead of a GET A$:IF A$="" THEN GOTO.

Link to comment
Share on other sites

  • 2 weeks later...

You haven't kept me busy like last year, so I had some time for my own little program.

 

The little hero has a huge hunger after his nightly forays. Luckily he finds lying around some donuts, he immediately chomps with a loud "DRRRKKKKRRRRRTTTT". He must hurry, his blood sugar level drops threatening if he does not move and does not eat. But there are many potholes on the road, in which he can not fall in.

F*ckman is controlled by the joystick on the left joystick port.

 

 

 

Fckman.atr

post-4699-0-13391800-1424989655_thumb.png

  • Like 2
Link to comment
Share on other sites

0GR.0:POKE710,0:POKE82,0:CLS:POKE752,1:F.F=1TO15:F.I=1TO21:?".";:N.I:?:N.F:CLR:HI=PEEK(1536)=RAND(21):Y=RAND(15)

1POS.25,2:?"  F*CK-MAN  ":F.F=1TO15:A=RAND(21):B=RAND(15):POS.A,B:?" ":N.F  

2DO:Z=Z+.2:P=(Q-Z):POS.X,Y:?"o":M=X:N=Y:S=STICK(0):IFZ>=200ORP<-20:P=-20:EXIT:ENDIF:POS.25,9:?"SCORE:  ";INT(P);" "

3POS.25,10:?"HISCORE:";HI:X=X-(S=11)+(S=7):Y=Y+(S=13)-(S=14):IFX<0ORX>20ORY<0ORY>14:EXIT:ENDIF

4LOC.X,Y,H:IFCHR$(H)=" ":EXIT:ENDIF:POS.M,N:?" ":IFCHR$(H)<>".":G.2:ENDIF:SO.0,121,10,5:SO.1,182,10,10:SO.2,30,12,3

5SO.:Q=Q+1:LOOP:POS.25,5:?" GAME OVER! ":SC=INT(P):IFSC>HI:HI=INT(SC):ENDIF:POS.25,10:?"HISCORE:";HI:POKE1536,HI

6 REPEAT :UNTIL STRIG(0)=0:G.0

Try this :) . It's still a beta, but full playable. I have three lines left. Much space to cram something in... animated character, title screen, music ...

 

Don't forget to type POKE 82,0 before typing in. Otherwise the editor won't accept the whole line.

 

 

Found a way to increase your space. :)

6 REPEAT :UNTIL STRIG(0)=0:G.0

instead use:

6 WHILE STRIG(0):WEND:G.0

Save yourself 4 characters here. :)

 

Also line 4:

4LOC.X,Y,H:IFCHR$(H)=" ":EXIT:ENDIF:POS.M,N" ":IFCHR$(H)<>".":G.2:ENDIF:SO.0,121,10,5:SO.1,182,10,10:SO.2,30,12,3

Becomes:

4LOC.X,Y,H:IFH=32:EXIT:ENDIF:POS.M,N" ":IFH<>46:G.2:ENDIF:SO.0,121,10,5:SO.1,182,10,10:SO.2,30,12,3

Saves 15 characters.

 

Also, if the sound frequency for each channel never changes in the program, just POKE the frequency into AUDF regs once at beginning of program, and only use AUDC POKES to change volume. Might save more space. :)

 

I need to try my hand in this contest!

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

I understand that SYS and USR (Commodore speak) are not allowed, perhaps WAIT is fine as long as it polls an address handled by the OS. For instance something like POKE198,0:WAIT198,1 on the VIC/C64 would clear the keyboard buffer and wait for any key to be pressed instead of a GET A$:IF A$="" THEN GOTO.

Should be ok I'd think.

 

On Atari a nice way to do this is:

REPEAT:UNTIL PEEK(555)

This reads SRTIMR, which is always nonzero when a key is pressed. No need to clear the KB buffer with POKE 754,255 here if you just want to look for any key being pressed.

Link to comment
Share on other sites

Beitrag/Entry #18: can-MaP


Platform: Commodore 64


Author: Fredric QJ "e5frog" Blåholtz


Language: Commodore BASIC V2


Category: EXTREM



Beitrag/Entry #19: Magic Cards


Platform: Atari


Author: Abel "ascrsoft" Carrasco


Language: Turbo BASIC XL


Category: PUR



Beitrag/Entry #20: Apple Max


Platform: Atari


Author: Cliff Hatch


Language: Turbo BASIC XL


Category: PUR


post-4699-0-23658800-1425931791_thumb.png

post-4699-0-63453600-1425931834_thumb.png

post-4699-0-11910900-1425931871_thumb.png

  • Like 2
Link to comment
Share on other sites

 

Category "PUR":

Program a game in 10 lines (max. 120 characters per logical line, abbreviations are allowed)

 

 

With abbreviations you can enter a line of more than 120 characters into the editor. Would this still qualify as PUR since it was entered into the Basic interpreter?

Link to comment
Share on other sites

Here is my entry for this year’s competition, Apple Max, in the Atari Turbo Basic PUR category:

 

appletree

Apple Max.atr

Apple Max Manual.pdf

Apple Max Code Description.pdf

 

In this game you play the part of a genetic engineer, designing the genome for a new variety of Atarian apple tree. The aim is to create a tree that produces the maximum possible number of apples. Details are in the manual.

I made some changes to the scoring system, so this is a slightly different version to the one that appeared in earlier screenshots.

Best Regards

Cliff

Edited by cliffh
  • Like 3
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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