I need help animating in TI-Basic. I know you can animate using the text( command and the sub-string command but I really have no idea how. I need some help and someone who can really teach me how to do this. Can someone please help me here?? Thanks a-ton Smile


this is for a Ti 84+SE

I am simply trying to make an animation for the opening game screen, and I have no idea how to do it.

NON C. VERSION OF CALC.
Which calculator, and what type of animation? I know the cse has some libraries that can help with animations, but it depends which kind.

If you are trying to slide text across the screen, you can do this:


Code:

For(A,1,260
Text(A,1,"text
; erasing code
End

But thats fairly cruel Razz
What I think you could do for some sliding text would be:


Code:
"[Your text]"->Str1
For(A,1,length(Str1)-[how many letters to display at once]
Text(~1,0,0,sub(Str1,A,A+[how many letters to display at once]
/ Maybe use Text(~1,0,0,"                                           " to erase the text
End


Take a look at this gif. The text is scrolling from right to left here:



Does that help?
Well, I did some testing, and this code should work for all lengths of words.

Code:

ClrDraw
Repeat getkey
For,A,1,94
Text(1,A,"Menu  // Your text goes here
Text(1,A-1,"_
randrandrand
randrandrand
randrandrand
End
End

You can decrease the rands to spead it up, and increase to slow down Smile
However, it can easily be changed. I think it works pretty well. Here is the code:


Code:
"THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT THIS IS A BUNCH OF TEXT"->Str1
For(A,1,length(Str1)-10
Text(~1,0,0,sub(Str1,A,A+10
End
Pause
i could create a fairly complex(ish) one, but it depends on what you want. A simple text slide would work fine if you're not wanting anything too fancy, or you could get a bit more advanced (keeping it pure BASIC) and possibly lose a tiny bit of fps.
Here's an animation of mine, working on a 84+ SE, with MATHPRINT on.




Code:

ClrDraw
Repeat getkey
For(A,1,94
Text(1,A,"Menu  // Your text goes here
Text(1,A-1,"_
randrandrand
End
End
batman: Do you want the text to scroll across the screen the way Unicorn's is, or have it be all in a specific area with the text scrolling in the box? Also, if you use Text(~1,...,...,"Your Text"), you can make the text much larger and easier to read. I recommend doing this for the titles of menus, and not using the negative one for the options so that the title is a larger font size.
I second readroofs suggestion about larger text. You can probably add some Text( commands that make my code look a bit more seamless though.
thanks.
earthnite wrote:
Instead of randrandrandrand ....
You can use rand(4

save some space...

I think this wouldn't work since rand(4 would return 4 random numbers in a list, and randrandrandrand would return only 1, they don't do the same thing... (But I'd have to test it out to know for sure)
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement