Harry Wilhelm:
(source: https://atariage.com/forums/topic/273248-ti-basic-sprite-games/?do=findComment&comment=3931550 )

Here is a simple demo using moving sprites with nothing but TI BASIC. Press any key to launch the missile. The animated GIF makes the motion somewhat jerky, but it is smooth on Classic99.

There is no CALL COINC, so how do you determine whether the missile hits the UFO? Actually it is not that hard. You set it up so the UFO always starts at the same location and with the same velocity.

The missile always starts from the same location and launches with the same velocity. Then by counting the number of loops before the key is pressed you can determine at the time of launch whether the UFO will be intercepted. If it is a miss then you let the missile fly off the screen. If it is a hit you freeze the missile and UFO together, erase them and set off an explosion. The missile flight is just for visual effect.

Hardly a ground breaking game but it does show some of the possibilities for this technique. A bowling game might be possible using this.

I do not know if the timing would be right on real iron, and I think it would be off with a European TI running at 50 Hz.

100 CALL CHAR(159,"0")
110 FOR I=1 TO 128
120 READ X
130 F$=F$&CHR$(X)
140 NEXT I
150 DATA 0,0,0,0,226,0,215,224,1,40,215,204,216,32,131,78,131,212,215,224,131,212,215,224,1,245,4,224
160 DATA 131,196,2,12,67,0,16,17,7,248,55,215,158,142,0,0,0,64,0,21,8,159,212,0,0,3,33,111
170 DATA 0,0,0,0,0,0,0,0,25,202,81,5,77,0,215,224,131,249,215,204,143,60,212,224,0,5,2,140,67,16,17
180 DATA 247,215,224,0,51,215,204,16,0,212,224,0,166,215,224,0,63,215,224,1,153,115,12,212,204,6,12
190 DATA 22,253,4,91,53,103,0,0,131,80,2,4,5,255
200 CALL CHAR(146,"0")
210 CALL CHAR(147,"0")
220 REM  colors 
230 CALL CHAR(152,"1122334455667788")
240 CALL CHAR(153,"99AABBCCDDEEFF10")
250 CALL CHAR(154,"F0F0F0F0F0F0F0F0")
260 CALL CHAR(155,"F0F0F0F0F0F0F0F0")
270 REM  missile 
280 CALL CHAR(92,"0103030303030304")
290 CALL CHAR(93,"0")
300 CALL CHAR(94,"0080808080808040")
310 CALL CHAR(95,"0")
320 REM  saucer patterns 
330 CALL CHAR(96,"01033FFFDEFF3F07")
340 CALL CHAR(97,"0")
350 CALL CHAR(98,"0080F8FEF6FEF8C0")
360 CALL CHAR(99,"0")
370 REM  explosion 
380 CALL CHAR(100,"0041055000052189")
390 CALL CHAR(101,"2310060110044001")
400 CALL CHAR(102,"80220008806200A0")
410 CALL CHAR(103,"D580248008A00200")
420 OPEN #1:F$
430 REM  saucer 
440 CALL CLEAR
450 CALL SCREEN(2)
460 CALL CLEAR
470 PRINT "HITS:";HIT;"         MISSES:";MISS;
480 REM  missile
490 CALL COLOR(1,12,
500 CALL COLOR(2,8,12)
510 CALL COLOR(3,12,13)
520 CALL COLOR(4,1,9)
530 REM  saucer
540 CALL COLOR(5,2,1)
550 CALL COLOR(6,1,1)
560 CALL COLOR(7,13,1)
570 CALL COLOR(8,1,
580 X=0
590 N=0
600 CALL CHAR(146,"00000000000A")
610 CALL KEY(0,K,S)
620 X=X+1
630 IF X=73 THEN 840
640 IF S<1 THEN 610
650 CALL CHAR(146,"E0000000000A")
660 IF (X<19)+(X>25)THEN 690
670 TOP=106
680 GOTO 700
690 TOP=130
700 N=N+1
710 IF N<TOP THEN 700
720 IF TOP=130 THEN 810
730 CALL CHAR(146,"0")
740 HIT=HIT+1
750 CALL COLOR(3,13,5)
760 CALL COLOR(4,1,16)
770 CALL COLOR(8,1,1)
780 FOR I=1 TO 300
790 NEXT I
800 GOTO 850
810 CALL CHAR(146,"00000000000A")
815 CALL KEY(0,K,S)
820 X=X+1
830 IF X<55 THEN 815
840 MISS=MISS+1
850 GOTO 460

The sprite magnification can be changed in the first DATA line - the 227 can be a value from 224 to 227 for sprite magnifications 1-4.
These are the BASIC lines needed to create the string that does all the magic. Put these at the beginning of your program, then OPEN #1:F$ at the point where you want the sprites to be activated. Remember to CALL CHAR(159,...) before activating the sprites. In the videos I started with F$ already created which is faster, but it uses values that cannot be pasted.

1 FOR I=1 TO 128
2 READ X
3 F$=F$&CHR$(X)
4 NEXT I
5 DATA 0,0,0,0,227,0,215,224,1,40,215,204,216,32,131,78,131,212,215,224,131,212,215,224,1,245,4,224
6 DATA 131,196,2,12,67,0,16,17,7,248,55,215,158,142,0,0,0,64,0,21,8,159,212,0,0,3,33,111
7 DATA 0,0,0,0,0,0,0,0,25,202,81,5,77,0,215,224,131,249,215,204,143,60,212,224,0,5,2,140,67,16,17
8 DATA 247,215,224,0,51,215,204,16,0,212,224,0,166,215,224,0,63,215,224,1,153,115,12,212,204,6,12
9 DATA 22,253,4,91,53,103,0,0,131,80,2,4,5,255
...
420 OPEN #1:F$

Here is a method that gives you up to 4 moving sprites using standard TI BASIC, using nothing but BASIC statements. It is similar to the earlier method that offers 32 sprites but no sprite motion. The challenge in making this work is that if you want to use automatic sprite motion the sprite attribute list must start at v0300. The only way TI BASIC can modify those memory locations is via CALL COLOR. In the color table, the first four sprite definitions cannot be accessed but sprites 5-8 can be. So there will be 8 sprites in all; the first 4 are invisible, the next 4 can move automatically, and the ninth has its row set to >D0 to hide the remaining sprites.

Four character definitions from 144 to 147 are used for the sprite motion table. Since the program is using the color table for sprites then there has to be a new color table. I put it so it can be modified by changing the character definitions from 152 to 155.
As with the previous program that gives you 32 sprites, this one exploits a bug in OPEN that allows 128 bytes to be loaded into the scratchpad. This loads some assembly code that waits for an interrupt and then sets the appropriate registers and VDP memory.
The programs above give examples showing how to set up the sprites and I will also give a short description below.
-----------------------------------------------------------------
CALL COLOR is used to define a sprite.
Sprite 1 is defined with COLOR 1-4
Sprite 2 is defined with COLOR 5-8
Sprite 3 is defined with COLOR 9-12
Sprite 4 is defined with COLOR 13-16
It helps to think in hexadecimal for this. For row and column add 1 to each nybble. For Sprite #1
For a row of >83 it should be CALL COLOR(1,9,4)
For a row of >AB it should be CALL COLOR(1,11,12)
For a column of >83 it should be CALL COLOR(2,9,4)
To set the pattern to use, add 7 to the first nybble and 1 to the second.
To use the pattern for “A” (>41) it should be CALL COLOR(3,11,2)
To set the color of the sprite use the normal color value for BASIC. The first nybble should be 1 if you do not want to use the “early clock” or 9 if you want to set the early clock.
To set the color to white (16) it should be CALL COLOR(4,1,16)
To set the color to dark red with early clock on it should be (CALL COLOR(4,9,7)
If you do not wish to use all 4 sprites you can turn off the first unwanted sprite with a row of >D0 which will hide it and all higher sprites
-------------------------------------------------------------------
CALL CHAR 144 to 147 are used to set the sprite velocities.
144 and 145 are set to zero when “OPEN #1:F$ is executed.
For the sprites we care about:
CALL CHAR(146,”0503000007F9”) sets sprite 1 to row velocity=5 and col velocity=3.
Sprite 2 has row velocity=7 and col velocity=-7
CALL CHAR(147,”FCF4”) sets sprite 3 row velocity=-4 and col velocity=-12
(If the row velocity is positive then motion is downward and if the column velocity is positive then motion is to the right.)
---------------------------------------------------------------------
The new color table is set with CALL CHAR 152-155
I recommend using the values that are in the demo:
310 CALL CHAR(152,"1122334455667788")
320 CALL CHAR(153,"99AABBCCDDEEFF10")
330 CALL CHAR(154,"1010101010101010")
340 CALL CHAR(155,"1010101010101010")
The relocated color table lets you define the colors of all 256 characters. Characters 154 and 155 contain the colors of character sets 1 to 16. Above they are set to black on transparent. (You have to subtract 1 from the TI BASIC color codes.) In the example above the unused characters from 0 to 23 and 160 to 255 have their foreground and background colors set to the same color and that gives you an 8x8 block of all possible colors without using any of the normal characters. You can display these on the screen with HCHAR and VCHAR.
The first character of each character set is:
160 Black
168 Medium Green
176 Light Green
184 Dark Blue
192 Light Blue
200 Dark Red
208 Cyan
216 Medium Red
224 Light Red
232 Dark Yellow
240 Light Yellow
248 Dark Green
0 Magenta
8 Gray
16 White

When programming, do not use characters 144 - 147 or 152 – 155 for graphics because they are needed by the sprite routines and color table.
One thing that might cause some head scratching is that I use a scroll routine in the console ROM to kill some time until the TI comes to the interrupt routine. This happens when OPEN #1:F$ is performed. If you are printing a screen you can use a semicolon at the end of the second to last line, then OPEN #1:F$ and then print the last line.