Jump to content
IGNORED

2020 BASIC 10Liner Contest


carlsson

Recommended Posts

Wasn't going to do this but Vitoco forced me - Beat the Snake update.

 

I finaly hard coded the screen memory, this breaks TurboBasic but works fine with Atari Basic on standard 800xl and gave me almost enough space to do what I needed.

 

I got the remaining space from a couple of little tweaks and the realization that a comma doesn't just move the cursor to the next tab position it also fills it with spaces (rarely use commas so this was new to me).

 

1) Changed graphics a bit

2) No new fruit at end of game

3) Graphic glitch fixed (caused when you eat a fruit and there's a body part right where your last tail used to be)

4) Highlight collision

5) Changed player/snake names

 

It's still not much of a game when run at normal Atari Basic speed but I've enjoyed the challenge.

 

0clr:gr.0:c.160:pl.1,0:dr.39,0:dr.39,22:dr.0,22:dr.0,0:n=960:dimx(n,2),h(n):m=40
1d=40000:pok.752,1:f.i=0to9:h(i)=0:n.i:h(4)=1:x(0,0)=d+81:x(0,1)=d+81:o=1:r=-1
2f=x(h(1),1)-d:j=int(f/m):w=f-j*m:h(6)=((f<c)-(f>c))*m:h(9)=-h(6):u=int(c/m):a=1
3e=c-u*m:h(7)=((w<e)-(w>e)):h(8)=-h(7):f.i=6+(j=u)to9:s=h(i):q=stick(0):pos.0,23
4i=i+(peek(f+d+s)<81)*9:n.i:b=96:gos.6:r=r+v:s=((q=13)-(q=14))*m+(q=7)-(q=11)
5b=84:a=0:gos.6:p=p+v:?"You=";p,"Enemy=";r,:f.i=0tol:i=strig(0)<1:n.i:g.(l=0)*2
6h(a+4)=s+(s=0)*h(a+4):e=h(a):f=x(e,a)+h(a+4):h(a)=(e+1)*(e<n):y=peek(f)+o:e=y>0
7x(h(a),a)=f:f.i=0to9:z=(rnd(0)*919+d)*e+9*(e=0):i=9-e:g=peek(z):v=(g=0)*e:k=a+2
8h(k)=h(k)-v+o*v:i=i+v:n.i:e=h(k):c=c*(y=0)+(z-d)*(y>0):t=y>4:v=v-t*5:l=l+t:o=0
9g=x(e,a):pok.g,peek(g)*(v>0):pok.f,b+128*t:pok.z,4*(t=0):h(k)=(e+1)*(e<n):ret.

 

The TurboBasic version is here just for show, memory is not hard coded and therefore isn't within 10x80 lines.

 

 

snake1.atr

  • Like 2
Link to comment
Share on other sites

21 hours ago, Preppie said:

It's needed because at the end of line 5 the goto statement either loops to line 2 (main game loop) if the game is still active, or loops to line 0 if the game is ended and needs restarting - all the variables and arrays then need to be cleared.

 

Instead of GOTO 0, use RUN, and remove the CLR. RUN gives you CLR for free.

 

—Kevin

 

  • Like 1
Link to comment
Share on other sites

I just posted a preview video on Youtube for a PUR-80 entry (in plain old Atari Basic of course, as required).

 

Haven't decided on a name yet.  :)

 

 

It is also fully compatible with Altirra Basic too.   

 

2020_10linerPUR80code.thumb.JPG.fbc39efbe4d41e8a1416502f0b25831f.JPG

