Duane Later Honorary Remix Compo?

Basic and Machine Language

Moderator: Moderators

carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Duane Later Honorary Remix Compo?

Post by carlsson »

I just got an idea:

Would anyone be interested in a game remix compo, where we all take one of the listings in the VIC-20 manual (Tank-vs-Ufo, Killer Comet or Rocket Command) and then, within 3.5K memory add as much as we want to the game? Think custom characters, improved gameplay, scenarios, high score lists and so on.

We would have to choose which of these three programs to work from, and that the final listing should be possible to type in as a Basic program. It means custom characters, ML routines etc would have to come as data statements. Maybe we want to limit ourselves to 2K listing to not get too long programs.

We had the 20 line compo/showroom before, but it is about time for something new. Almost everyone of us can dabble in Basic to some degree, and preferrably people would be allowed to team up if desired.
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I love the idea! I'm in.
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

So, which one do you prefer? I was lazy and downloaded as pure versions as possible from Zimmers (there are a few hacks there to ignore). Of those three, it seems Killer Comet is the one with most ... room for improvement. Basically all three are rather similar though.
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I think the User manual version of Killer Comet would be fun. It's probably the most familiar as it was the easiest to type-in. Killer Comet Remix sounds cool too! :lol:
High Scores, Links, and Jeff's Basic Games page.
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

I'm interested too. carlsson, I'm kind of lazy, so could you provide links to the exact versions of the games you're talking about?

If someone wanted to team up, I could possibly provide some ML support routines. Especially if someone had things working in BASIC and just needed a speed boost.

I'd rather not have any limit but the natural 3.5k limit (like, no listing size limit), since data statement really take a lot of space for the code they produce.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Killer Comet from the VIC-20 manual:

Code: Select all

0 REM"{6 DEL}"   KILLER COMET       BY  DUANE LATER 
1 C=7680+22*6:DIMB(12):LL=C:POKE9*16^3+15,8 
2 PRINT"{YEL}{CLR}*** KILLER COMET  ***":T=0 
3 PRINT"    HIT ANY KEY" 
8 POKE8179,160: 
9 FORA=38444TO38400+505:POKEA,1:NEXT 
10 : 
20 FORA=1 TO 12:B(A)=160:NEXT 
21 IFW=0THEN25 
22 POKE9*16^3+14,U:U=U-2:IFU<=0THENW=0:POKE9*16^3+13,0 
25 F=1:REM ERA METEOR 
26 FORE=0TO44STEP22 
27 FORD=C+ETOC+3+E:POKED,32 :F=F+1:NEXT:NEXT 
28 C=C+1 
29 F=1:REM DRAW METEOR 
30 POKE8179,160:FORE=0TO44STEP22 
35 FORD=C+ETOC+3+E:POKED,B(F):F=F+1:NEXT:NEXT 
36 IFPEEK(8178)=160THENPRINT"{CLR}{4 DOWN}MOON BASE DESTROYED !":GOTO500 
40 GETA$:IFA$<>""ANDG=0THENG=1:S=7680+15+22*21 
50 IFG=0THEN80 
55 POKES,32:S=S-22 
60 IFS<7746THENG=0:GOTO21 
70 IFPEEK(S)=160THENPOKES,32:G=0:T=T+1:W=1:POKE9*16^3+13,128+000:U=15:GOTO80 
71 IFPEEK(S-1)=160THENG=0:POKES-1,32:T=T+1:W=1:POKE9*16^3+13,128+000:U=15:GOTO80 
75 POKES,81 
80 F=1:REM CHECK MET 
81 IFT=12THENPRINT"{CLR}{3 DOWN}***METEOR DESTROYED***":FORRR=1TO2500:NEXT:LL=LL+44:C=LL:GOTO2 
82 FORE=0TO44STEP22 
84 FORD=C+ETOC+3+E:IFPEEK(D)=32THENB(F)=32 
86 F=F+1:NEXT:NEXT 
90 GOTO21 
500 POKE9*16^3+13,128+5 
505 POKE9*16^3+14,5:FORRR=1TO300:NEXT 
510 FORA=15TO0STEP-1 
511 POKE9*16^3+14,A 
520 FORRR=1TO500:NEXT 
530 NEXT 
540 FORRR=1TO2000:NEXT:RUN
http://www.cbm.sfks.se/files/killercomet.prg

