Jump to content
carlsson

2020 BASIC 10Liner Contest

Recommended Posts

The 2020 edition of this 8-bit cross-platform programming contest has just been announced. There are four main categories:

 

PUR-80 (only using the built-in BASIC version, max 80 characters including abbreviations IIRC)
PUR-120 (using any BASIC version, max 120 characters)
EXTREME-256 (using any BASIC version, max 256 characters)
SCHAU (demos, tools, non-game applications, max 256 characters)

 

There is a mention of WILD too, for entries that don't fit in either of those categories.

 

The deadline for submissions is Saturday, March 21 2020 at 6 PM CET with awards on Saturday, April 4.

 

https://gkanold.wixsite.com/homeputerium/2020

https://twitter.com/Basic10L

 

  • Like 9

Share this post


Link to post
Share on other sites

I started one last night but not had chance to do anymore today yet, hopefully I can get it done by end of weekend.

  • Like 2

Share this post


Link to post
Share on other sites

I took a working prototype I wrote for last year's contest, which was playable but I was not satisfied with it, and I modified it yesterday to reach my expectations.

 

It looks like this:

 

MOMSHIP.PNG.9e5c6701977daed3352b54cd5d5143f7.PNG

 

It is called "Journey to the Golden Mothership" (or MOMSHIP for short) and I sent it to Gunnar a moment ago for the PUR-80 category.

 

  • Like 8

Share this post


Link to post
Share on other sites

I tried doing minesweeper for PUR-120 but ended up with 12 lines :(

 

I could jazz it up a bit for PUR-256 but I think I'll see if I can rewrite some of it and get it down to a PUR-120, it's more of a challenge :) plus I want to do something a bit more special for PUR-256.

  • Like 1

Share this post


Link to post
Share on other sites

OK, got my minesweeper working for PUR-120 :)  It's not exactly polished, but like I said, I want to do something better for PUR-256

 

I've posted an xex file of the compiled version (I code with the fastbasic cross compiler).  I'll have to move it over to the IDE to enter the contest, but I'll do that later (might tweek it a bit or find a bug).

 

Joystick to control and delete square, press any key to plant a flag.

 

 

10liner.xex

Edited by Preppie
  • Like 9

Share this post


Link to post
Share on other sites

Thought I'd do a quick PUR-80 and ended up spending way more time on it than expected.

 

Started with a basic snake game (converted my fastbasic 1 line snake into Atari Basic) but had some lines left so decided to try adding something extra (I should have just stopped, this has been hell lol - coding without while loops and endifs is difficult)

 

So it's snake, but you have a computer opponent - I call it Beat the Snake ;)

 

I've added a TurboBasic file (runs faster of course) but here's the listing if you want to paste it into normal Atari Basic (which is what the final version will be)

 

0n=960:m=40:d=peek(88)+peek(89)*256:gr.0:f.i=0to39:pokei+d,3:pokei+d+920,3:c=55
1k=i*m*(i<23)+d+m:pokek,3:pokek-1,3:n.i:dimx(n,2),h(9),r(9),t(9):h(0)=0:h(1)=0
2r(0)=1:t(0)=0:t(1)=0:x(0,0)=d+99:x(0,1)=d+233:poked+c,1:f.a=0to2:s=stick(0):a=0
3s=((s=13)-(s=14))*m+(s=7)-(s=11):gos.6:a=1:j=1:q=x(h(a),a):b=q-d:w=b-int(b/m)*m
4o=c-int(c/m)*m:h(2)=((b<c)-(b>c))*m:h(3)=((w<o)-(w>o)):h(4)=-h(3):h(5)=-h(2)
5f.i=2+(int(b/m)=int(c/m))to5:s=h(i):i=i+(peek(q+h(i))<2)*9:n.i:gos.6:n.a
6r(a)=s+(s=0)*r(a):f=x(h(a),a)+r(a):h(a)=h(a)+1-(h(a)=n)*n:x(h(a),a)=f:y=peek(f)
7pokef,(j=0)*2+(j=1)*130:g=y:e=(g<>0):b=c:f.i=0to9:i=9-e:z=(rnd(0)*n+d)*e
8z=z+9*(e=0):g=peek(z):v=(g=0)*e:pokez,g+v:t(a)=t(a)-v:i=i+(g=0):n.i
9c=b*(y=0)+(z-d)*(y<>0):pokex(t(a),a),0:t(a)=t(a)+1-(t(a)=n)*n:ify<2thenj=0:ret.
10gr.0:run

