Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Improving the scrolling text  (Read 2229 times)

0 Members and 1 Guest are viewing this topic.

PotcFdk

  • Newbie
  • *
  • Posts: 5
    • View Profile
Improving the scrolling text
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Improving the scrolling text
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

PotcFdk

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Improving the scrolling text
« Reply #2 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?
« Last Edit: September 15, 2012, 12:23:30 am by PotcFdk »

Jove

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://www.jestofevekites.com/
Re: Improving the scrolling text
« Reply #3 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.

{much better code}