If you can make my code faster, then please do! I am open to your suggestions and interested in seeing what you all come up with!
:D
Here's the plaintext:
15→A
100→B
0→C
1100→ D
12000→E
130000→F
1400000→G
0→H
C→M
0→P
Lbl 1
0→Z
ClrDraw
While Z65
//(This will keep happening until “M” is pressed, then it will show the heavenly cookies / prestige option.This will come up later.)
C+P→C
M+P→M
//This gives 1 second (or frame, more exactly) of cookies to C, the cookie indicator, and gives it to M, the “This Prestige” cookies made all time marker (It’s reset when prestige is bought, but until then, it just increases with cookies)
Text(0,1,”COOKIES:”
Text(0,32,int(C
Text(0,60,”CPS:”
Text(10,75,int(P*10)/10
getKey→Z
//(Z is the variable used for all getKey purposes, and checks once every frame to see what button was pressed since the previous check. It gets slower once the framerate gets slower, typically later in the game, as their speeds are about the same.)
If Z=53 or Z=83
Then
C+max(1,int(P/100)→C
M+max(1,int(P/100)→M
End
//The above If-Then statement basically states that if you press 5 or cos( , then it will give you one cookie or 1/100 of your CPS, or cookies per second, whichever is greater.
Text(8,1,”ITEM:
Text(9,40,”COST
Text(9,75,”CPS
//For all you perfectionists out there (no offense), I have it so the “ITEM:” figure is slightly higher than the others so if someone takes the idea, they can have them all at the same level or at different levels, but they cannot do exactly what I did.
Text(16,1,”CURSOR
Text(22,1,”GRANDMA
Text(28,1,”FARM
Text(34,1,”MINE
Text(40,1,”FACTORY
Text(46,1,”BANK
//That was the item display code...
Text(16,40,A
Text(22,40,B
Text(28,40,D
Text(34,40,E
Text(40,40,F
Text(46,40,G
//That was the price display code…
Text(16,75,int(0.1(1.01^H)*10/10
//This is the only CPS block that has a decimal, as it represents the cursor.
Text(22,75,int(1(1.01^H))
Text(28,75,int(8(1.01^H))
Text(34,75,int(40(1.01^H))
Text(40,75,int(250(1.01^H))
Text(46,75,int(1000(1.01^H))
//Those were the CPS per item blocks, by the way.
If Z=11 and C>=A
Then
C-A→C
int(1.2A→A
P+0.1(1.01^H)→P
ClrDraw
End
//That was basically saying if the Y= button was pressed it would buy a cursor, increase cursor price by 20%, and add Cursor CPS to P, the CPS marker.
If Z=12 and C>=B
Then
C-B→C
int(1.2B→B
P+1(1.01^H)→P
ClrDraw
End
//It’s basically the same with all the other buildings, but with Window, Zoom, Trace, Graph, and Up.
If Z=13 and C>=D
Then
C-D→C
int(1.2D→D
P+8(1.01^H)→P
ClrDraw
End
If Z=14 and C>=E
Then
C-E→C
int(1.2E→E
P+40(1.01^H)→P
ClrDraw
End
If Z=15 and C>=F
Then
C-F C
int(1.2F F
P+250(1.01^H)→P
ClrDraw
End
If Z=25 and C>=G
Then
C-G→C
int(1.2G→G
P+1000(1.01^H)→P
ClrDraw
End
End
//(If this is gotten to, then it shows prestige.)
ClrDraw
Text(1,1,”RESET NOW AND GET”
Text(20,1,”HEAVENLY CHIPS?”
//That was all the static prestige elements before the Menu( element.
Text(10,6,int(.01\sqrt\M)))
//If you don’t know already, the \sqrt\ is just a square root symbol.
Pause
Menu(“RESET?”,”YES”,A,”NO”,B
Lbl B
Goto 1
Lbl A
15→A
100→B
0→C
1100→D
12000→E
130000→F
1400000→G
0→P
H+int(0.01√(M)))→H
0 M
ClrDraw
Goto 1
//And that’s it! Please let me know if you have any suggestions for making it faster! Your input is appreciated!