I've added a line 11 because it's a pain to restart the game without it. 

 

I really want to add a scoring system and to get that 11th line into the 10 lines but it's going to be a struggle. 

snake1.atr

  • Like 5

Share this post


Link to post
Share on other sites
3 hours ago, Preppie said:

Thought I'd do a quick PUR-80 and ended up spending way more time on it than expected.

 

Started with a basic snake game (converted my fastbasic 1 line snake into Atari Basic) but had some lines left so decided to try adding something extra (I should have just stopped, this has been hell lol - coding without while loops and endifs is difficult)

 

So it's snake, but you have a computer opponent - I call it Beat the Snake ;)

 

I've added a TurboBasic file (runs faster of course) but here's the listing if you want to paste it into normal Atari Basic (which is what the final version will be)

 

0n=960:m=40:d=peek(88)+peek(89)*256:gr.0:f.i=0to39:pokei+d,3:pokei+d+920,3:c=55
1k=i*m*(i<23)+d+m:pokek,3:pokek-1,3:n.i:dimx(n,2),h(9),r(9),t(9):h(0)=0:h(1)=0
2r(0)=1:t(0)=0:t(1)=0:x(0,0)=d+99:x(0,1)=d+233:poked+c,1:f.a=0to2:s=stick(0):a=0
3s=((s=13)-(s=14))*m+(s=7)-(s=11):gos.6:a=1:j=1:q=x(h(a),a):b=q-d:w=b-int(b/m)*m
4o=c-int(c/m)*m:h(2)=((b<c)-(b>c))*m:h(3)=((w<o)-(w>o)):h(4)=-h(3):h(5)=-h(2)
5f.i=2+(int(b/m)=int(c/m))to5:s=h(i):i=i+(peek(q+h(i))<2)*9:n.i:gos.6:n.a
6r(a)=s+(s=0)*r(a):f=x(h(a),a)+r(a):h(a)=h(a)+1-(h(a)=n)*n:x(h(a),a)=f:y=peek(f)
7pokef,(j=0)*2+(j=1)*130:g=y:e=(g<>0):b=c:f.i=0to9:i=9-e:z=(rnd(0)*n+d)*e
8z=z+9*(e=0):g=peek(z):v=(g=0)*e:pokez,g+v:t(a)=t(a)-v:i=i+(g=0):n.i
9c=b*(y=0)+(z-d)*(y<>0):pokex(t(a),a),0:t(a)=t(a)+1-(t(a)=n)*n:ify<2thenj=0:ret.
10gr.0:run

I've added a line 11 because it's a pain to restart the game without it. 

 

I really want to add a scoring system and to get that 11th line into the 10 lines but it's going to be a struggle. 

 

It's an interesting concept. Very nice!

 

Hints: In line 0, move the GR.0 in front of D variable to get the right value of PEEKs... but you can change that PEEKs to a constant if it will be plain Atari BASIC in normal conditions, and you will save bytes to, for instance, set screen color. You can save more bytes if you change the FOR loops to draw the border into a COLOR, PLOT and DRAWTO sequence. In a simple test I did, I saved more than 40 bytes in combined lines 0 and 1. Said that, I'm sure that the following lines up to 5 could be "tetris-up" into the extra space of line 1 to leave a small space after the GOSUB to include an IF or ON-GOTO which will replace the IF at the end of line 9 to restart the game (with RUN or including a CLR at the start of line 0), and keep there the assignment of J variable and the RETURN. That shoud allow you to remove line 10.

 

  • Like 3

Share this post


Link to post
Share on other sites

gr.0 = simple error

 

