diff --git a/.gitignore b/.gitignore index e16bb57..265a2da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -# Mac files -.DS_Store -build/.DS_Store -# Others -# testmenu.txt -# build/testmenu.prg -# build/testmenu.prg.out.prg -build/cc64.sav -build/cookie.d64 +# Created with CBM prg Studio +bak +*.dbg +*.dmp +*.dup diff --git a/Banner.png b/Banner.png deleted file mode 100755 index dc82552..0000000 Binary files a/Banner.png and /dev/null differ diff --git a/CC64.d64 b/CC64.d64 new file mode 100644 index 0000000..c6b16f2 --- /dev/null +++ b/CC64.d64 @@ -0,0 +1,29 @@ +KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK +";4 +x" ";e +" "; +"ó "; +" "; +" ";) ";<@" V2.9.0-1.0 ";mJ"ñ";T" F1 STORE F3 OPTIONS F5 STATS F7 ASCEND";""(CC)" COOKIES"""BN$" BAKERY" RANGE,42000 : BIGGER THAN 5. (SMALLER IS FINE)7 51000f Y1:XIJ : THIS SECTION PRINTS THE XI"" : ITEM DATA IN THE GIVEN RANGE. R1$""((Y),1)" "NA$(X) R1$R2$""IA(X) R1$BD$(X) R1$""(PR(X)):  (K$)53070 : MAIN LOOP" (K$)13070 :. X(K$)9 3500E 50000Y K$"+"SSSS1m K$"-"SSSS1| SS0SS1 SS5SS4& SSTS0 MSTM: 3000 YIX1:YMB : BUYING SUBROUTINE CCPR(Y)""R1$R2$""IA(Y)' X1""R1$""(PR(Y))I X2""R1$""(PR(Y))oX3""R1$""(PR(Y))X4""R1$""(PR(Y))X5""R1$""(PR(Y))X0:'O: IMPORTA`B0:A0MB:BB(CG(A)3.6):: ADDING SUBROUTINE/jK$" "CCCC1PtCBCC" "p~CCCCB:""(CC):CBCC:KKKK " ";\ "  "; "  "; "  "; "   ";? "  ";r "  "; ""  "; ,"  "; 6"  MS 2000 1000FMS1 : STORE PAGE SELECTION AND MENU SWITCHING AREA.SS0I0:J4:SS1I5:J9:SS2I10:J14:SS3I15:J17 TSSS:TMMS : 2010 SETS THE RANGE OF ITEM DATA*2500 : TO BE USED. DO NOT HAVE A  R1$"":YY1 G J17R1$" PREV/NEXT(-/+)"i +R1$" PREV/NEXT(-/+)"t + 3000z + + K$:X0 : DON'T ADD A 'IFK$=""' OR ELSE THE ADDING ROUTINE WON'T RUN PROPERLY 60000 3610 IA(Y)3003610: TEMP ITEM CAPU CCCCPR(Y):CG(Y)CG(Y)BG(Y):PR(Y)PR(Y)1.15:IA(Y)IA(Y)1q X1""R1$R2$""IA(Y) X2""R1$R2$""IA(Y) X3""R1$R2$""IA(Y) X4""R1$R2$""IA(Y)  X5NT SUBROUTINESPËK$""50040:+ZËK$""50040: MENU SELECTING?dËK$""50040:EnÎpxMS1(K$"")2(K$"")3(K$""):8ǁX120: CLEARS THE MENUBNjX1""R1$" ";LǙR1$" ";:`KKKK ";4 "  ";g "  "; "  "; "  "; "   + !TO "BUILD/COOKIE.PRG"Z +MB17:NA$(MB):IA(MB):BD$(MB):BG(MB):PR(MB):CG(MB)u 8,8,8,"STOREDAT,S,R"X0MB(8,NA$(X)28,BD$(X)78,BG(X)<8,PR(X)AX1"/"MB1:PR(X)CG(X)FP 8: GOSUB 52000 ZMS1:BN$"  ";W "  "; "  "; "  "; "   ;.T" F1 STORE F3 OPTIONS F5 STATS F7 ASCEND";>""(CC)Q" COOKIES"_""BN$u" BAKERY" MS 2000 1000MS1 : STORE PAGE SELECTION AND MENU SWITCHING AREA.SS0I0:J4:SS1I5:J9:SS XI"" : ITEM DATA IN THE GIVEN RANGE.= R1$""((Y),1)" "NA$(X)Q R1$R2$""IA(X)` R1$BD$(X)t R1$""(PR(X)) R1$"":YY1  J17R1$" PREV/NEXT(-/+)" +R1$" PREV/NEXT(-/"SSSS1 SS0SS1 SS5SS4!& SSTS/0 MSTM:: 3000c YIX1:YMB : BUYING SUBROUTINEw CCPR(Y)3610 IA(Y)3003610: TEMP ITEM CAP CCCCPR(Y):CG(Y)CG(Y)BG(Y):PR(Y)PR(Y)1.15:IA(Y)IA(Y)1 X1""(PR(Y))!X4""R1$""(PR(Y))OX5""R1$""(PR(Y))YX0:_'|O: IMPORTANT SUBROUTINESPËK$""50040:ZËK$""50040: MENU SELECTINGdËK$""50040:nÎxMS1(K$"")2(K$:""(CC):CBCC:CC:A)3.6):: ADDING SUBROUTINE4jK$" "CCCC1UtCBCC" "u~CCCCB:""(CC):CBCC:DDS 260000 CPS 260000 5100000000 ALCHEMY LAB ADDS 1600000 CPS 1600000 75000000000 PORTAL ADDS 10 MILLION CPS 10000000 1000000000000 TIME MACHINE ADDS 65 MILLION CPS 65000000 14000000000000 ANTIM. CONDENSER ADDS 430 MILLION CPS 430000000 170000000000000 P5LEVERSE ADDS 8.3 TRILLION CPS 8300000000000 1.2E+22 000000000000 +IDLEVERSE +ADDS 8.3 TRILLION CPS +8300000000000 +1.2E+22 +X)(Y$): I SHOULD FIND OUR WHY AS SOON AS POSSIBLE.C AX1"/"MB1I F_ P 8: GOSUB 52000 ZMS1:BN$"SOMEONE'S":R1$"" _R2$"":SS1 dCC9999: STICK NEWS HERE. +n"òSOMEONE'S":R1$""A _R2$"":SS1X d STICK NEWS HERE. n"ò"; x" "; " "; +" ";N "  "; "  "; "  "; "  ";" "  ";- ""  ";` ,"  "; 6" "; @" V2.9.0-1.0 "; J"ñ"2I10:J14:SS3I15:J17H TSSS:TMMS : 2010 SETS THE RANGE OF ITEM DATA}*2500 : TO BE USED. DO NOT HAVE A RANGE42000 : BIGGER THAN 5. (SMALLER IS FINE) 51000 Y1:XIJ : THIS SECTION PRINTS THE+)" + 3000 + +_ K$:X0 : DON'T ADD A 'IFK$=""' OR ELSE THE ADDING ROUTINE WON'T RUN PROPERLYv 60000 : (K$)53070 : MAIN LOOP (K$)13070 : X(K$) 3500 50000 K$"+"SSSS1 K$"-"R1$R2$""IA(Y) X2""R1$R2$""IA(Y)= X3""R1$R2$""IA(Y)e X4""R1$R2$""IA(Y) X5""R1$R2$""IA(Y) X1""R1$""(PR(Y)) X2""R1$""(PR(Y))X3""R1$""")3(K$""):8ǁX120: CLEARS THE MENUBBNjX1""R1$" ";gLǙR1$" ";:m`ǎ`B0:A0MB:BB(CG(A)3.6):: ADDING SUBROUTINEjK$" "CCCC1tCBCC" "~CCCCBSPACEBAR ADDS .1 CPS .1 15 GRANDMA ADDS 1 CPS 1 100 FARM ADDS 8 CPS 8 1100 MINE ADDS 47 CPS 47 12000 FACTORY ADDS 260 CPS 260 130000 BANK ADDS 1400 CPS 1400 1400000 TEMPLE ADDS 7800 CPS 7800 20000000 WIZARD TOWER ADDS 44000 CPS 44000 330000000 SHIPMENT ARISM ADDS 2.9 BILLION CPS 2900000000 2100000000000000 CHANCEMAKER ADDS 21 BILLION CPS 21000000000 26000000000000000 FRACTAL ENGINE ADDS 150 BILLION CPS 150000000000 310000000000000000 ML MONITOR ADDS 1.1 TRILLION CPS 1100000000000 71000000000000000000 ID  !TO "BUILD/COOKIE.PRG"Z +MB17:NA$(MB):IA(MB):BD$(MB):BG(MB):PR(MB):CG(MB)u 8,8,8,"STOREDAT,S,R"X0MB(8,NA$(X)28,BD$(X)78,Y$:PR(X)(Y$): I HAVE NO CLUE WHY I SUDDENLY NEED THIS, BUT I DO.<8,Y$3 >PR( ó ";O +" "; +" "; +" "; +"  "; "  A2ACOOKIE CLICKERSTOREDATSTOREDATKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK \ No newline at end of file diff --git a/Cookie Clicker.cbmprj b/Cookie Clicker.cbmprj new file mode 100644 index 0000000..6d4cc32 --- /dev/null +++ b/Cookie Clicker.cbmprj @@ -0,0 +1,78 @@ + + + + + + 2 + Cookie Clicker.prg + 2049 + False + False + False + False + True + + Cookie Clicker for the C64. + Ian M. Skinner + + Cookie Clicker.prg + False + CBM prg Studio 3.14.0 + True + + + False + C64 CARTRIDGE + + 40 + 1 + 0 + 0 + False + False + CHIP + 0 + + + False + False + False + + + + + prg.txt + storedat.seq + Tune.bas + + 0 + 0 + + + + + + + prg.txt + + 1 + True + + + + False + True + + + Tune.bas + + 1 + False + + + + True + True + + + \ No newline at end of file diff --git a/Cookie Clicker.prg b/Cookie Clicker.prg new file mode 100644 index 0000000..b67732a Binary files /dev/null and b/Cookie Clicker.prg differ diff --git a/README.md b/README.md deleted file mode 100644 index 1e4b6bf..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Cookie-Clicker-C64 - -

