Page 1 of 1

Learning to code in TI-Basic

Posted: Sat Jan 10, 2026 9:05 am
by Sumde
Hi everyone! Before you read on, this is not a tutorial in anyway, I will not be guiding you or teach you how to code in TI-Basic. Why? Because this thread is documenting MY process of learning TI-Basic. As many people know, I haven't really done anything in TI-Basic yet, nor learned how to use most of it, and I have quite the hard time trying to read some of the code from here. My plan is, each day, I will create a program (probably harder or with new features than the previous one) in TI-Basic, as well as documenting it here. I'm not sure how long this is going to last for, but honestly I want to end when I master it! :)

Week 1:

Day 1:
I created a random number guessing game (a classic) in TI-Basic, it picks a number from 1 to 100, and you pick a number, gives you hints to decide the next number (like if it's lower or higher) until you get the number right! So far, I haven't learned anything, because this is just purely what I know of TI-Basic.

Code: Select all

PROGRAM:GUESS
:randInt(1,100)->A
:0->B
:While A≠B
:Prompt B
:If B>A
:Then
:Disp "LOWER"
:End
:If B<A
:Then
:Disp "HIGHER"
:End
:End
:Disp "CORRECT!"
Day 2:
I created a program that gets the length of the hypotenuse from the adjacent and opposite side lengths using the Pythagorean theorem.

Code: Select all

PROGRAM:HYPOT
:Prompt A
:Prompt B
:√(A^2+B^2)->C
:Disp C
Day 3:
I made a program that shows a 1 on the screen falling and falling forever. I ended up learning there was no wait or sleep command, and you unfortunately just had to do a for loop repeating for a number of times. I didn't use it, but maybe some day I will.

Code: Select all

PROGRAM:FALLING
:ClrHome
:1->Y
:While 1
:Output(Y,8,1)
:Y+1->Y
:ClrHome
:If Y>8
:1->Y
:End
:End
Day 4:
I made a program that detects when you press a key, and gives the keycode for it. I learned about the getKey command and the Repeat loop.

Code: Select all

PROGRAM:GETKEY
:Repeat Ans
:getKey
:End
:Ans->K
:Disp K
Day 5:
I made a program that detects when you press the enter key, and ends the program. It may seem like a step backward from the last day, however I learned how to use the GOTO and LBL commands.

Code: Select all

PROGRAM:GOTOLBL
:ClrHome
:Lbl A
:0->B
:getKey->B
:If B≠105
:Goto A
Day 6:
I made a program that puts a random number on the screen randomly, and clears the screen each time after 10 iterations. I learned that multi-line if statements require a "then" block.

Code: Select all

PROGRAM:FUN
:ClrHome
:0->X
:While 1
:X+1->X
:Output(randInt(1,8),randInt(1,16),randInt(0,9))
:If X≥10
:Then
:ClrHome
:0->X
:End
:End
Day 7:
I made a DVD screensaver like program for the day of the week! Sometimes it works, sometimes it gets stuck in a loop, and sometimes it gives a domain error..

Code: Select all

PROGRAM:DVD
:ClrHome
:Prompt X
:Prompt Y
:1->D
:While 1
:If D=1
:Then
:X+1->X
:Y+1->Y
:End
:If D=2
:Then
:X+1->X
:Y-1->Y
:End
:If D=3
:Then
:X-1->X
:Y+1->Y
:End
:If D=4
:Then
:X-1->X
:Y-1->Y
:End
:If Y=8
:Then
:1+D->D
:End:
If X=16
:Then
:1+D->D
:End
:If Y=1
:Then
:1+D->D
:End
:If X=1
:Then
:1+D->D
:End
:If D=5
:Then
:1->D
:End
:ClrHome
:Output(Y,X,8)
:End

Re: Learning to code in TI-Basic

Posted: Mon Jan 12, 2026 5:39 pm
by Jeff Calc 84
well, tibasic can make cool games if you know some tricks... Have you been using tibasicdev? :D

Re: Learning to code in TI-Basic

Posted: Mon Jan 12, 2026 5:52 pm
by Sumde
Jeff Calc 84 wrote: Mon Jan 12, 2026 5:39 pm well, tibasic can make cool games if you know some tricks... Have you been using tibasicdev? :D
Well, most of the stuff that I'm doing right now (in week 1) is purely just my knowledge of TI-Basic, and I plan to advance on in the coming weeks.

Re: Learning to code in TI-Basic

Posted: Mon Jan 19, 2026 8:40 pm
by Delta X
I think you have enough skills to make a CYOA game, you should try it.