Using constant for screen location instead of PEEKs = this just doesn't feel right :) 

 

Using PLOT/DRAWTO - totaly forgot you could plot on character modes, very long time since I used Atari Basic.

 

ON-GOTO = forgot this too.

 

Many thanks, this should be enough to sort things out :) 

 

Not sure if I can do anything about the speed though, replacing IF-THEN-ELSE with calculations can slow things down when they get too complicated.

Edited by Preppie

Share this post


Link to post
Share on other sites

Here it is, the final version (I hope) of Beat the Snake.

 

I've been up since 4am taking care of my wife, so been on and off this damn thing all day.

 

It comes in at exactly 10 lines and 80 characters per line, perfect Tetris (ok, I added a superfluous +0 to hold back the OCD)

 

New features:

1) On screen scoring, this is unheard of and a great leap forward in video game technology.  Your score is denoted by Y= and the snake opponent is S=, 1point per fruit and -4 for the game ending collision.

2) Game restart.  WOW! all you need to do is press the trigger at the end of the game and the game restarts.

 

The game will be submited for Atari Basic (PUR-80) and is painfully slow lol but I've added the TurboBasic version to this post, or paste the code to Atari basic and crank up the speed on your emulator if you get bored.

So here it is, the perfect 10x80 code:

 

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

 

Changes:

1) Thanks to Vitoco I've used the PLOT/DRAWTO and saved a bunch of bytes.  Had some unusual results with this, drawing a border and the corners weren't filled in.  Managed to sort it out after some fiddling, but don't know why it happens or exactly how I fixed it.

 

2) Put all the pointers and snake directions into a single array instead of 3.  Saved some space on the DIM command and also on the reseting of the array for new game.  Although the CLR command zeros variables and removes arrays, it doesn't zero the old array memory so when u set up another array those old values are there unless u reset manually.

 

3) Due to perfect Tetrising (some may call it pure luck) I was able to replace a never ending FOR loop with a shorter GOTO.  In fact, I used that GOTO to jump to main loop or start depending on game over status.

 

4) A bit of general code optimization, and the discovery that you can do a=b>0 instead of a=(b>0) but only when it's a single logical query eg. you can't do a=b>0+c>0

 

5) Used all that space saved from the above to add cool extra features.

 

 

Problems:

1) I couldn't fit POKE 752,1 anywhere so the scoring shows flickering from the cursor :(

2) Small bug, if dieing results in a 2 digit score becoming 1 digit after penalty then an unwanted digit can remain on the snakes score.  Thanks to problem(1) my shame is highlighted by that damn cursor.

 


That's it, all there is to do now is sit back and dream about what to do with that $1million first prize.

 

 

snake1.atr

  • Like 5

Share this post


Link to post
Share on other sites

Final version of minesweeper (PUR-120).  Added select number of mines at start of game, and cursor changes color when it's busy.

 

Added the compiled FastBasic file, here's the code:

 

