Lined Up Scrolling Text

I have two pixel matrices one above the other that display text and I want them to be lined up when they scroll across. I know I can separate the two texts into two different timelines then change the timeline rate of one within a trigger.

The problem is when I change the text, I need to also change the timeline rate - which I found is not a linear function.

Does anyone know how the scrolling speed is determined? or is there another way I can achieve this?

  • It's not the speed, it's the width of the text.

    A longer text has more actual pixels, so takes longer to scroll across when at the same rate.

    (Compare this line.)
    (With this With this)

    The function is non-linear because most of the fonts you'd be interested in using are variable-width - the letter "I" is narrower than the letter "W" - and so the length of the text (and thus how long it takes to go by) depends on the actual characters (glyphs) used.

    So this approach basically can't work - you'd need to iterate over the text, work out the width of each individual character etc - and even then you will never get it exactly right so they will 'drift' as time goes by.

    One option might be to restart the scroll at intervals so they run together, pause, run together.
  • Hi Richard,

    I was actually able to come up with a solution, but my proposal ended up not going through. I thought I should post it in case it may work for someone else.

    What I did was I made a custom pixel font by going to http://www.pentacom.jp/pentacom/bitfontmaker2/ and made each pixel letter width the same number of pixels (5 pixels wide in my case). I also made the underscore the same pixel width.

    Then I replaced the spaces within the text string to underscores and padded underscores onto the end so that each string has the same overall length. That way all strings have the same pixel length. With the same timeline length as well, they then all scroll the same speed.

    It worked pretty good too, but some letters such as lower case "i" weren't visually appealing at 5 pixels wide - and I imagine it will be harder the larger the pixel width is.

    The font was the reason I'm back to square one. (get it? square as in pixel? nevermind...)

    - wang2805
Related