Is there any way at all to create sprites on an 89 that you could manipulate, like to create a game. The best I could do was a circle and a dot.
Have you tried reading through the sprites page? That sounds like it would be of some help.
Also, let me say Welcome to TI-Basic Developer! Please feel free to become a member, and to frequent the forum. We would love to answer any programming questions that you have, or whatever else that you want to talk about.
Ahh, didn't see that. Thanks.
I just read the page and it only contains techneques to display sprites. I just want to know how to create them. Sorry if my request is considered stupid or unexperieced as I am new to TI programing.
Are you just talking about using the graphics commands to draw an image on the screen?
Yes. But be able to move it also.
Well, draw it once, then store it to an image, then erase/redraw in an organized fashion to create animation.
If you create a single image file that comes with the program containing every image used, then storing each one to an image using coordinates.
To draw a picture…
1. Press [DIAMOND] + [F3] to get to the graph screen (you may want to turn your functions and axes off)
2. Press [2ND] + [F2] for a list of tools you can use to draw. Pencil inverts the pixel. Eraser erases a small area. Line draws a line. Etc.
To save your picture…
1. Open that same menu ([2ND] + [F2]) and choose the last one, Save Picture
2. Choose the boundaries of your picture and press [ENTER]
3. Enter the file name + folder
To display your picture in a program…
This is all covered on the sprites page burr posted.
To draw stuff in a program…
There are many commands to draw lines, circles, and other stuff on the graph screen, which will be covered on the Graphics page once we finish it. Here are some:
- Line
- LineHorz
- LineVert
- PtOff
- PtOn
- PxlOff
- PxlOn
For the syntax, check out the full TI-89 manual on TI's website.
To move a sprite…
Here's a basic structure you can use:
1. Draw the sprite at current coordinates (store them in variables)
2. Use the getKey() command to figure out which key a user has pressed
3. Clear the sprite off the screen
4. Change the coordinates of the sprite based on keypress
5. Go back to 1