o=960:b=128:pmg.1:n=pmadr(0):y=b:ms.n+y,8,15:da.f()w.=-41,-40,-39,-1,1,39,40,41,0:w=dpeek(88):di.a(o)b.,c(o),d(o)b.:m=50
do:p.752,1:q=adr(d):ms.q,o,b:ms.w,o,0:w.strig(0):s=stick(0):m=m+(s=14)*(m<99)-(s=13)*(m>10):pos.0,0:?"mine#";m;:pa.9:we.
f.i=81to920s.40:ms.w+i,38,b:ms.q+i,38,0:n.:m.q,adr(a),o:i=0:r.:h=rand(38)+rand(21)*40+81:i.a(h)=0:a(h)=9:inci:end.:u.i=m
l=m:q=w+81:v=0:f.i=81too:pos.0,0:?o-i;" ";:i.a(i)=0:f.h=0to7:a(i)=a(i)+(a(i-f(h))=9):n.:end.:n.:g=798:x=72:r=0:z=time:r.
p.704,55:pos.0,0:p=peek(q):s=stick(0):t=strig(0):k=key():i.k>0:getk:i.p=159:p.q,b:incm:eli.p=b andm:p.q,159:decm:end.
eli.t:x=x+(s&8=0)*4*(x<196)-(s&4=0)*4*(x>48):ms.n+y,8,0:y=y+(s&2=0)*8*(y<204)-(s&1=0)*8*(y>48):q=w+(y-32)/8*40+(x-44)/4
eli.p<>159:r=a(q-w):i.r=0:p.704,1:j=1:c(1)=q-w:w.j:u=c(j):i.u:f.i=0to8:h=u-f(i):e=peek(h+w):k=a(h):i.k=0andd(h)=0:c(j)=h
d(h)=1:incj:eli.d(h)<2:g=g-(e>127):m=m+(e=159):d(h)=2:p.h+w,(k+(k<>0)*16)*(k<>b):end.:n.:end.:decj:we.:eli.r<>9andp>=b
p.q,r+16:decg:end.:end.:i=time:i.i<z:z=i:end.:i.i-z>50:z=i:incv:end.:ms.n+y,8,15:pmhpos0,x:pa.3:?"T=";v;" Mines=";m;" "
u.v>9998orr=9org=l:f.i=41too:i.a(i)=9:p.w+i,10:end.:n.:i.g=l:?"won!score=";v:e.:?"lost";:end.:w.strig(0):we.:cls:pa.9:l.

 

After my experiance with snake I might be able to improve this, but I've decided to just stop - I'm happy with it.

 

Just have to decide what to do for the PUR-256 entry now :)

 

 

 

10linerT3.xex

  • Like 4

Share this post


Link to post
Share on other sites

Need a little help with creating a file for the Atari Basic program to enter the competition (FastBasic is easy enough as it comes on an auto loading disk image with DOS)

 

What's the best way to do this?  I've created a dos2.5 disk with the program on but you also have to install a basic cartridge.  Is there any way to create a self contained image with basic and the program?

 

 

Share this post


Link to post
Share on other sites

Load DOS, go to Atari Basic (B option if I remember - Run Cartridge), write program and save it: SAVE"D:AUTORUN.BAS". Now program runs automatically with running Atari with Basic.

Share this post


Link to post
Share on other sites
22 minutes ago, Sikor said:

Load DOS, go to Atari Basic (B option if I remember - Run Cartridge), write program and save it: SAVE"D:AUTORUN.BAS". Now program runs automatically with running Atari with Basic.

This creates an auto run disk but you need to attach a Basic cartridge first.  I was hoping there was a way of attaching the cartridge too, so when you double click the file Altirra opens it with Basic already attached and runs the program.

 

If this is how people send in their entries then fine, I just didn't want to cause extra hassle for the judges.

 

Share this post


Link to post
Share on other sites
47 minutes ago, Preppie said:

This creates an auto run disk but you need to attach a Basic cartridge first.  I was hoping there was a way of attaching the cartridge too, so when you double click the file Altirra opens it with Basic already attached and runs the program.

 

If this is how people send in their entries then fine, I just didn't want to cause extra hassle for the judges.

 

There are some tools in the wild that create an XEX file from an Atari BASIC tokenized file, which will enable BASIC ROM at start. I also wrote my own tool for the same need.

 

For the contest, you must provide the source listing and the judges will have some fun typing that code to check for the rules and then running it! 😉

 

Nah... You must provide the source listing and the instructions to be ENTERed, but you may also include the tokenized file to be LOADed or RUN. It is not enougth to name it as AUTORUN.BAS for Atari BASIC games, unless you also include an AUTORUN.SYS file as a hack to RUN the BASIC program just after DOS load, at least for DOS 2.5 and compatibles.

 

  • Like 1

Share this post


Link to post
Share on other sites

You're probably bored of me by now but I just updated Beat the Snake again lol

 

Last update was done when I was spaced out through lack of sleep, I took a quick look today with a rested brain and instantly spotted some improvements.  Just general squashing by using single digit variables for multiple uses of arrays or formula, but it got me enough space to solve those 2 problems I had (even if I am doing POKE 752,1 repeatedly in the main loop instead of the initialization phase)

 

