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

Post by carlsson »

Macbeth: It is called pedagogisk in Swedish too, so not so much of a foreign word as you might think. Actually, a whole lot of adjectives ending in -ic can be translated straight off with -isk and perhaps different spelling.
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:Macbeth: It is called pedagogisk in Swedish too, so not so much of a foreign word as you might think. Actually, a whole lot of adjectives ending in -ic can be translated straight off with -isk and perhaps different spelling.
Okay, not as impressive as I first thought, but still :)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Ok, first stage done. Now one can move the cannon. I'm not sure if that is an improvement or not. I must consider how to improve the collission detection routine; either through a small ML routine or use custom characters. Yes, I think there is a way to speed up the game by using custom characters.
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 feel like I would rather use any "innovative" ideas I come up with to apply to this program in my own game ideas... If I come up with a really good song, for example, I'd rather save it and put it in my own game, not a remix of Duane's. :cry:
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 just struck me how all those magical trigonometry functions may come handy in the super advanced remix version of Killer Comet.
Anders Carlsson

Image Image Image Image Image
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Duane Later Honorary Remix Compo?

Post by MrSterlingBS »

Hello,

after a lot of years,...
here is my Basic Version of KC. It is faster then the original.

Have fun
Sven

The SpeedTimer can be cleared, of course.

Code: Select all

0 c=7812:dimb(12):l=c:n=36878:o=36877:m=102:p=32:h=160
1 k=8178:q=7746:z1=23:z2=24:z3=25:f=44:f1=45:f2=46:f3=47
2 e=1:e1=2:e2=3:sn=8157:ha=128:el=11:u1=15:a1=81:y=0
3 poke36879,8:printchr$(147)chr$(158):g=1:z=22:i=1:w=2
4 print"*** killer comet  ***":t=0
6 print"    hit any key"
8 poke8179,h
9 poke197,64
10 fora=38444to38905:pokea,i:next
20 fora=1to12:b(a)=m:next
21 ti$="000000":ifw=ythen25
22 poken,u:u=u-w:ifu<=ythenw=y:pokeo,y
25 pokec,p:pokec+e,p:pokec+e1,p:pokec+e2,p:pokec+z,p:pokec+z1,p
27 pokec+z2,p:pokec+z3,p:pokec+f,p:pokec+f1,p:pokec+f2,p:pokec+f3,p
28 c=c+i:pokec,b(e):pokec+e,b(e1):pokec+e1,b(e2):pokec+e2,b(4)
32 pokec+z,b(5):pokec+z1,b(6):pokec+z2,b(7):pokec+z3,b(8)
33 pokec+f,b(9):pokec+f1,b(10):pokec+f2,b(11):pokec+f3,b(12)
36 ifpeek(k)=mthenprint"Sqqqqmoon basedestroyed !":goto500
40 ifpeek(197)<>64thenifag=ytheng=i:s=sn
50 ifg=ythen80
55 pokes,p:s=s-z
60 ifs<qtheng=y:goto21
70 ifpeek(s)=mthenpokes,p:g=y:t=t+i:w=i:pokeo,ha:u=u1:goto80
71 ifpeek(s-i)=mtheng=y:pokes-i,p:t=t+i:w=i:pokeo,ha:u=u1:goto80
75 pokes,a1
80 ift>elthenprint"[cls]qqq***meteor destroyed***":forrr=1to2500:next:l=l+44:c=l:goto4
82 ifpeek(c)=pthenb(e)=p
83 ifpeek(c+e)=pthenb(e1)=p
84 ifpeek(c+e1)=pthenb(e2)=p
85 ifpeek(c+e2)=pthenb(4)=p
86 ifpeek(c+z)=pthenb(5)=p
87 ifpeek(c+z1)=pthenb(6)=p
88 ifpeek(c+z2)=pthenb(7)=p
89 ifpeek(c+z3)=pthenb(8)=p
90 ifpeek(c+f)=pthenb(9)=p
91 ifpeek(c+f1)=pthenb(10)=p
92 ifpeek(c+f2)=pthenb(11)=p
93 ifpeek(c+f3)=pthenb(12)=p
95 printchr$(19)chr$(28):printti:goto21
500 pokeo,133
505 poken,5:forrr=1to300:next
510 fora=15to0step-1:poken,a
520 forrr=1to500:next:next
540 forrr=1to2000:next:run
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Duane Later Honorary Remix Compo?

Post by Mike »

Hi, Sven,

first of all, welcome to Denial! :mrgreen:

The original implementation of KILLER COMET as found in the User's Manual is surely a candidate for optimization. The main criticism however is not the slow speed per se, but rather the way how the meteor is drawn. As I wrote in my VICMON primer, the meteor is first erased and then re-drawn from a list of 'still active' positions. At the speed of BASIC, this method always remains visible, even if you somewhat speed it up by unrolling the two FOR loops concerned.

Machine code would be fast enough to retain the original method, however instead of erase-and-draw I opted to make this a draw-only method, with an empty column added to the left of the meteor which nearly halves the computational effort and shortens the code A LOT. This method effectively eliminates all flicker and would even be feasible to be "back-ported" to BASIC.

Please note: I edited your post in this thread here, and in the other threads you posted today to put the code into code tags. Not only does this retain any eventual indentation in the source, but it also keeps those code sections at a manageable screen estate (~10 text lines). You can put code sections into those code tags by marking them in the editor box, and clicking the "</>" button above the editor box. Additional, you might consider using the forum attachment feature, both for longer source codes and for executable (*.zip-ped) program files or disk images.

Greetings,

Michael
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Duane Later Honorary Remix Compo?

Post by MrSterlingBS »

Hi Michael,

thanks a lot for this explanation. That will help.
I wondered why i can not share my GUMBALL code with Marco in a nother post.

Thanks again for the warm welcome.

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

Re: Duane Later Honorary Remix Compo?

Post by Jeff-20 »

Welcome, Sven!
High Scores, Links, and Jeff's Basic Games page.
User avatar
MrSterlingBS
Vic 20 Enthusiast
Posts: 174
Joined: Tue Jan 31, 2023 2:56 am
Location: Germany,Braunschweig

Re: Duane Later Honorary Remix Compo?

Post by MrSterlingBS »

Thanks a lot Jeff.

And a thousand thanks for this forum. Just great and helpful.
Post Reply