I've found the problem: the variable B can go negative even if you have no bombs (but obviously, it won't activate if zero or below).Kweepa wrote:You really need to tap P lightly so as not to use multiple 'bombs'.
Regards,
Shaun.
Moderator: Moderators
Okay, my 640 bytes reference was a joke, in case anyone didn't get it. The competition is for one or two lines of Commodore BASIC; the number of bytes used is irrelevant.Witzo wrote:Here is my submission for the Oneliner compo. It's for the unexpanded VIC20:
http://raoulm.home.xs4all.nl/products/commodorefree.d64
It's the file MINISCROLL.
Unfortunately, I didn't manage to stay within two lines; it's three lines. There's a two-line version included that shows some different behaviour that I can't explain.
The 3-line version is 173 bytes of basic, so it is within Mr. Bebbington's set limit of 640 bytes.
So I'm not sure whether or not my submission qualifies. I'm submitting it anyway because of the work I put in
Tested on a real VIC.
Code: Select all
C=(K=13ANDPEEK(O+1)=35ANDB>0):B=B+C:POKEO-C,32
Code: Select all
0 X=0:Y=11:PRINT" L"L"B"B:FORI=1TO505:PRINTCHR$(32-3*(RND(1)<.3+L/44));:NEXT:FORA=-1TO0:O=7680+22*Y+X:POKEO,94:K=PEEK(197):X=X+(K=33ANDX>0ANDPEEK(O-1)=32)-(K=26ANDPEEK(O+1)=32):Y=Y+(K=52ANDY>0ANDPEEK(O-22)=32)-(K=44ANDY<22ANDPEEK(O+22)=32):C=(K=13ANDPEEK(O+1)=35ANDB>0):B=B+C:POKEO-C,32:A=X<21:NEXT:L=L+1:B=B+1:GOTO0
Thanks! I have sent it to commodorefree at commodorefree.com since that's what I found on the website.Shaun.Bebbington wrote:Okay, my 640 bytes reference was a joke, in case anyone didn't get it. The competition is for one or two lines of Commodore BASIC; the number of bytes used is irrelevant.Witzo wrote:Here is my submission for the Oneliner compo. It's for the unexpanded VIC20:
http://raoulm.home.xs4all.nl/products/commodorefree.d64
It's the file MINISCROLL.
Unfortunately, I didn't manage to stay within two lines; it's three lines. There's a two-line version included that shows some different behaviour that I can't explain.
The 3-line version is 173 bytes of basic, so it is within Mr. Bebbington's set limit of 640 bytes.
So I'm not sure whether or not my submission qualifies. I'm submitting it anyway because of the work I put in
Tested on a real VIC.
You should really send it to Nigel @ Commodore FREE, but I'll submit it for you.
Regards,
Shaun.
Here is a suggested fix to your code:Witzo wrote:It's the file MINISCROLL.
Unfortunately, I didn't manage to stay within two lines; it's three lines. There's a two-line version included that shows some different behaviour that I can't explain.
The 3-line version is 173 bytes of basic, so it is within Mr. Bebbington's set limit of 640 bytes.
So I'm not sure whether or not my submission qualifies. I'm submitting it anyway because of the work I put in
Code: Select all
0 a$=" commodore free":b=36864:pokeb,2:pokeb+1,
75:pokeb+2,162:pokeb+3,130:print"{CLR}
1 a$=right$(a$,44)+left$(a$,1):print"{HOME}"a$" ":forj=1to100:next:goto1
Heh, I made the same change in my notes for the submission. Since that makes it more than 256 bytes (with some other changes I made), I decided not to change it. (petcat makes it 2 lines regardless, so it's more of an aesthetic decision.)Leeeeee wrote:The bomb logic can be fixed by changing the bomb code to..
Code: Select all
C=(K=13ANDPEEK(O+1)=35ANDB>0):B=B+C:POKEO-C,32
Code: Select all
0 x=0:y=11:print"{clr}l"l"b"b:s=32:fori=1to505:printchr$(s-3*(rnd(1)<.3+l/44));:next:fora=-1to0:o=7680+22*y+x:pokeo,94:k=peek(197):x=x+(k=33andx>0andpeek(o-1)=s)-(k=26andpeek(o+1)=s):y=y+(k=52andy>0andpeek(o-22)=s)-(k=44andy<22andpeek(o+22)=s):d=(k=13andb>0andpeek(o+1)<>s):pokeo-d,s:b=b+d:a=x<21:next:b=b+1:goto
How I do it is I work on the multi line version in Vice and save that. I then hex edit the saved .prg file to remove the line links and replace them with colons. Lastly I fix the one remaining line link by hand and save the edited .prg file.How do you make these into one line prgs? petcat mucks it up.
This is Commodore FREE's competition, so www.commodorefree.com should have contact details there, but I'll submit it for you. I think it's commodorefree@commodorefree.com, but I use Nigel's personal email address, which I don't want to share publicly.Jeff-20 wrote:Here is my entry. I'm not sure where to send it.
http://sleepingelephant.com/denial/diver.prg
It's a one line game. Dive as deep as you can go while avoiding obstacles. You may need to RUN more than once because instant death is very possible. Use < and > to steer.
Now that the competition is over, here is your listing which will change the colours of the text whilst it's scrolling:Witzo wrote:I'll study that!
But I won't have time for it before the deadline, so my submission will have to stand, clumsily, as it was.
Code: Select all
0 b=36864: poke b,2: poke b+1,75: poke b+2,162: poke b+3,130: print"{CLEAR}":a$=" commodore free
1 a$=right$(a$,44)+left$(a$,1): print"{HOME}" a$ " ":for i=0 to 99:next:poke 646, 2+rnd(.)*6: goto 1