- help with some ti-basic warthunder game I'm making
- 05 Jan 2026 08:11:27 pm
- Last edited by ProteimProphet on 05 Jan 2026 08:20:43 pm; edited 2 times in total
Help with my basic TI-84 Plus CE (OS 5.8.0.002) program code please, the c compiler didnt work for my old ahh hardware, so I make a mostly working game in basic.
Key requirements:
Every line must begin with “:” (no blank lines or missing colons).
NO Then/End statements anywhere in the code — use only If statements (my calculator throws syntax errors with any Then/End blocks).
All negative numbers must be written as 0-minus style (e.g., 0-100 instead of -100, 0-20 instead of -20, etc.).
Avoid domain errors at all costs, especially division by zero or very large/small numbers early in the game.
No token or syntax errors — code must run cleanly on a real TI-84 Plus CE.
Main bug to fix in the provided code:
Locks onto planes clearly outside of radar cone
My code :calc: :
Code:
Key requirements:
Every line must begin with “:” (no blank lines or missing colons).
NO Then/End statements anywhere in the code — use only If statements (my calculator throws syntax errors with any Then/End blocks).
All negative numbers must be written as 0-minus style (e.g., 0-100 instead of -100, 0-20 instead of -20, etc.).
Avoid domain errors at all costs, especially division by zero or very large/small numbers early in the game.
No token or syntax errors — code must run cleanly on a real TI-84 Plus CE.
Main bug to fix in the provided code:
Locks onto planes clearly outside of radar cone
My code :calc: :
Code:
:ClrHome
:Output(1,1,"WARTHNDR")
:Output(2,1,"F-15 vs MiG-25")
:Output(4,1,"DEFEND AMERICA")
:Output(6,1,"UP/DOWN: AIM")
:Output(7,1,"ENTER: FIRE")
:Output(8,1,"CLEAR: QUIT")
:Output(10,1,"PRESS ENTER")
:0→K
:Repeat K=105
:getKey→K
:End
:ClrDraw
:AxesOff
:GridOff
:LabelOff
:0→Xmin
:320→Xmax
:0→Ymin
:240→Ymax
:280→R
:120→S
:0→A
:40→W
:0→B
:0→C
:0→E
:0→F
:0→V
:0→M
:0→N
:0→P
:0→Q
:0→L
:0→T
:0→G
:0→U
:0→D
:0→H
:0→I
:0→Z
:0→Y
:Repeat K=45 or B≥3 or C≥3
:getKey→K
:If K=25:A+15→A
:If K=34:A-15→A
:If A>100:100→A
:If A<(0-100):(0-100)→A
:T+1→T
:0→U
:If V=0 and T>8 and rand>0.7:1→U
:If U=1:20→E
:If U=1:30+int(rand*180)→F
:If U=1:1→V
:If U=1:0→T
:If V=1:E+4→E
:0→U
:If V=1 and E>285:1→U
:If U=1:B+1→B
:If U=1:0→V
:If U=1:0→E
:If U=1:0→F
:If U=1:0→T
:0→D
:0→H
:If V=1 and E>110 and E<275 and abs(R-E)>10:1→H
:If H=1 and abs(R-E)>50:(S+A+W-F)*((R-E)/(R-105))+F→G
:If H=1 and abs(R-E)≤50:F→G
:If H=1 and G>(S+A-W-2) and G<(S+A+W+2):1→D
:If H=1:0→H
:0→Z
:If K=105 and L=0 and V=1 and D=1:1→Z
:If Z=1:R→M
:If Z=1:S+A→N
:If Z=1:E→P
:If Z=1:F→Q
:If Z=1:1→L
:If Z=1:1→I
:0→H
:If L=1 and abs(P-M)>4:1→H
:If H=1 and P>M:18→G
:If H=1 and P<M:(0-18)→G
:If H=1:M+G→M
:If H=1:0→H
:If L=1 and abs(Q-N)>4:1→H
:If H=1 and Q>N:16→G
:If H=1 and Q<N:(0-16)→G
:If H=1:N+G→N
:If H=1:0→H
:0→U
:If L=1 and (M<22 or M>318 or N<2 or N>238):1→U
:If U=1:0→L
:If U=1:0→I
:0→U
:If L=1 and V=1 and M<E+5:1→U
:If U=1:0→L
:If U=1:0→I
:0→U
:If V=1 and L=1 and abs(M-E)<22 and abs(N-F)<22:1→U
:If U=1:C+1→C
:If U=1:0→V
:If U=1:0→L
:If U=1:0→I
:If U=1:0→E
:If U=1:0→F
:If U=1:0→T
:ClrDraw
:Line(R-10,S,R+10,S)
:Line(R,S-10,R,S+10)
:S+A+W→J
:If J<5:5→J
:If J>235:235→J
:Line(R,S,20,J)
:S+A-W→J
:If J<5:5→J
:If J>235:235→J
:Line(R,S,20,J)
:If V=1 and D=0 and F>10 and F<230:Line(E-6,F,E+6,F)
:If V=1 and D=0 and F>10 and F<230:Line(E,F-6,E,F+6)
:If V=1 and D=1 and F>10 and F<230:Line(E-8,F-8,E+8,F-8)
:If V=1 and D=1 and F>10 and F<230:Line(E+8,F-8,E+8,F+8)
:If V=1 and D=1 and F>10 and F<230:Line(E+8,F+8,E-8,F+8)
:If V=1 and D=1 and F>10 and F<230:Line(E-8,F+8,E-8,F-8)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M,N)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M+4,N)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M,N+4)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M+4,N+4)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M+2,N+2)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M+1,N+1)
:If L=1 and I=1 and M>4 and M<316 and N>4 and N<236:Pt-On(M+3,N+3)
:Text(1,1,1,"BREACHES:",B)
:Text(1,20,1,"KILLS:",C)
:End
:ClrHome
:Output(4,5,"GAME OVER")
:If B≥3:Output(6,3,"AMERICA LOST")
:If C≥3:Output(6,4,"VICTORY!")
:Output(8,2,"FINAL KILLS:")
:Output(8,14,C)
:Output(9,2,"BREACHES:")
:Output(9,12,B)
:0→K
:Repeat K=105
:getKey→K
:End
:ClrHome


