Got a little techonology problem that you need fixed pronto? Post it here and we'll see what we can do.
Topic locked

Calculator Programming

Thu Mar 22, 2007 10:38 pm

Does anyone else program in TI-BASIC and if so do you want to bounce ideas off each other?

Thu Mar 22, 2007 11:48 pm

I made a couple simple games a while back... I've forgotten how to do any of it now, of course :P

Thu Mar 22, 2007 11:54 pm

Snake! (screen is too small for any reasonable display of a sudoku board; pong is a redraw nightmare)

Fri Mar 23, 2007 3:11 am

What calculator? Are you using an 8X (73, 73E, 80, 81, 82, 83, 83+, 83+S, 84+, 84+S, 85, 86) or 9X (89, 89T, 92, 92 II, 92+, V200)?

The big thing to remember if you want to make games is to use seperate programs. One of the biggest issues with TI-BASIC is that the Lbl command starts at the top of the program and searches, line by line, for the label you're referencing. If you try to make one all-inclusive program, it probably won't be nearly as fast as you need it to be.

There's a lot of material available online on optimization, for instance, consider the for() coomand:

:PRGMFOREX
:for(a,1,1000)
:a
:end

will run very quickly, but if you have

:PRGMFOREX
:for(a,1,1000
:a
:end

will go much slower. The one-byte ) will reduce the program size, but will make your program much slower.

Finally, if you want to make graphical games, you almost have to use ASM routines. Many programs exist solely to integrate ASM commands into TI-BASIC programs. The best is probably xLIB; it is an all-inclusive graphic library that integrates graphics into TI-BASIC programs. xLIB xLIB Revolution is perhaps the best xLIB program.

Personally, I would suggest learning machine language for the Zilog Z-80, the processor running 8X calculators, or for the Motorola 68000. Both are very popular processors, the former being used in the Gameboy and for the Sega Genesis's audio, and the latter being the main processor for the Genesis. Because they are so popular, you can find a lot of resources online for using them: much more than with the proprietary TI-BASIC. Plus, it's a low level language, so it's much faster, and grayscale is much more easily obtainable.

The only major downside to ASM is that you cannot type in ASM programs on your calculator; it must be done on a computer. Technically you could enter in binary (and I have a friend who programs in binary on his TI-82, it's really cool), but 1) soooo many errors are possible, and 2) who really wants to enter in 800,000 1's and 0's into their calculator?

Fri Mar 23, 2007 3:36 pm

Uncle Xyzzy wrote:There's a lot of material available online on optimization, for instance, consider the for() coomand


That particular one seems to do nothing on TI-84; both benchmark loops finish at approximately the same time.

Fri Mar 23, 2007 4:10 pm

I have a Ti-83 plus and a Ti-89 Titanium

Fri Mar 23, 2007 5:16 pm

Hunter Lupe wrote:
Uncle Xyzzy wrote:There's a lot of material available online on optimization, for instance, consider the for() coomand


That particular one seems to do nothing on TI-84; both benchmark loops finish at approximately the same time.


Hmm? I did that exact thing on my 84+, and it took significantly longer without the ).

For graphical programming on the 83+, visit this directory. xLIB is in there, as well as smaller, more specialized programs.

For graphical porgramming on the 89T, visit this directory. For some of these (and many programs) written for the regular 89, you will need the HW3Patch and Ghostbuster. Information on using these 2 programs are included with the program.
Topic locked