| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
Ti-83 programs
Have Some fun with a clock!
:Lbl1 :ClrHome :If A=0 and B=0 and C=0 :Then :Input "HOUR:", A :Input "MINUTE:", B :Input "SECOND:", C :Input "AM/PM:", Str1 :Goto 2 :Else :Goto 2 :Lbl 2 :If C=60 :B+1->B :If C=60 :0->C :If B=60 :A+1->A :If B=60 :0->B :If A=12 and Str1="AM" :"PM"->Str1 :If A=12 and Str1="PM" :"AM"->Str1 :If A=13 :1->A :For(D,0,120 :Text(25,25,A,":",B,":",C,Str1) :End :Goto 1 |
|
|||
|
nice program, but there is an unidentified err. it goes to the line,
:If A=12 and Str1="AM" and points to the 2nd = sighn |
|
|||
|
any more??
nice, but do you have any more? i was looking for games and it looks like you know ur stuff. i got 2 programs, a guessing game and a bounging line.here they are...
|
|
|||
|
bouncing line:
ClrDraw AxesOff 1->A:1->B:1->C 1->D While 1 A+C->A:B+D->B pxl-Change(A,B if A=9:1->C if A=62:-1->C if A=9:1->D if A=94:-1->D End |
|
|||
|
Have some real fun with a clock : )
http://www.devhardware.com/forums/ti-83-84-102/clock-program-176531.html |
|
||||
|
How about a bouncing ball program where you can shot the ball up, down, left, or right?
Just replace anything in the asterisks (* *) with it's appropriate symbol, and "->" with the sto-> symbol. Hold up, down, left, or right to shoot it farther. It will continue normally for about 4 frames until it will react to how you shoot it. I'm currently trying to fix that. Anyways, press VARS to reset the speed, acceleration, and directions, press CLEAR to reset everything VARS does but also reset the position, and press DEL or ON to quit. DEL won't automatically bring you to a "ERR:BREAK" screen, but will keep showing you the current frame. Again, tell me if there are any errors. Code:
:ClrDraw :62->Z------------------You can change the height of the screen by changing this value. It has to stay above 2, and below 63. If you change it to 2, then there is almost no area for the ball to bounce, and it will just "roll" around after getting rid of a part of the border, and if it's 63 or higher, then you'll get an error with the domain :For(W,0,z :Pxl-On(W,0 :Pxl-On(W,94 :End :For(W,0,94 :Pxl-On(0,W :Pxl-On(Z,W :End :randInt(1,93->X :5(Z=62)+1->Y:0->A:1->I:1->J:1->N:1->O:1->F:1->G:0->H :randInt(-5,5->S :While S=0 :randInt(-5,5->S :End :Pxl-Off(2,X+(X+1*doesn't equal*94 :Pxl-On(Y,X :While 1 :getKey->G :If G=23:Stop :N->K:O->L:I->N:J->O:X->I:Y->J:A+1->A:Y+A->Y:X+S->X :If G=45 or G=44:Then :If G=45:Then :ranInt(1,93->X :6->Y :End :0->A:randInt(-5,5->S :While S=0 :randInt(-5,5->S :End :End :If H=1:Then :P+(G=26)-(G=24)->P:Q-(G=25)+(G=34)->Q :If P*is not equal to*0:5(P/abs(P))(P>5 or P<-5)+P(P*greater than or equal to*-5 and P*less than or equal to*5)->P :If Q*is not equal to*0:7(Q/abs(Q))(Q>7 or Q<-7)+Q(Q*greater than or equal to*-7 and Q*less than or equal to*7)->Q :End :S+Pnot(H)->S:A+Qnot(H)->A :If H*is not equal to*:Then :0->P:0->Q :End :(G*is not equal to*0)->H:(1-2(Y+A*greater than or equal to*Z-1 or Y+A*less than or equal to*0))A->A:(1-2(X+S*greater than or equal to*94 or X+S*less than or equal to*0))S->S:Y-(Y=Z)->Y:X+(X*is not equal to*abs(X))abs(S)->X:X(X<94 and X>0)+93(X*greater than or equal to*94)+(X*less than or equal to*0)->X:Y(Y>0 and Y<Z)+(Y*less than or equal to*0)+(Z-1)(Y*greater than or equal to*Z)->Y :Pxl-On(Y,X :If (L*is not equal to*Y or K*is not equal to*X) and (L*is not equal to*J or K*is not equal to*I) and (L*is not equal to*O or K*is not equal to*N):Pxl-Off(L,K--------------this part is optional. If you want to slightly increase the speed of the program, I suggest this be the first code you take out. It just checks to see if the current position of the final link of the trail is at the current position of any of the other parts. This is useful for when/if the ball finally loses all vertical speed and just "rolls" on the ground, or when/if you change the horizontal speed and neutralize it. Without this code, it just looks bad when it reaches the summit of each bounce and points overlap. But it doesn't speed the program up much so I'd keep it in just in case. :End Remember, you have to hold down the arrow you want to move the ball for a little while. It may help to count the frames you've held it down, and remember that it takes the input before it shows the frame every time it goes through the loop. Last edited by MufinMcFlufin : May 2nd, 2009 at 08:11 PM. Reason: Accidentally used wrong variable in one of two force restricting codes |
![]() |
| Viewing: Dev Hardware Forums > SOFTWARE > TI 83/84 > Ti-83 programs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|