:0->Xmin			These 4 lines set up the window
:94->Xmax 			-
:1->Ymin 			-
:63->Ymax 			-
:PlotsOff 			Turns off your plots, so it won't graph plots during the game
:CoordOff			Turns off the coordinate display
:AxesOff 			Turns off the Axis
:GridOff 			Turns off all the grid dots
:FnOff 				Turns off the 'Y=' functions
:Lbl A				Label A
:0->B 				B takes the value 0
:randInt(10,85)->C		C is now a random intiger between 10 and 85 (target's position)
:ClrDraw			Clear any marks on the graph screen
:ClrHome			Clear the home screen
:Line(C,1,C+5,1			Draw a line between 2 points : Line(X1,Y1,X2,Y2) 
:Line(C+1,2,C+4,2 		I think these Line()'s draws the target
:For(A,1,500) 			For loop, used as a time delay here. Using this as a time delay is considered bad
:End 				programming, because the For loop delay depends on processor speed.
:Lbl B				Label B
:ClrDraw 			Clear the graph screen again
:Input "SHOT POWER=",S 		Prompts the user for the value of 'S'
:B+1->B				Increases B by 1, used to count number of shots
:(1/S)->S			Invert the variable S
:Line(C,1,C+5,1 		Draw the target again
:Line(C+1,2,C+4,2 		-
:For(X,0,95,.25			This For loop draws your shot path one point at a time.
:(-S(X^2)+63)->Y 		Makes a Y= function to plot an arc
:Y->Z				Makes a backup of variable Y (the TI-83 will sometimes forget this variable when drawn)
:Pt-On(X,Y)			Fills in a pixel at (X,Y). After here, the variable Y is as good as dead(TI-83 bug)
:If Z<0 or Z=0			Make sure Z(a.k.a. Y) has not fallen off the screen.
:Goto C 			If so, go to label C.
:End 				-
:Lbl C				Label C
:1->M				M will keep track of if you've made a hit or not. Default is no hit.
:If X>(C-1) and X<(C+6) 	Checks if your shot is in the target range, or in a place to cause a hit.
:Then 				-
:2->M 				Have M remember that there is a hit. Because it passed the check.
:X->K				Backup of X, cause of the bug in the TI.
:Line(K,1,K-8,3			Draw an explosion around the current possition.
:Line(K,1,K+8,3 		-
:Line(K,1,K-6,8 		-
:Line(K,1,K+6,8 		-
:Line(K,1,K-2,6 		-
:Line(K,1,K+2,6 		-
:End				End of hit check.
:For(A,1,200) 			Another time delay
:End 				-
:If M=2 			If target hit, then...
:Then 				-
:ClrHome 			Clear the home screen
:If B=1 			Checks if you made a hit in one try.
:Then 				-
:For(I,1,3)			This loop will make the text flash 3 times.
:Output(4,4,"FIRST TRY!"	Draw text
:For(A,1,100) 			wait
:End 				-
:Output(4,4,"__________"	Clear only that text (as opposed to clearing the whole screen)
:For(A,1,100) 			wait again
:End 				-
:End 				End the flashing loop
:Output(4,4,"FIRST TRY!:" 	draw text again, because it was erased when the loop finished.
:End 				End of If B=1 check
:If B>1				This really shouldn't be necessary, It should be obvious that you've take more
:Then 				than one shot. But I wrote this a while back.
:Output(4,4,B			Outputs number of shots
:Output(4,8,"SHOTS" 		Outputs text
:End				Ends B>1 condition
:Pause 				Pause until Enter key is hit.
:ClrHome 			Clear Home screen
:Goto D 			Goto Label D
:End 				End of M=2 condition
:ClrHome 			Clear screen if you missed the target
:Disp "SHOOT AGAIN:" 		Display text
:Goto B 			Go back to label B (choose shot power again)
:Lbl D 				Label D
:ClrHome 				Clear home screen
:Menu("PLAY AGAIN?","YES",A,"NO",E 	Basic Menu. Menu("TITLE","CHOICE 1",Label to go to,"CHoICE 2", ...)
:Lbl E 					Label E, end of game
:ClrHome 				Clear off the screen
:Stop 					Quit program, it'll also do this if it runs to the end of the program. So it's not necessary here


I wrote this code a long time ago, so there are many things I would have done different. My Gunner game better depicts parabolic motion, using real numbers for gravity and all.

    Source: geocities.com/ti_sourcecode