This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Author Message
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 03 Jan 2004 03:25:50 pm    Post subject:

To make this work well you would need a program that knows the width of every token in the small font.
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 03 Jan 2004 08:15:52 pm    Post subject:

in order to delete all of the dots, the calc must know how much to delete, the lower case (also the smallest font) can range from 4-6 dots i think

if this is in basic, dont expect a speed demon, just use caps and let the letters delete each other, deleting the last 4 dots at the end.
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 03 Jan 2004 08:23:37 pm    Post subject:

I don't know what he means. But do you want a program that scrolls the same thing over and over or something that you can input what its going to say? Also, are you using Text( or Output(? The basic idea (using either one of those) is to have it display on the bottom left of the screen, deleting the rightmost letter, then clearing by putting a space or two at the very end. Let's say you want it to scroll "HELLO MY NAME IS JEDD ." This is what you would output:

Output(8,1,"HELLO MY NAME IS
Output(8,1,"ELLO MY NAME IS "
Output(8,1,"LLO MY NAME IS J"
Output(8,1,"LO MY NAME IS JE"
...etc...

This should work, but I havent run the code yet. Hopefully you get the idea. If you want to use Text(, then its a little different and more complicated.
Back to top
ducttape_87


Member


Joined: 01 Jul 2003
Posts: 141

Posted: 03 Jan 2004 09:45:40 pm    Post subject:

put the text into a string. Display parts of the string with sub(string#
Just increase the starting position and and keep length of text being displayed the same. Erase the whole section where text is displayed each time.
You will have to play with it to get it to stop, or loop right. Strings can be frustrating, at least for me.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 04 Jan 2004 01:48:40 am    Post subject:

Ok, I got a pretty speedy ticker to work. This will work for lowercase too, but I discovered that if you have any lower case "w"s you have to increase the number of spaces at the end of the string to 5. (All of the other letters in Text( are only three pixels wide)

"THIS IS A PRETTY FAST TICKER. Lowercase works too.(3 (or 5) spaces)->Str1
For(A,1,length(Str1)-1
Text(57,0,sub(Str1,A,length(Str1)-A+1
End

I noticed that at least on my calc, it seemed a little blurry, so you might want to add a For( loop. I think it looked alright with a For(B,1,10:End between the Text( and the End.

Let me know what you think, I (or someone else) can probably tweak it to what you're looking for.

Spyderbyte
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Jan 2004 04:39:27 pm    Post subject:

That works. But the problem with it is that a string like "sin(cos(tan(sin(cos(tan(" will scroll faster than something like "! ! ! ! ! ! ! ! ! ", because the first string will scroll the whole sin or cos at a time. If you are going to be outputting normal text that isn't likely to be a problem. What I had in mind was scroll it 1 pixel regardless of the size of the token, which would mean you have to know the size of the token. For the program Spyderbyte posted above, you can use Ans instead of Str1 because none of the instructions affect Ans.
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 04 Jan 2004 05:12:43 pm    Post subject:

Or if you want to use Ans, but still have room to add on stuff that will affect it, just put:

Ans->Str1

That way you can use the program like this:

"RUSSIANS ARE FLYING SPACECRAFTS IN THE NEVADA DESERT":prgmTICKER
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Jan 2004 05:25:41 pm    Post subject:

Jedd wrote:
"RUSSIANS ARE FLYING SPACECRAFTS IN THE NEVADA DESERT":prgmTICKER

It wasn't in Nevada actually that we were flying planes. Smile
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 04 Jan 2004 08:08:06 pm    Post subject:

Newbie wrote:
How would you add the text, in order for it to work?

Just replace the first line with a quotation mark, your text, three spaces (or five if your text includes a lowercase w),then ->Str1

Quote:
That works. But the problem with it is that a string like "sin(cos(tan(sin(cos(tan(" will scroll faster than something like "! ! ! ! ! ! ! ! ! ", because the first string will scroll the whole sin or cos at a time.


Yes, and it scrolls a little unevenly through spaces too, but I figured that was a pretty small price to pay for speed. Especially when the ticker is likely to not be the main focus.

Probably the easiest (and definately fastest) ways to get a smooth scrolling ticker is to write a small asm program that just outputs the whole string at all times and just moves it over. At least when I was experimenting with pixels in ASM, there weren't any domain errors, so you should just be able to output the beginning of the string way off the side of the screen.

If I run into some free time, I might experiment with that....

Spyderbyte
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Jan 2004 08:09:22 pm    Post subject:

And how exactly are you going to get negative numbers with Asm? -1 will be interpreted as a big (Edit: 255) positive number.

Last edited by Guest on 04 Jan 2004 08:22:56 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Jan 2004 08:18:31 pm    Post subject:

Jedd wrote:
Or if you want to use Ans, but still have room to add on stuff that will affect it, just put:
Ans->Str1

What exactly do you want to do with Str1 that you can't do with Ans? I see no problem with just using Ans and never storing to Str1.
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 04 Jan 2004 09:20:44 pm    Post subject:

I was thinking then the string wouldnt get erased once you get back to the main program. But for our purposes, yes, you might as well use Ans.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 04 Jan 2004 09:25:24 pm    Post subject:

Quote:
And how exactly are you going to get negative numbers with Asm? -1 will be interpreted as a big (Edit: 255) positive number.


Well I suppose that would be a slight problem. Very Happy I had just noticed that when I made a simple program that moved a dot around with the arrow keys, you could scroll off the sides and not get a domain error. It didn't occur to me that it was actually displaying the dot way off to the right (or top (or is it bottom? It's been quite a while).

Quote:
Quote:
Or if you want to use Ans, but still have room to add on stuff that will affect it, just put:
Ans->Str1


What exactly do you want to do with Str1 that you can't do with Ans? I see no problem with just using Ans and never storing to Str1.


I think he meant in case you wanted to add a few calculations or something else that would affect Ans.

Spyderbyte


Last edited by Guest on 04 Jan 2004 09:26:57 pm; edited 1 time in total
Back to top
Toksyuryel
Crimson Dragon Software


Elite


Joined: 14 Jun 2003
Posts: 880

Posted: 05 Jan 2004 07:34:07 pm    Post subject:

If text() is scrolling either right-to-left or top-to-bottom by one pixel at a time it will require no clearing.

My $0.02.
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 05 Jan 2004 08:01:41 pm    Post subject:

http://www.ticalc.org/archives/files/fileinfo/312/31206.html


Code:
:DCS
AA55AA0055AA5500
:END
0?X
Str0?Str2
While getKey=0
X-1?X
Text(57,0,Str0
sub(Str0,1,1)?Str1
sub(Str0,2,length(Str0)-1)?Str0
If Str1?"
Then
"   "+Str0+Str1?Str0
4?X:End
If X?0
Str0+Str1?Str0
End:Str2?Str0
ClrHome
Disp "SCROLLTXT v2.0","BY KERM MARTIAN


Last edited by Guest on 05 Jan 2004 08:05:09 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 06 Jan 2004 08:45:58 am    Post subject:

JACstudios_ceo wrote:
If text() is scrolling either right-to-left or top-to-bottom by one pixel at a time it will require no clearing.

My $0.02.

And from right to left you can just add " " to the end of the string, you could even add multiple if you're moving the text by more than 1 pixel.
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 06 Jan 2004 04:31:14 pm    Post subject:

Newbie wrote:
Spyderbyte can you make the code out because what you put does not make since?

Sure. Ok, so this will make "Your text here" scroll. Since you said this was going to be in all caps, you can forget about my clumsy explaination involving w.

Quote:
"Your text here.   "->Str1
For(A,1,length(Str1)-1
Text(57,0,sub(Str1,A,length(Str1)-A+1
End


Just substitute whatever text you want for the blue part, but be sure to leave three spaces before the ending quote. (This is to erase the trail.)

If you think that scrolls too quickly, you can change it to:

Quote:
"Your text here.   "->Str1
For(A,1,length(Str1)-1
Text(57,0,sub(Str1,A,length(Str1)-A+1
For(B,1,10
End

End


If you change the 10 to a higher number, it will scroll more slowly. Likewise, lower equals faster.

Feel free to ask any questions, and for the moment you can forget about the other stuff I've said.

Spyderbyte


Last edited by Guest on 06 Jan 2004 04:31:42 pm; edited 1 time in total
Back to top
Jeremiah Walgren
General Operations Director


Know-It-All


Joined: 24 May 2003
Posts: 1937

Posted: 09 Jan 2004 08:42:19 pm    Post subject:

This probably isn't what you're looking for, but I simply put a space at the beginning or end of the string I'm scrolling - depending on which way it's going.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 09 Jan 2004 08:56:52 pm    Post subject:

use either a loop, or labels.
Back to top
Jeremiah Walgren
General Operations Director


Know-It-All


Joined: 24 May 2003
Posts: 1937

Posted: 09 Jan 2004 08:59:42 pm    Post subject:

I believe that'd work. If you really want speed, learn to write it in asm. Although, a friend of mine who's good at programming 83 basic wrote a few tutorials. He did something similar to what you're asking in one of his games. I'll see if I can find it... (No guarantees.)

Edit: http://crystae.homeip.net/~xathien/tutorial.html Check them out, see if they help you any.


Last edited by Guest on 09 Jan 2004 09:10:02 pm; edited 1 time in total
Back to top
Display posts from previous:   
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
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are UTC - 5 Hours

 

Advertisement