Also changed the starting fruit logic, which was always in same spot due to no space for a RND.  I now fool the new fruit routine into thinking the snake at the beginning of the game eats an invisible fruit.   I didn't get the extra space I hoped for but at least now the starting fruit is random.

 

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):r=-1
1d=peek(88)+peek(89)*256:f.i=0to9:h(i)=0:n.i:h(4)=1:x(0,0)=d+94:x(0,1)=d+93:m=40
2q=x(h(1),1):b=q-d:j=int(b/m):u=int(c/m):w=b-j*m:h(6)=((b<c)-(b>c))*m:h(9)=-h(6)
3e=c-u*m:h(7)=((w<e)-(w>e)):h(8)=-h(7):f.i=6+(j=u)to9:s=h(i):i=i+(peek(q+s)<2)*9
4n.i:a=1:gos.6:r=r+v:a=stick(0):s=((a=13)-(a=14))*m+(a=7)-(a=11):a=0:gos.6:p=p+v
5pok.752,1:pos.16,23:?"y=";p;" s=";r;" ";:f.i=0tol:i=strig(0)<1:n.i:g.0+(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):q=c<1:y=peek(f)+q
7pok.f,(a=0)*3+(a=1)*131:e=y>0:x(h(a),a)=f:f.i=0to9:z=(rnd(0)*(n-m)+d)*e+9*(e=0)
8t=(y>1):i=9-e:g=peek(z):v=(g=0)*e:k=a+2:h(k)=h(k)-v+q*v:i=i+v:n.i:t=y>1:v=v-t*5
9l=l+t:e=h(k):c=c*(y=0)+(z-d)*(y>0):pok.x(e,a),0:pok.z,1:h(k)=(e+1)*(e<n):ret.

 

I finaly think I'm done with this :)

 

 

snake1.atr

  • Like 4

Share this post


Link to post
Share on other sites
44 minutes ago, Preppie said:

You're probably bored of me by now but I just updated Beat the Snake again lol

Nah! This contest is for fun, and I have fun coding these little games.

 

Just a suggestion: in the scores table, replace the "y" (for "you" I guess) with a "p" (for "player"). Humm... this is a bit confusing because "s" is for "snake", but it might also be for "spieler" :lol: 

 

For the "fruit", instead of a "!", I would use an "o" or a clover (ATASCII 16, internal code 80), but I guess that this could break your conditional expressions and use more space.

 

44 minutes ago, Preppie said:

Last update was done when I was spaced out through lack of sleep, I took a quick look today with a rested brain and instantly spotted some improvements.  Just general squashing by using single digit variables for multiple uses of arrays or formula, but it got me enough space to solve those 2 problems I had (even if I am doing POKE 752,1 repeatedly in the main loop instead of the initialization phase)

 

Every new day I read my code with a fresh mind, I find improvements. My current entry didn't have sound last year so I didn't submit it then, but this year I did some optimizations and voila!

 

To make some space for the "POKE 752,1" in the init instad of the game loop, just set D variable as a constant instead of PEEKs as I said in another post. Then, use that space in the loop for a "POKE 77,0" to avoid attract mode during the game.

 

Anyway, using setup code inside loops is common in my games after "tetrising" their code. Even on my current entry I have three ON-GOTOs in the last line, jumping to many lines including itself! Anti-structured programming!!!

 

44 minutes ago, Preppie said:

Also changed the starting fruit logic, which was always in same spot due to no space for a RND.  I now fool the new fruit routine into thinking the snake at the beginning of the game eats an invisible fruit.   I didn't get the extra space I hoped for but at least now the starting fruit is random.

Also a typical way to save space. My last year's game Mini Bros initializes both players making them to start immediately losing one life.

 