0CLR:K=20:DIMZ$(8),B$(29),D(K),T(K),E(K):READE,F,D,R,G,T,C,V,X,Z,B$:?B$(23):G.8
1?O:S=STICK(0):W=W+T(S)*(W<>E(S)):K=K+D(S)*(K+D(S)>1):IFS<15THENPOKEE,0:D.40340
2K=K-2*(K>R-1):E=K+W:M=V*(M=84)+84:POKEE,M:SO.0,12,4,A:D.10,39840,39,9,40720
3F=X+J:C.32:PL.X,0:DR.X,22:C.C:PL.F,G-A+1:DR.F,0:PL.F,G:DR.F,22:X=F:D.25,128,2,8
4IFX=R THENO=O+1:R=R-1:X=2:C=V*(C=25)+25:G=RND(0)*11+8:C.32:PL.Q,U:Z=Z-.1*(Z>3)
5A=A*(A<Z)+1:POS.Q,U:?#6;Z$(A,A):P=PEEK(E)+PEEK(E+1):IFP=0ORP=M THENJ=1:RES.:G.1
6IFP=89ORP=217THENSO.0,8,4,9:O=O-1:J=R-X:T.0:G.2:D.���F`Ÿ�“„ü���|���’—’˜�����end
7C.32:PL.Q,U:Q=X:U=RND(0)*22:R=R+(R<39):PL.R,0:DR.R,22:B=(B=7)*8+7:Z$=B$(B):G.1
8F.H=0TO8STEP4:F.I=5TO12:L=H+I:D(L)=2*(L<8)-(L<12):T(L)=40*((I=5)-(I=6)):W=E-K
9E(L)=D*(T(L)<0)+T*(T(L)>0):N.I:N.H:GR.12:F.I=1TO6:POKED-F+I,ASC(B$(I)):N.I:G.7

 

 

Edited by erichenneke
  • Like 7
Link to comment
Share on other sites

The main site now has 69 entries plus some that may not yet have been posted. I believe the all-time record is 89 entries, so if this contest on average receives more than 1.25 new entries per day from now until the deadline, a new record will be set.

 

Ordered by platform the stats are a bit interesting:

 

MSX 1: 19 entries

C64: 11 entries

ZX Spectrum: 9 entries
C16 & Plus/4: 6 entries
Atari 8-bit: 4 entries
MSX 2, TRS-80 MC-10, Sharp MZ-80A, VTech Laser 210: 3 entries each
Mattel Aquarius, TRS-80 CoCo 2, VIC-20, VTech Laser 310, Apple II, ZX-81, Amstrad CPC, Oric-1: 1 entry each

 

The MSX 1 & 2 community has entries from 10 different people!

  • Like 1
Link to comment
Share on other sites

1 hour ago, Bunsen said:

And I bet Vitoco has something more for us...

Ha, ha, ha... You are right. I have 2 different games with similar look and same engine. Both are currently on beta stage, and docs are missing. I also have another one in development stage that I must resume. But all of them are for the same EXTREM-256 category, so I think I'll drop the last one if I cannot add a feature that it is required for the game to be interesting.

 

About the other categories, I already sent a game for the PUR-80 category. I don't remember of any prototype for PUR-120 category in my personal folder to be resumed and finished, but I'll try to code a new idea I have in less than two weeks.

 

  • Like 2
Link to comment
Share on other sites

35 minutes ago, pixelmischief said:

 

Are you kidding?  I've been playing that game for as long as I can remember.  It never gets old!  MUAHAHAH

I'm writing the follow up now, it's called Beat the Snakes - do you play that game too? ?

Link to comment
Share on other sites

23 hours ago, Bunsen said:

We could add 4 Atari entries if the programs of this thread would be send in.

And I bet Vitoco has something more for us...

I think Atari should be as strong as C64. Hard to beat MSX this time.

I'll submit my PUR-80 soon. I wanted to name it first!  :)   

 

I decided to call it "Palisade".

 

I have two others brewing for PUR-120 and EXTREME-256 but I don't think I'll get enough time to do those justice before the deadline this round.

Link to comment
Share on other sites

On 3/4/2020 at 11:46 PM, erichenneke said:

I just posted a preview video on Youtube for a PUR-80 entry (in plain old Atari Basic of course, as required).

 

 

It is also fully compatible with Altirra Basic too.   

 

 

...officially christened as "Palisade" now.  

 

Edited by erichenneke
  • Like 3
Link to comment
Share on other sites

I still haven't finished my first entry. Or actually I was almost certain it was finished and I thought it was a novel concept, only to find out someone else had done nearly the exact same, but much better and prettier in the mean time I was contemplating my fate. So now it remains if I should post my entry which may look like a poor copy of what already was posted, or rework it into something else.

Link to comment
Share on other sites

Enter it and write another.

During the years we have seen a dozen breakouts, a dozen bombers and other similar games. It's hard to come up with completely new ideas and concepts, but it is also really interesting to see the different approaches of the same concept. I love them all!

  • Like 3
Link to comment
Share on other sites

1 hour ago, Rybags said:

I've got 2 or 3 ideas for games (if I can muster the time).

 

Is there somewhere that has description of previous comps and titles/descriptions of the entries?  As I have the feeling 1 of them might already have been done.

The link in OP has lists of all previous entries, if you go to the downloads you'll have access to the games and acompanying entry text.

 

I also highly recommend checking out Vitocos page http://www.vitoco.cl/atari/10liner/ He's one of the best and most prolific Atari 10 liner.

Link to comment
Share on other sites

6 hours ago, Preppie said:

The link in OP has lists of all previous entries, if you go to the downloads you'll have access to the games and acompanying entry text.

 

I also highly recommend checking out Vitocos page http://www.vitoco.cl/atari/10liner/ He's one of the best and most prolific Atari 10 liner.

Kevin Savetz has has created a lot of great Atari entries; his FloddyBot game is particularly impressive.

 

I'd recommend looking at his GitHub account where he has them linked: https://github.com/savetz.  He's been great about writing up explanations about how the code works, and I learned a lot from them.  It helped quite a bit when I was getting started on my first (modern day) Atari program.

 

That's a good segue for an announcement I'd like to make.  There's a brand new Atari entry in the 10-liner contest! ?  It's a graphical adventure game I've named...

 

WIZARD OF WASD

anim-screencap.gif

 

It's an EXTREM-256 entry in FastBasic.  I've attached the self-running ATR, but full details (including commented source) are up on my personal site here: http://angrydill.com/wasd

 

It should run on an original 800 (or later) with 48K+.  I've tested it under emulation with a variety of hardware profiles.  Unfortunately, I still haven't figured out the best way to connect my 800 and 800XL to my Raspberry Pi to load stuff onto them, so it's not yet tested with physical hardware.  If anyone out there has a SIO2PC or something like that, and would like to let me know if it works on their machine, I'd be most grateful! 

 

I hope you enjoy the game, and maybe find the source code interesting or informative.

 

Thanks,

Randy "AngryDill" Gill

Long-time lurker, first time poster

WIZOWASD.ATR

  • Like 12
Link to comment
Share on other sites

Excellent way to present oneself!

 

ATR (and XEX I extracted from ATR) works perfectly from SIO devices (SIO2PC-Usb) and with AVGCart too (multicarts have limited compatibility with ATR).

IMG_20200308_210852-2.thumb.jpg.eb26f6d584504529245795c52c7daa5f.jpg

 

Do you have space to remove key clicks?

 

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Philsan said:

ATR (and XEX I extracted from ATR) works perfectly from SIO devices (SIO2PC-Usb) and with AVGCart too (multicarts have limited compatibility with ATR).

...

Do you have space to remove key clicks?

 

Awesome... Thanks for trying that out!

 

Frankly, I'd forgotten that you can turn off the annoying key chirp with poke. Thanks for reminding me!  In theory I should have enough characters, I may have to move some things around.  I'll look and see what I can do.

 

Thanks again!

  • Like 1
Link to comment
Share on other sites

Had a little play with Wizard if WASD, it's a very impressive game for 10 lines.

 

When I saw the main game loop I was astounded at how small it was, very nice work.

 

Also picked up a little tip :)  I seem to recall this from the 80s but I'd forgotten about it 'till I looked at your code: IF a-b THEN is the same as IF a<>b THEN

 

  • Like 1
Link to comment
Share on other sites

8 minutes ago, Preppie said:

Just checking here.  Can you enter a FastBasic .COM ?  doesn't it have to be .BAS as you can't enter compiled games.

I always submit the .LST (BASIC source listing) with the loading instructions to comply with the rules, along with the .BAS (tokenized) file as AUTORUN.BAS to autostart in the same .ATR file for Atari BASIC or TurboBasic XL.

 

FastBasic's .XEX (or .COM) files are the runable file equivalent to tokenized files from other BASIC flavors. Of course it contains FastBasic's runtime library and can be stored as AUTORUN.SYS in DOS 2.5 compatible disks to autostart it, but the .LST file and load instructions must also be included in the submission, so it could be manually loaded in FastBasic's IDE (using CTRL-L) and be parsed ("compiled") and run from there (using CTRL-R).

 

  • Thanks 1
Link to comment
Share on other sites

Also there have been a bunch of Atari 2600 entries using Flashback BASIC, supplied as BIN and WAV (for loading on the Supercharger, I think). From what I can tell those are compiled, though as long as they don't implement their own machine code routines they seem to slip through.

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