Skip to content

Instantly share code, notes, and snippets.

@tomaes
Last active May 25, 2019 09:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaes/df64d646add2619a8e097629eec66b5b to your computer and use it in GitHub Desktop.
Save tomaes/df64d646add2619a8e097629eec66b5b to your computer and use it in GitHub Desktop.
IchigoJam mini game; collect coins and hearts in equal amounts and leave when you have enough of both.
5 'heartcash II
10 CLS
12 Y=0: M=20: H=20: P=229
14 C=245: D=C-P: O=320: L=O/32
16 LC 0,L-1: ? CHR$(226);" exit::::::::::::::::::::::::"
18 LC 0,L+2: ? CHR$(227);" exit::::::::::::::::::::::::"
20 IF RND(8) POKE#91E+O+32*RND(2),P+RND(2)*D
30 COPY #900+O,#901+O,31: COPY #920+O,#921+O,31
50 Y=Y-BTN(UP)+BTN(DOWN)
51 IF M M=M-1
52 IF H H=H-1
53 IF SCR(0,Y+L)=C M=M+10
54 IF SCR(0,Y+L)=P H=H+10
55 LC 0,Y+L: ? CHR$(251);
58 LC 0,4+L: ? "$x";M;" ";CHR$(P);"x";H;" "
60 IF Y<2 AND Y>= 0 GOTO 20
70 CLK: IF ABS(M-H)<10 AND H>99 ? "WELL DONE!"
@tomaes
Copy link
Author

tomaes commented May 25, 2019

better looking "char version"

â,ã= ALT+2,ALT+3 (arrow up, down)
ñ=ALT+H (ufo)
û=ALT+R (runner)
å=ALT+5 (heart)

5 'heartcash II
10 CLS
12 Y=0: M=20: H=20: P=229
14 C=245: D=C-P: O=320: L=O/32
16 LC 0,L-1: ?"â exit ññññññññññññññññññññññññ"
18 LC 0,L+2: ?"ã exit ññññññññññññññññññññññññ"
20 IF RND(8) POKE#91E+O+32*RND(2),P+RND(2)*D
30 COPY #900+O,#901+O,31: COPY #920+O,#921+O,31
50 Y=Y-BTN(UP)+BTN(DOWN)
51 IF M M=M-1
52 IF H H=H-1
53 IF SCR(0,Y+L)=C M=M+10
54 IF SCR(0,Y+L)=P H=H+10
55 LC 0,Y+L: ? "û";
58 LC 0,4+L: ? "$x";M;" åx";H;" "
60 IF Y<2 AND Y>= 0 GOTO 20
70 CLK: IF ABS(M-H)<10 AND H>99 ? "WELL DONE!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment