I'm trying to create a smooth scrolling message similar to Train Tracking. The problem is I begin printing at the right side of the screen of course and let the message scroll left, but I only want to display 100 characters at most since it slows down if you print the whole message every loop. The problem comes when the initial text goes off the left side of the screen and I crop it so that all the begining text is not printed and only 100 characters from the middle are printed.
The text starts getting jittery. I think the reason is because I'm using modulus to get a set point of where the text will be printed. So everytime the text moves left one full character I reset the text to be printed from 0 and then let it slowly move to being printed from -8 before reseting again. 8 is the width of one character on the FonTEXT virtual HUD. So evertime the total scroll distance mod 8 = 0 I reset my current scroll back to 0 and then decrement to -8 and print 100 characters.
Does anyone have a better method? I'm sure someone does since I've seen this sort of thing a few times before.
The text starts getting jittery. I think the reason is because I'm using modulus to get a set point of where the text will be printed. So everytime the text moves left one full character I reset the text to be printed from 0 and then let it slowly move to being printed from -8 before reseting again. 8 is the width of one character on the FonTEXT virtual HUD. So evertime the total scroll distance mod 8 = 0 I reset my current scroll back to 0 and then decrement to -8 and print 100 characters.
Does anyone have a better method? I'm sure someone does since I've seen this sort of thing a few times before.