As you can see, a lot of expressions can be optimized; i.e. all those 9*16^3 can be replaced by 36864 or a variable. Of course there is much more to do than optimize the code as it lies.
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

carlsson wrote:9*16^3 can be replaced by 36864 or a variable.
Yeah! What was Duane doing? It seems like the program is intentionaly obfuscated to discourage young programmers from understanding it! When I was a kid, I felt like he was kind of a wise-ass or even a jerk for doing that.

Look at line 10. Can anyone give me any reason why a programmer would throw in a line like line 10??? Yet, at the same time, there are REM statements delineating sections of the program. Is he being playful or am I just missing something?
High Scores, Links, and Jeff's Basic Games page.
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

Jeff-20 wrote:
carlsson wrote:9*16^3 can be replaced by 36864 or a variable.
Yeah! What was Duane doing? It seems like the program is intentionaly obfuscated to discourage young programmers from understanding it! When I was a kid, I felt like he was kind of a wise-ass or even a jerk for doing that.
I'm pretty sure he was trying to make it seem like less of a magic number he pulled out of the air by showing how he converted a hex address to decimal.

The address is $9000, so that is 9*$1000. $1000 can be expressed as $10^3 (showing that the $10^1 is shifted two places over). So $10^3 becomes 16^3.

Yeah, I don't think he was very successful at making things clearer for the kids out there, but I do think his intentions were good. Or perhaps that's just how he thought things through in his own mind.
Look at line 10. Can anyone give me any reason why a programmer would throw in a line like line 10??? Yet, at the same time, there are REM statements delineating sections of the program. Is he being playful or am I just missing something?
Line 10 is a pretty common way of leaving a blank line in C= BASIC, just for formatting. Though it's placement is a little weird, I guess it's to seperate the title screen code from the rest of the game.
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

MacbthPSW wrote: Line 10 is a pretty common way of leaving a blank line in C= BASIC, just for formatting. Though it's placement is a little weird, I guess it's to seperate the title screen code from the rest of the game.
It seems like a REM statement would suffice.
High Scores, Links, and Jeff's Basic Games page.
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

Jeff-20 wrote:It seems like a REM statement would suffice.
Both REM and : use the same amount of memory in a program, so there's no advantage there to either.

I do find the : slightly more visually appealing (I've used it for years instead of an empty REM line), but I just did some speed tests, and the REM is marginally faster, so I guess that's the better choice.
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

carlsson wrote:I was lazy and downloaded as pure versions as possible from Zimmers (there are a few hacks there to ignore).
I once typed in all three programs, with all excess spaces and colons faithfully included. :) I.e. as original as possible.

Jeff, if you could host them on Denial, I'd send the *.prg files to you in an e-mail.

Michael
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Mike, I thought Carlsson's listing was accurate, but sure, send them.
High Scores, Links, and Jeff's Basic Games page.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

It is also possible that he developed different versions, and finally got one short enough to publish.

I believe 38400+505, 7680+15+22*21, 128+000 and 128+5 also are due to being pedagogic. In a finished game, you would calculate those instead of using fixed formulas. It surprises me a bit that he didn't write 0*16+0+8 for the background/border combo.

How do we go on, posting .prg files of everyone's progress so far, or that you only submit when you have what you consider a final version, modulo bugs you didn't find? I already have a number of ideas and twists to possibly implement.
Anders Carlsson

Image Image Image Image Image
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

carlsson wrote:I believe 38400+505, 7680+15+22*21, 128+000 and 128+5 also are due to being pedagogic.
Figures that someone with english as a second (or third?) language would be able to pull out a word like pedagogic out at exactly the right time. Well done :)
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Code: Select all

POKE 1 - 2 + 3 - 4 + 5 . . . 
:lol:

Killer Comet is a very boring program now that I have reviewed it. This could be a real challenge.
High Scores, Links, and Jeff's Basic Games page.
Post Reply