Does anyone have any Prizm Basic & C++ Games they'd be willing to spill the source to? This can be a universal share your program thread for test and introduction purposes.

One of the ways I learn is by tweaking code and seeing what breaks. Albeit "deadly" in the higher languages, but it's how I learned TI-BASIC.

I'd really like to view some example-free programs and get a feeling for C++ and Casio Basic.

My first program is below.
Code:
0→A
1→B~C
While A≤1.2
A+.2→A
Text B,C,A
14+B→B
WhileEnd
It's fairly simple. Just does a loop and display the count on the graph screen. It doesn't clear the graph as I haven't found those functions yet.

Downloads would be preferred for larger programs, and just in general.
FWIW, SHIFT VARS F6 F1. That menu has a bunch of Clear commands, like ClearText.

Here is one of mine, a snake game:
Code:
{1,1,1,1}->List 1
1->A~Y
RanInt#(1,21)->V
RanInt#(1,7)->W
While K!=66
X->List 1[Dim List 1-1]
X->List 1[Dim List 1]
Getkey
(Ans=38)+(Ans=27)+(Ans=28)+(Ans=37)+(Ans=66)=>Ans->K
K=39=>X>1=>X-1->X
K=27=>X<21=>X+1->X
K=28=>Y>1=>Y-1->Y
K=37=>Y<7=>Y+1->Y
If Dim List 1>2
Then
For 1->I To Dim List 1-2 Step 2
List 1[I+2]->List 1[I]
List 1[I+3]->List 1[I+1
Next
IfEnd
If (X=V)(Y=W)
Then
X->List 1[Dim List 1+1]
Y->List 1[Dim List 1+1]
RanInt#(1,21)->V
RanInt#(1,7)->W
IfEnd
Local List 1[1],List 1[2]," "
Locate X,Y,"<theta>"
Locate V,W,"A"
WhileEnd
"PRESS ENTER"
Return
Arrow keys move, get the A, avoid the <theta> (I think).

Code:
ClrText
"Nick Disabato's"
"/<-3R33+ Number"
"Guessing Program"
""
"Choose a number"
"from 1-30"
Lbl A
"A="?→A
If A<30 Or A<1
Then
"Out of range!"
Goto A
IfEnd
ClrText
RanInt#(1,30→B
While A≠B
If A>30 Or A<1
Then
"Out of range!"
IfEnd
"No, that's not it!"
"A="?→A
WhileEnd
"YES!"
"Nick's ticalc.org"
"password is"
"**********"


You can probably guess what this is supposed to be.
This is a snake game I made back when the Prizm first came out along with a few screen shots






Code:

If 15.2<>J
Then
0->Q
IfEnd
50->T
0->G
Cls
AxesOff
LabelOff
1->Xmin
95->Xmax
(-)47->Ymin
(-)1->Ymax
27->K

Blue Text 85,100,"EASY"
Red Text 50,150,"MEDIUM"
Green Text 85,225,"HARD"
Yellow Text 125,130,"VERY HARD"
Cyan Text 10,300,Q
For (-)18->N To (-)30 Step (-).7
Black F-Line 40,N,54,N
Next
0->O
While K<>78
0->K
While K=0
Getkey->K
WhileEnd
Black F-Line 47,(-)29,L,M
Black F-Line 47,(-)19,L,M
Black F-Line 53,(-)24,L,M
Black F-Line 41,(-)24,L,M
If K=37
Then
47->L
(-)29->M
3->O
IfEnd
If K=27
Then
53->L
(-)24->M
2->O
IfEnd
If K=28
Then
47->L
(-)19->M
1->O
IfEnd
If K=38
Then
41->L
(-)24->M
0->O
IfEnd
Blue F-Line 41,(-)24,L,M
Red F-Line 47,(-)19,L,M
Green F-Line 53,(-)24,L,M
Yellow F-Line 47,(-)29,L,M
WhileEnd
Cls
Blue Vertical 5
Red Horizontal (-)2
Green Vertical 94
Yellow Horizontal (-)46
0->P
While P<O
P+1->P
Green F-Line RanInt#(7,94),RanInt#((-)44,(-)3),RanInt#(7,94),RanInt#((-)44,(-)3)
Yellow F-Line RanInt#(7,94),RanInt#((-)44,(-)3),RanInt#(7,94),RanInt#((-)44,(-)3)
WhileEnd
47->C
(-)23->D
2->E
1->H
Cyan Text 1,1,0
RanInt#(7,91)->R
RanInt#((-)44,(-)3)->S
Black F-Line R,S,R,S
While H<>0
C+(E=1)-(E=4)->C
D+(E=2)-(E=3)->D
If PxlTest(((-)D*4)-2,(C*4)-2)
Then
If C=R And D=S
Then
T+50->T
Ans+G->G
RanInt#(7,91)->R
RanInt#((-)44,(-)3)->S
Black F-Line R,S,R,S
H+2->H
Else
If C=5 Or C=94 Or D=(-)2 Or D=(-)46
Then
1->H
IfEnd
IfEnd
H-1->H
If H>10
Then
10->H
IfEnd
Cyan Text 1,1,H-1
IfEnd
If I=1
Then
Blue F-Line C,D,C,D
0->I
Else
Red F-Line C,D,C,D
1->I
IfEnd
Getkey->F
If F=27
Then
1->E
IfEnd
If F=28
Then
2->E
IfEnd
If F=37
Then
3->E
IfEnd
If F=38
Then
4->E
IfEnd
G+1->G
WhileEnd
15.2->J
(O+1)*G->G
If G>Q
Then
G->Q
Red Locate 6,6,"HIGH SCORE"
IfEnd
Locate 1,2,"YOUR SCORE"
Locate 12,2,G
Locate 1,3,"HIGH SCORE"
Locate 12,3,Q
" "
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement