How do I efficiently do a text wipe effect?

0 favourites
  • 5 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • OK so we've all done the typewriter effect with our text. It's nice, but sometimes it's not what you need. I'm looking to do something similar to how text is displayed in the game Dragon's Crown. Example: https://youtu.be/6hIlfSCP0zI?t=5m15s

    Notice how the text is almost displayed in a typewritery manner, but it's really wiped onto the screen? Or maybe a better way of saying it is it's faded into view. It's not a harsh typewriter, but rather a wispy, flowing text. Now I did figure out how to do this. The thing is, it's not efficient at all. It involves calling upon a "wipe" bullet sprite and having it destroy when it hits something. Using it once or twice is ok, but to use it for all of the text in the game is just outlandish. For example: https://dl.dropboxusercontent.com/u/62554382/CAPX/TextWipe.capx

    Notice how it's not really the BEST way of doing it? imagine doing that for all your text in a game. No bueno!

    I did some research on my own, and although I haven't come across the solution, I think I might be getting somewhere. I know that a sprite font will have to be used. There's no way this can be done properly with a simple text object. I found this tutorial on sprite fonts: https://www.scirra.com/forum/suggestion-sprite-font_t62663, but the thing is, I didn't completely understand how it works. I tried plugging in a fade-in function at certain points, but the best I could muster is getting all of the text to fade in at once.

    How do I do this fade in/text wipe efficiently?

  • Why would it be outlandish?

    Wouldn't it just be calling a function every time a text is either created or changed?

    I guess for creating an effect like this some sort of masking is the only visually satisfying way.

    Instead of using a sprite with bullet behaviour you might opt for a 9-patch object and chance it's width.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'd probably go with a mask with spritefont to get that exact effect.

  • Thanks for the feedback! Maybe I'm still thinking inside the box. It looks like I need to rethink my process if I were to use a function. My thoughts on it being outlandish were having to recreate the "wiper" at exact spots all over the layout. Maybe I can pull the XY value of the text object I use every time the function is called, and maybe instead of destroying the wiper, I cam have it go off-layout until I'm ready to use it again. I need to do some serious thinking on this one.

    Not much experience with 9-Patch. I guess it's time O familiarize myself with it. Thanks again! If y'all have any more ideas while I'm trying to figure this out, please let me know.

  • Masked Text Reveal

    Been a while since I played with masks and couldn't get it working right with a coloured background. Brain drained tonight and didn't have enough time to toy with it. Hopefully you'll have better luck. It's a start at least

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)