SFML community forums

Help => Graphics => Topic started by: PotcFdk on April 09, 2012, 08:13:10 pm

Title: Improving the scrolling text
Post by: PotcFdk on April 09, 2012, 08:13:10 pm
Hey.
I made a fairly simple Text Scroller in SFML2 and I think it doesn't quite cut it.
Currently, it just scrolls horizontally... How could I improve it?
I thought about some kind of "bouncing" while moving horizontally
or something like moving each character individually...
What would be the best approach?

Thanks in advance.
Title: Re: Improving the scrolling text
Post by: eXpl0it3r on April 09, 2012, 09:56:23 pm
I think we had enough textscrollers back in the days, I don't know if many would appreciate those eye cancer texts. ::)
But if you want to get one anyway, I don't think SFML's sf::Text etc. is the best way, since you'd have to be able to deform the characters. Maybe a shader could help there but I've no experience in that direction.
If you just want a bouncing text without deformation you could move each character on its own.
Title: Re: Improving the scrolling text
Post by: PotcFdk on April 15, 2012, 05:54:20 pm
Thank you for replying, eXpl0it3r.
Moving each letter individually shouldn't be that hard.
How about deformation? Vertex Shader? Are there tutorials?
Title: Re: Improving the scrolling text
Post by: Jove on May 12, 2012, 04:48:02 pm
I made a class called SpriteText which is similar. Each character is an individual sprite, taking its texture subrect from a sprite sheet containing all the characters.

Applying different transformations across each character sprite can yield some interesting results.

You could probably acheive the same using sf::Text, but I went with sprites because I'm more familiar with them.