home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1990 Summer / rerun-1990-summer.d64 / recoil (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  84 lines

  1. 10 rem recoil/(c) 1989
  2. 20 poke53281,.:poke53280,.:print"[147]":gosub750
  3. 25 forx=52224to52224+30:readd:pokex,d:next:clr
  4. 30 dim u,t,m,z,b,co,p,ss,s,c,v,d:u=1:t=2:m=3:z=5:v=53248
  5. 40 dimf,sc,s1,g,x,jy,ss,lv,z1,eg,tt,j,a,ol,tb,l1,ss,j,a$
  6. 50 poke53248+22,200:poke214,7:print:printtab(10)"[154][178][195][201] [178][195][174][213][195][201][213][195][201][176][178][174][178] "
  7. 60 printtab(10)"[154][219][195][177][201][171][179] [194]  [194] [194] [194] [194]":printtab(10)"[159][177]  [177][177][195][189][202][195][203][202][195][203][173][177][189][177][195][189]"
  8. 70 printtab(12)"[153]by jeff panici":j=56320:print:print:print
  9. 90 poke646,int(rnd(1)*16+1):print"[145]"tab(10)"press fire to begin":ifpeek(j)<>111then90
  10. 100 printchr$(147)
  11. 110 rem initilazation
  12. 120 f=4:s=54272:d=3:co=55297:sc=.:ti$="000000":s1=1024:co=co+39:s1=s1+40:g=40
  13. 130 forx=1to40:pokes1,87:pokeco,z+z+f:co=co+u:s1=s1+u:next:forx=1to22:pokes1,87
  14. 140 pokes1+39,87:pokeco,z+z+f:pokeco+39,z+z+f:s1=s1+40:co=co+40:next
  15. 150 forx=1to40:pokes1,87:s1=s1+u:pokeco,z+z+f:co=co+u:next:jy=56320:ss=4
  16. 160 pokev+34,11:pokev+35,1:pokev+22,216:print"[158]recoil [159]- jeff panici      ";
  17. 170 print"   score 00000":lv=1:deffnj(x)=(jand15)
  18. 190 rem randomly plot bricks
  19. 195 z1=.:x=1
  20. 200 z1=int(rnd(1)*936+1064):pokez1,87:x=x+1:on-(x=30)goto210:goto200
  21. 210 rem distribute egg's
  22. 220 sys52224,int(rnd(1)*(15-11)+11):x=1:
  23. 230 z1=int(rnd(1)*936+1064):ce=peek(z1):ifce=42orce=87thengoto230
  24. 240 pokez1,42:on-(x=lv+u)goto250:x=x+1:goto230
  25. 250 co=55297+139:p=1164:pokeco,14:eg=.
  26. 260 pokep,33:pokev+34,11:c=.:gosub680:pokes+6,233:pokes+20,233:ol=.:x=.
  27. 300 rem main loop
  28. 320 j=.:j=peek(jy):a=fnj(.):ifa=15thend=ol:goto390
  29. 330 ifa=11thend=1:ol=d:c=c+u:goto400
  30. 340 ifa=7thend=2:ol=d:c=c+u:goto400
  31. 350 ifa=13thend=3:ol=d:c=c+u:goto400
  32. 360 ifa=14thend=4:ol=d:c=c+u:goto400
  33. 370 ifa=10ora=6ora=5ora=9thend=ol:goto390
  34. 380 goto320
  35. 390 ifc>252thenc=1
  36. 400 ondgoto430,440,450,460
  37. 410 goto300
  38. 420 rem move snake in proper direction
  39. 430 pokep,81:p=p-u:co=co-u:goto470
  40. 440 pokep,81:p=p+u:co=co+u:goto470
  41. 450 pokep,81:p=p+g:co=co+g:goto470
  42. 460 pokep,81:p=p-g:co=co-g:goto470
  43. 470 rem collision detection
  44. 480 ifpeek(p)=87orpeek(p)=81then520
  45. 490 ifpeek(p)=42then590
  46. 491 pokep,33:pokeco,z+z+f
  47. 500 ifc>252thenc=1
  48. 510 pokes+24,15:pokes+u,c:pokes+4,129:pokes+4,128:goto300
  49. 520 rem lose a snake
  50. 530 gosub680:pokes+5,15:pokes+23,239:pokes+24,47:pokes+4,33
  51. 540 forsw=.to180:pokev+34,int(rnd(1)*16+1):pokes+22,sw:pokes+1,8:next
  52. 550 pokes+4,32:ti$="000000":gosub700:poke214,z+m:ss=ss-u:l1=ss:tb=int(40-l1)/2
  53. 560 ifss=.thengosub700:poke214,9:print:printtab(15)"[159]game over":forp=1to2000:next:run
  54. 570 print:printtab(tb);:forx=1toss:print"@ ";:next:print:print""tab(15);
  55. 580 print"press fire":j=56320:waitj,16,16:gosub700:goto190
  56. 590 rem capture egg
  57. 600 pokes+24,15:pokes+15,35:pokes+18,128+1:pokes+18,128
  58. 610 pokeco,14:sc=sc+10:eg=eg+u:gosub730
  59. 620 ifeg=lv+uthenlv=lv+u:goto640
  60. 630 pokes+6,233:pokes+20,233:goto300
  61. 640 gosub700:poke214,z+z-u:print:printtab(11)"[159]prepare for level ";lv
  62. 670 print:print:forp=1to2000:next:gosub700:goto190
  63. 680 rem clear sid chip
  64. 690 q=.:forq=.to23:pokes+q,.:next:pokes+24,15:return
  65. 700 rem clear game board
  66. 710 poke214,u:print:forx=1to22:print"                                      ":next
  67. 720 return
  68. 730 a$=str$(sc):print""tab(35);:printright$("00000"+(right$(a$,len(a$)-1)),5);
  69. 740 return
  70. 750 rem redefined characters
  71. 760 poke56334,.:poke1,51:poke781,9:poke782,.:poke90,.:poke91,216:poke88,.
  72. 770 poke89,64:sys41964:poke1,55:poke56334,1:poke54272,216:poke53272,30:restore
  73. 780 reada:ifa=-1thenreturn
  74. 790 forx=.to7:readd:poke14336+a*8+x,d:next:goto780
  75. 800 data 42,40,170,170,170,170,170,170,40
  76. 810 data 81,60,215,215,215,215,215,215,60
  77. 820 data 87,239,239,170,251,251,170,239,239
  78. 830 data 0,62,127,227,224,126,15,207,60
  79. 840 data 33,60,219,219,215,215,219,219,60
  80. 850 data -1
  81. 851 rem ml data
  82. 852 data32,155,183,138,162,,157,40,216,157,39,217,157,38,218,232,208,244,162,.
  83. 853 data157,37,219,232,224,195,240,2,208,246,96
  84.