44 minutes ago, Preppie said:

 

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):r=-1
1d=peek(88)+peek(89)*256:f.i=0to9:h(i)=0:n.i:h(4)=1:x(0,0)=d+94:x(0,1)=d+93:m=40
2q=x(h(1),1):b=q-d:j=int(b/m):u=int(c/m):w=b-j*m:h(6)=((b<c)-(b>c))*m:h(9)=-h(6)
3e=c-u*m:h(7)=((w<e)-(w>e)):h(8)=-h(7):f.i=6+(j=u)to9:s=h(i):i=i+(peek(q+s)<2)*9
4n.i:a=1:gos.6:r=r+v:a=stick(0):s=((a=13)-(a=14))*m+(a=7)-(a=11):a=0:gos.6:p=p+v
5pok.752,1:pos.16,23:?"y=";p;" s=";r;" ";:f.i=0tol:i=strig(0)<1:n.i:g.0+(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):q=c<1:y=peek(f)+q
7pok.f,(a=0)*3+(a=1)*131:e=y>0:x(h(a),a)=f:f.i=0to9:z=(rnd(0)*(n-m)+d)*e+9*(e=0)
8t=(y>1):i=9-e:g=peek(z):v=(g=0)*e:k=a+2:h(k)=h(k)-v+q*v:i=i+v:n.i:t=y>1:v=v-t*5
9l=l+t:e=h(k):c=c*(y=0)+(z-d)*(y>0):pok.x(e,a),0:pok.z,1:h(k)=(e+1)*(e<n):ret.

 

I finaly think I'm done with this :)

Nope! I found a bug... 😞 

 

snake-bug.png.c34041982ca12e176f42af3f09e1cb44.png

 

Obviously the snake was beating me, but it crashed and died!!! 5 point were substracted from its score, and an extra fruit appeared. I could restart the game with the trigger.

 

During the same play, I could see another glitch when I was in its way and forced it to change its direction, but I wasn't fast enough to pause the game and get a screenshot.

 

  • Like 1

Share this post


Link to post
Share on other sites

The extra fruit appears when u die, it's not a bug it's intended ;)  The fruit appears no matter what you eat, it's just the way I did it to squash it down to 10 lines.  The snake dieing when there's an obvious escape route is just a limitation of the 'AI' with so few lines.

 

The other bug I think you mean is when the snakes get close and turns sometimes the tail deletion removes a chunk of the other snakes body.  It has no actual effect, just a graphic glitch.  I'll have a look at that i think.

 

I still don't like the idea of hard coding the screen memory but maybe I should just get over my myself and do it.

 

! is the international symbol for fruit, didn't you know this?  Actualy, i just threw anything in at the start with the intention to find something better later, hope I can do it without too much trouble.

 

 

Share this post


Link to post
Share on other sites

Hmm, turbo basic attached, so line 1 you can use dpeek(88) instead peek(88)+256*peek(89)  - few more space in code ;)

Edited by Sikor

Share this post


Link to post
Share on other sites
8 minutes ago, Sikor said:

Hmm, turbo basic attached, so line 1 you can use dpeek(88) instead peek(88)+256*peek(89)  - few more space in code ;)

It's written for Atari Basic, I just attached the TurboBasic version because it's simpler to do with me using TURBAN to develop.

Share this post


Link to post
Share on other sites
17 minutes ago, Sikor said:

oh, ok. I think you can delete CLR - but i no try it.

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.

g.0+(l=0)*2

That lower L looks way too much like a 1 :)

 

Share this post


Link to post
Share on other sites
24 minutes ago, Preppie said:

 

g.0+(l=0)*2

That lower L looks way too much like a 1 :)

 

You can save 2 bytes there, because "0+" is not needed.

g.2*(l=0)

:-D 

 

59 minutes ago, Preppie said:

It's written for Atari Basic, I just attached the TurboBasic version because it's simpler to do with me using TURBAN to develop.

Remember to submit the Atari BASIC version. In the startup instructions, you must say that the Atari needs be turned on with BASIC enabled (without Option key).

If you need to set up an autostart ATR, you can take my special AUTORUN.SYS from any of my last year's PUR-80 entries. It will RUN "D:AUTORUN.BAS" automatically for Atari BASIC, but it does not enable the internal BASIC on the XL/XE.

 

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