- - - -

- - - Chat on Discord - - - - - - - -

- -Cookie Clicker C64 (or CC64 for short) is a Cookie clicker clone for the Commodore 64. - -## How to play : - -- Press the space bar to 'click' for cookies. - -Credits: -- [@Orteil](https://orteil.dashnet.org/) for making the original cookie clicker game -- [@drskinner](https://github.com/drskinner/) - -Notes: -- Editing program lines larger than 80 characters on the C64 (or on an emulator) will result in parts of them being deleted -- `storedat` must be placed in the same d64 as `cookie.prg`, or in the same directory, if your emulator treats a folder like a disk. Also note that unlike `storedat`, `savedat` is not needed to run the game, so you can place `savedat` on another d64 and swap disks when needed. - - - - - - diff --git a/Tune.bas b/Tune.bas new file mode 100644 index 0000000..794b25f --- /dev/null +++ b/Tune.bas @@ -0,0 +1,15 @@ +2 for l=54272 to 54296: poke l,0: next +5 s=54272 +10 poke s+24,15: poke s+5,88: poke s+3,15: poke s+2,15: poke s+6,89 +20 read h: if h=-1 then end +30 read l +40 read d +60 poke s+1,h: poke s,l: poke s+4,65 +80 for t=1 to d: next: poke s+4,64 +85 for t=1 to 50: next +90 goto 20 +100 data 33,135,250,42,62,250,50,60,250,42,62,125,50,60,250 +105 data 56,99,250 +110 data 50,60,500,0,0,125,42,62,250,50,60,250,56,99 +115 data 1000,50,60,500 +120 data -1 \ No newline at end of file diff --git a/build/cookie.prg b/build/cookie.prg deleted file mode 100644 index ed0d5c0..0000000 Binary files a/build/cookie.prg and /dev/null differ diff --git a/build/cookie.prg.out.prg b/build/cookie.prg.out.prg deleted file mode 100644 index fea8c52..0000000 Binary files a/build/cookie.prg.out.prg and /dev/null differ diff --git a/prg.txt b/prg.txt index 00fb936..1c5fe5e 100755 --- a/prg.txt +++ b/prg.txt @@ -1,243 +1,233 @@ -0 rem !to "build/cookie.prg" -10 mb=17:dimna$(mb):dimia(mb):dimbd$(mb):dimbg(mb):dimpr(mb):dimcg(mb) -20 rem open 8,8,8,"storedat,s,r" -30 rem forx=0tomb -40 rem input#8,na$(x) -50 rem input#8,bd$(x) -55 rem input#8,bg(x) -60 rem input#8,pr(x) -65 rem ?x+1"/"mb+1 -70 rem next -80 gosub 52000:rem close 8 -90 ms=2:bn$="someone's":r1$="{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}" -95 r2$="{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}":ss=1 -100 rem stick news here. -110 print"{brown}{clear}UCCCCCCCCCCCCCCC{$b2}CCCCCCCCCCCCCCCCCCCCCCI"; -120 print"B B B"; -130 print"B B B"; -140 print"{$ab}CCCCCCCCCCCCCCC{$b3} B"; -150 print"B B B"; -160 print"B B B"; -170 print"B B B"; -180 print"B {rvon} {rvof} B B"; -190 print"B {rvon} {blk} {brown} {rvof} B B"; -200 print"B {rvon} {blk} {brown} {rvof} B B"; -210 print"B {rvon} {blk} {brown} {blk} {brown} {rvof} B B"; -220 print"B {rvon} {blk} {brown} {blk} {brown} {rvof} B B"; -230 print"B {rvon} {rvof} B B"; -240 print"B {rvon} {rvof} B B"; -250 print"B {rvon} {blk} {brown} {rvof} B B"; -260 print"B {rvon} {blk} {brown} {blk} {brown} {blk} {brown} {rvof} B B"; -270 print"B {rvon} {blk} {brown} {blk} {brown} {rvof} B B"; -280 print"B {rvon} {rvof} B B"; -290 print"B {rvon} {rvof} B B"; -300 print"B {rvon} {rvof} B B"; -310 print"B B B"; -320 print"B{wht} v2.9.0-1.0 {brown}B B"; -330 print"JCCCCCCCCCCCCCCC{$b1}CCCCCCCCCCCCCCCCCCCCCCK"; -340 print"{wht} {rvon}f1{rvof} store {rvon}f3{rvof} options {rvon}f5{rvof} stats {rvon}f7{rvof} ascend"; -500 print"{home}{down}{right}"int(cc) -510 print"{brown}B{wht} cookies" -520 ?"{brown}B{wht}"bn$ -530 print"{up}{brown}B{wht} bakery" -1000 on ms gosub 2000, 5000, 5000 -1010 goto 1000 - -2000 ifms<>1thenreturn :rem store page selection and menu switching area. -2010 ifss>0theni=0:j=4:ifss>1theni=5:j=9:ifss>2theni=10:j=14:ifss>3theni=15:j=17 -2060 ts=ss:tm=ms :rem 2010 sets the range of item data -2090 gosub2500 :rem to be used. do not have a range -2100 goto2000 :rem bigger than 5. (smaller is fine) - -2500 gosub51000 -2505 y=1:forx=itoj :rem this section prints the -2510 ifx=ithen?"{home}" :rem item data in the given range. -2515 ?r1$"{up}{rvon}"right$(str$(y),1)"{rvof} "na$(x) -2520 ?r1$r2$"{up}"ia(x) -2530 ?r1$bd$(x) -2540 ?r1$"{up}"int(pr(x)) -2545 ?r1$"{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}":y=y+1 -2550 next -2555 ifj=17then?r1$"{down}{down}{down}{down}{down}{down}{down} prev/next(-/+)" -2560 ?r1$"{up} prev/next(-/+)" -2565 gosub 3000 -2570 return - -3000 get k$:x=0 :rem don't add a 'ifk$=""' or else the adding routine won't run properly -3010 gosub 60000 :rem -3015 ifval(k$)>5then3070 :rem main loop -3020 ifval(k$)<1then3070 :rem -3025 x=val(k$) -3065 gosub 3500 -3070 gosub 50000 -3080 ifk$="+"thenss=ss+1 -3085 ifk$="-"thenss=ss-1 -3090 ifss=0thenss=1 -3095 ifss=5thenss=4 -3110 ifss<>tsthenreturn -3120 ifms<>tmthenreturn -3130 goto 3000 - -3500 y=i+x-1:ify>mbthenreturn :rem buying subroutine -3510 if cc2thenreturn :rem -5010 tm=ms :rem this section is for menu switching. -5020 gosub51000:gosub5100:goto5000 :rem - -5100 ?"{home}{down}"r1$"{rvon}1{rvof} change your bakery's" -5110 ?r1$"name" -5120 ?r1$"{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{down}" -5130 ?r1$"{up}{rvon}2{rvof} create a save file" -5140 ?r1$"on a disk" -5150 ?r1$"{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{down}" -5160 ?r1$"{up}{rvon}3{rvof} load a save file" -5170 ?r1$"from a disk" -5180 ?r1$"{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{down}" -5160 ?r1$"{up}{rvon}4{rvof} manage your saves" -5180 ?r1$"{down}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{$a3}{down}" - - -5200 getk$ :rem -5210 ifval(k$)>4then5240 :rem main loop -5220 ifval(k$)<1then5240 :rem -5230 onval(k$)gosub5500,5700,5900,6100 -5240 gosub 50000 -5250 ifms<>tmthenreturn -5260 goto 5200 - -5500 tn$="":?"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}"r1$"new name:" -5510 getnp$:ifnp$=""then5510 -5515 iflen(tn$)<1then?r1$; : -5520 ?np$;:tn$=tn$+np$:ifnp$="{\n}"then5540 :rem bakery name -5530 iflen(tn$)<14then5510 : -5540 ?"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}"r1$" " -5550 ?r1$" ":bn$=left$(tn$,(len(tn$)-1)) -5560 ?"{home}{down}{down}{down}{down}{right} {home}{down}{down}{down}{down}{right}"bn$"'s":return - -5700 open 8,8,8,"@0:savedat,s,w" :rem save data -5710 print#8,fl -5720 print#8,bn$ -5730 print#8,cc -5740 forx=0tomb -5750 print#8,cg(x) -5760 print#8,pr(x) -5770 print#8,ia(x) -5780 next:close 8:return - -5900 open 8,8,8,"@0:savedat,s,r" :rem load data -5910 input#8,fl -5920 input#8,bn$ -5930 input#8,cc -5940 forx=0tomb -5950 input#8,cg(x) -5960 input#8,pr(x) -5970 input#8,ia(x) -5980 next:close 8:return - -10000 stop - -49999 :rem important subroutines - -50000 ifk$="{f1}"then50040:rem -50010 ifk$="{f3}"then50040:rem menu selecting -50020 ifk$="{f5}"then50040:rem -50030 return -50040 ms=-1*(k$="{f1}")-2*(k$="{f3}")-3*(k$="{f5}"):return - -51000 forx=1to20: rem clears the menu -51010 ifx=1then?"{home}"r1$"{down} "; -51020 ?r1$"{right} ";:next -51040 return - -52000 x=0:na$(x)="cursor" -52001 bd$(x)="adds .1 cps" -52002 bg(x)=.1 -52003 pr(x)=15 -52004 x=x+1:na$(x)="grandma" -52005 bd$(x)="adds 1 cps" -52006 bg(x)=1 -52007 pr(x)=100 -52008 x=x+1:na$(x)="farm" -52009 bd$(x)="adds 8 cps" -52010 bg(x)=8 -52011 pr(x)=1100 -52012 x=x+1:na$(x)="mine" -52013 bd$(x)="adds 47 cps" -52014 bg(x)=47 -52015 pr(x)=12000 -52016 x=x+1:na$(x)="factory" -52017 bd$(x)="adds 260 cps" -52018 bg(x)=260 -52019 pr(x)=130000 -52020 x=x+1:na$(x)="bank" -52021 bd$(x)="adds 1400 cps" -52022 bg(x)=1400 -52023 pr(x)=1400000 -52024 x=x+1:na$(x)="temple" -52025 bd$(x)="adds 7800 cps" -52026 bg(x)=7800 -52027 pr(x)=20000000 -52028 x=x+1:na$(x)="wizard tower" -52029 bd$(x)="adds 44000 cps" -52030 bg(x)=44000 -52031 pr(x)=330000000 -52032 x=x+1:na$(x)="shipment" -52033 bd$(x)="adds 260000 cps" -52034 bg(x)=260000 -52035 pr(x)=5100000000 -52036 x=x+1:na$(x)="alchemy lab" -52037 bd$(x)="adds 1600000 cps" -52038 bg(x)=1600000 -52039 pr(x)=75000000000 -52040 x=x+1:na$(x)="portal" -52041 bd$(x)="adds 10 million cps" -52042 bg(x)=10000000 -52043 pr(x)=1000000000000 -52044 x=x+1:na$(x)="time machine" -52045 bd$(x)="adds 65 million cps" -52046 bg(x)=65000000 -52047 pr(x)=14000000000000 -52048 x=x+1:na$(x)="antimatter condenser" -52049 bd$(x)="adds 430 million cps" -52050 bg(x)=430000000 -52051 pr(x)=170000000000000 -52052 x=x+1:na$(x)="prism" -52053 bd$(x)="adds 2.9 billion cps" -52054 bg(x)=2900000000 -52055 pr(x)=2100000000000000 -52056 x=x+1:na$(x)="chancemaker" -52057 bd$(x)="adds 21 billion cps" -52058 bg(x)=21000000000 -52059 pr(x)=26000000000000000 -52060 x=x+1:na$(x)="fractal engine" -52061 bd$(x)="adds 150 billion cps" -52062 bg(x)=150000000000 -52063 pr(x)=310000000000000000 -52064 x=x+1:na$(x)="ml monitor" -52065 bd$(x)="adds 1.1 trillion cps" -52066 bg(x)=1100000000000 -52067 pr(x)=71000000000000000000 -52068 x=x+1:na$(x)="idleverse" -52069 bd$(x)="adds 8.3 trillion cps" -52070 bg(x)=8300000000000 -52071 pr(x)=1.2e+22 -52072 return - -60000 b=0:fora=0tomi:b=b+(cg(a)/3.6):next:rem adding subroutine -60010 ifk$=" "thencc=cc+1 -60020 ifcb>ccthen?"{home}{down}{right} " -60030 cc=cc+b:?"{home}{down}{right}"int(cc):cb=cc:return +!- ======================================== +!- Project : Cookie Clicker +!- Target : Commodore 64 +!- Comments : Cookie Clicker for the C64. +!- Author : Ian M. Skinner +!- ======================================== +0 rem !to "build/cookie.prg" +10 mb=17:dimna$(mb):dimia(mb):dimbd$(mb):dimbg(mb):dimpr(mb):dimcg(mb) +15 gosub52000:rem remove later +20 rem open 8,8,8,"storedat,s,r" +30 rem forx=0tomb +40 rem input#8,na$(x):rem building name +50 rem input#8,bd$(x):rem building description +55 rem input#8,bg(x):rem building cps (not actually per second) +60 rem input#8,pr(x):rem building price +65 rem ?x+1"/"mb+1: +70 rem next +80 rem close 8:rem gosub 52000 +90 ms=1:bn$="someone's":r1$="{right*17}":rem ms is the main subroutine value +95 r2$="{right*17}":ss=1:rem huh? that isn't right. why are r1 and r2 the same? +100 rem stick news here. Also ss is the shop page. (to be named sp) +110 print"{brown}{clear}UCCCCCCCCCCCCCCC{cm r}CCCCCCCCCCCCCCCCCCCCCCI"; +120 print"B B B"; +130 print"B B B"; +140 print"{cm q}CCCCCCCCCCCCCCC{cm w} B"; +150 print"B B B"; +160 print"B B B"; +170 print"B B B"; +180 print"B {reverse on} {reverse off} B B"; +190 print"B {reverse on} {black} {brown} {reverse off} B B"; +200 print"B {reverse on} {black} {brown} {reverse off} B B"; +210 print"B {reverse on} {black} {brown} {black} {brown} {reverse off} B B"; +220 print"B {reverse on} {black} {brown} {black} {brown} {reverse off} B B"; +230 print"B {reverse on} {reverse off} B B"; +240 print"B {reverse on} {reverse off} B B"; +250 print"B {reverse on} {black} {brown} {reverse off} B B"; +260 print"B {reverse on} {black} {brown} {black} {brown} {black} {brown} {reverse off} B B"; +270 print"B {reverse on} {black} {brown} {black} {brown} {reverse off} B B"; +280 print"B {reverse on} {reverse off} B B"; +290 print"B {reverse on} {reverse off} B B"; +300 print"B {reverse on} {reverse off} B B"; +310 print"B B B"; +320 print"B{white} v2.9.0-1.0 {brown}B B"; +330 print"JCCCCCCCCCCCCCCC{cm e}CCCCCCCCCCCCCCCCCCCCCCK"; +340 print"{white} {reverse on}f1{reverse off} store {reverse on}f3{reverse off} options {reverse on}f5{reverse off} stats {reverse on}f7{reverse off} ascend"; +500 print"{home}{down}{right}"int(cc) +510 print"{brown}B{white} cookies" +520 ?"{brown}B{white}"bn$ +530 print"{up}{brown}B{white} bakery" + +1000 on ms gosub 2000, 5000:rem, 7000 +1010 goto 1000:rem the menu selector + +2000 ifms<>1thenreturn :rem store page selection and menu switching area. +2010 ifss>0theni=0:j=4:ifss>1theni=5:j=9:ifss>2theni=10:j=14:ifss>3theni=15:j=17 +2060 ts=ss:tm=ms :rem 2010 sets the range of item data +2090 gosub2500 :rem to be used. do not have a range +2100 goto2000 :rem bigger than 5. (smaller is fine) + +2500 gosub51000:rem clear dynamic window +2505 y=1:forx=itoj :rem this section prints the +2510 ifx=ithen?"{home}" :rem item data in the given range. +2515 ?r1$"{up}{reverse on}"right$(str$(y),1)"{reverse off} "na$(x) +2520 ?r1$r2$"{up}"ia(x) +2530 ?r1$bd$(x) +2540 ?r1$"{up}"int(pr(x)) +2545 ?r1$"{cm t*22}":y=y+1:rem the bars below each item +2550 next +2555 ifj=17then?r1$"{down*7} prev/next(-/+)" +2560 ?r1$"{up} prev/next(-/+)" +2565 gosub 3000 +2570 return + +3000 get k$:x=0:rem don't add an 'ifk$=""then3000' or else the adding routine won't run properly +3010 gosub 60000 +3015 ifval(k$)>5then3070 +3020 ifval(k$)<1then3070 +3025 x=val(k$) +3065 gosub 3500 +3070 gosub 50000 +3080 ifk$="+"thenss=ss+1 +3085 ifk$="-"thenss=ss-1 +3090 ifss=0thenss=1 +3095 ifss=5thenss=4 +3110 ifss<>tsthenreturn +3120 ifms<>tmthenreturn +3130 goto 3000 + +3500 y=i+x-1:ify>mbthenreturn :rem buying subroutine +3510 if cc2thenreturn +5010 tm=ms +5020 gosub5500 +5030 goto5000 + +5500 gosub51000:rem clear screen +5510 ?r1$"change name"; +5530 ?r1$"{$a3*22}{down}" +5540 ?r1$"save"; +5560 ?r1$"{$a3*22}{down}" +5570 ?r1$"load"; +5590 ?r1$"{$a3*22}{down}" +5600 getk$:rem main loop +5610 gosub 60000:rem adding routine +5620 + +5700 open 8,8,8,"@0:savedat,s,w" :rem save data +5710 print#8,al +5720 print#8,bn$ +5730 print#8,cc +5740 forx=0tomb +5750 print#8,cg(x) +5760 print#8,pr(x) +5770 print#8,ia(x) +5780 next:close 8:return + +5900 open 8,8,8,"@0:savedat,s,r" :rem load data +5910 input#8,al +5920 input#8,bn$ +5930 input#8,cc +5940 forx=0tomb +5950 input#8,cg(x) +5960 input#8,pr(x) +5970 input#8,ia(x) +5980 next:close 8:return + +10000 stop + +49999 :rem important subroutines + +50000 ifk$="{f1}"then50040:rem menu selecting +50010 ifk$="{f3}"then50040 +50020 ifk$="{f5}"then50040 +50030 return +50040 ms=-1*(k$="{f1}")-2*(k$="{f3}")-3*(k$="{f5}"):return + +51000 forx=1to20: rem clears the menu +51010 ifx=1then?"{home}"r1$"{down} "; +51020 ?r1$"{right} ";:next +51040 return + +52000 x=0:na$(x)="cursor" +52001 bd$(x)="adds .1 cps" +52002 bg(x)=.1 +52003 pr(x)=15 +52004 x=x+1:na$(x)="grandma" +52005 bd$(x)="adds 1 cps" +52006 bg(x)=1 +52007 pr(x)=100 +52008 x=x+1:na$(x)="farm" +52009 bd$(x)="adds 8 cps" +52010 bg(x)=8 +52011 pr(x)=1100 +52012 x=x+1:na$(x)="mine" +52013 bd$(x)="adds 47 cps" +52014 bg(x)=47 +52015 pr(x)=12000 +52016 x=x+1:na$(x)="factory" +52017 bd$(x)="adds 260 cps" +52018 bg(x)=260 +52019 pr(x)=130000 +52020 x=x+1:na$(x)="bank" +52021 bd$(x)="adds 1400 cps" +52022 bg(x)=1400 +52023 pr(x)=1400000 +52024 x=x+1:na$(x)="temple" +52025 bd$(x)="adds 7800 cps" +52026 bg(x)=7800 +52027 pr(x)=20000000 +52028 x=x+1:na$(x)="wizard tower" +52029 bd$(x)="adds 44000 cps" +52030 bg(x)=44000 +52031 pr(x)=330000000 +52032 x=x+1:na$(x)="shipment" +52033 bd$(x)="adds 260000 cps" +52034 bg(x)=260000 +52035 pr(x)=5100000000 +52036 x=x+1:na$(x)="alchemy lab" +52037 bd$(x)="adds 1600000 cps" +52038 bg(x)=1600000 +52039 pr(x)=75000000000 +52040 x=x+1:na$(x)="portal" +52041 bd$(x)="adds 10 million cps" +52042 bg(x)=10000000 +52043 pr(x)=1000000000000 +52044 x=x+1:na$(x)="time machine" +52045 bd$(x)="adds 65 million cps" +52046 bg(x)=65000000 +52047 pr(x)=14000000000000 +52048 x=x+1:na$(x)="antimatter condenser" +52049 bd$(x)="adds 430 million cps" +52050 bg(x)=430000000 +52051 pr(x)=170000000000000 +52052 x=x+1:na$(x)="prism" +52053 bd$(x)="adds 2.9 billion cps" +52054 bg(x)=2900000000 +52055 pr(x)=2100000000000000 +52056 x=x+1:na$(x)="chancemaker" +52057 bd$(x)="adds 21 billion cps" +52058 bg(x)=21000000000 +52059 pr(x)=26000000000000000 +52060 x=x+1:na$(x)="fractal engine" +52061 bd$(x)="adds 150 billion cps" +52062 bg(x)=150000000000 +52063 pr(x)=310000000000000000 +52064 x=x+1:na$(x)="ml monitor" +52065 bd$(x)="adds 1.1 trillion cps" +52066 bg(x)=1100000000000 +52067 pr(x)=71000000000000000000 +52068 x=x+1:na$(x)="idleverse" +52069 bd$(x)="adds 8.3 trillion cps" +52070 bg(x)=8300000000000 +52071 pr(x)=1.2e+22 +52072 return + +60000 b=0:fora=0tomb:b=b+(cg(a)/3.6):next:rem slow, horrible, not good adding subroutine +60010 ifk$=" "thencc=cc+1 +60020 ifcb>ccthen?"{home}{down}{right} " +60030 cc=cc+b:?"{home}{down}{right}"int(cc):cb=cc:return \ No newline at end of file diff --git a/storedat.seq b/storedat.seq new file mode 100644 index 0000000..3cd52c6 --- /dev/null +++ b/storedat.seq @@ -0,0 +1,72 @@ +spacebar +adds .1 cps +.1 +15 +grandma +adds 1 cps +1 +100 +farm +adds 8 cps +8 +1100 +mine +adds 47 cps +47 +12000 +factory +adds 260 cps +260 +130000 +bank +adds 1400 cps +1400 +1400000 +temple +adds 7800 cps +7800 +20000000 +wizard tower +adds 44000 cps +44000 +330000000 +shipment +adds 260000 cps +260000 +5100000000 +alchemy lab +adds 1600000 cps +1600000 +75000000000 +portal +adds 10 million cps +10000000 +1000000000000 +time machine +adds 65 million cps +65000000 +14000000000000 +antim. condenser +adds 430 million cps +430000000 +170000000000000 +prism +adds 2.9 billion cps +2900000000 +2100000000000000 +chancemaker +adds 21 billion cps +21000000000 +26000000000000000 +fractal engine +adds 150 billion cps +150000000000 +310000000000000000 +ml monitor +adds 1.1 trillion cps +1100000000000 +71000000000000000000 +idleverse +adds 8.3 trillion cps +8300000000000 +1.2e+22