User Tag List

Results 1 to 10 of 10

Thread: Proper Text Wrapping With "Typed" Text Effect

  1. #1
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Proper Text Wrapping With "Typed" Text Effect

    Hey guys!

    I am using a very simple event to make dialogue text appear in my game as if it's typed. I just tell the Text Blitter what part of an array he has to show and then I basically do this:

    *Dialogue Event Starts
    -Text Blitter
    Left$(string$( "MyTextStorage" ), Len(Text$( "Main Text" ))+1)

    But this causes a little problem. When a word is too long for a line, it starts getting "typed" at the upper line and as soon as it goes over the border, it jumps down to the next line and continues typing. That looks kinda clumsy and jerky and players already complained about this.

    But how can I prevent this?

    Many thanks!

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I usually do is to let the text type out, note the last word per line, then edit the text with returns. There's probably a programmatic way to achieve this, but it would probably be a bit complicated.


    So the actual string:
    blah blah blah blah blah blah blah blah blah blah.

    would become:
    blah blah blah blah blah
    blah blah blah blah blah.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In general - keep a count of how many characters have been typed on a line, and on encountering a space, insert a newline$ if the 'distance' in characters to the next space would take the line over the limit. You could have that check in a fastloop, or use the String Parser to break the string to display into 'word' tokens...

  4. #4
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you say makes sense, but I have no idea how I can accomplish that with events. Could you explain that in actual event language or make an example for me? I'd appreciate that

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    I just made an example of almost exactly this, for someone on The Daily Click: http://www.create-games.com/forum_post.asp?id=292486

    With a few modifications...
    https://skydrive.live.com/redir.aspx...A!131&authkey=!
    (just copy & paste some text into the left edit box)

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    See what you think of this:

    http://www.whenthereisnoroominhellth...itversion2.mfa

    It's a text blitting example I created using simply active objects and no extensions. It also wordwraps your text.

  7. #7
    Clicker Multimedia Fusion 2 Developer
    Blue66's Avatar
    Join Date
    Jan 2008
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your examples!
    My only problem is that none of those use the Text Blitter object, which I am using a lot and I would like a very basic solution for this so I don't have to change too much of my existing events. Maybe just add a few events or something without the need of replacing every Text Blitter object in my game, which would be a lot

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You don't have to scrap the text blitter object, just use the same method I did for wrapping the text.

    What you do is blit the text 1 character at a time instantly using a fastloop. If a character is blitted past a certain x co-ordinate, then you add a newline$ to the string, and resume blitting from the beginning of the word you just chopped in half. This all happens instantly. Then you can blit the text again at a slower speed because it will have already been wordwrapped. Sorry I am so hungover and tired and I can't explain things very well. My example is commented though, check it out. Happy new year xxxxx

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that example Chris. I have always been curious how people make blitters from active objects. Sadly, I always find that there is no perfect bitmap text solution in MMF that cleanly works with all the runtimes. This seems a little more work, but helps out in the long run.

    Cheers,

    Mobichan

  10. #10
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well, my method DOES work with all run times. If you can show me how it doesn't, I'd love to know.

Similar Threads

  1. "Load text file" from "The Edit Object" BUG?
    By MOBii in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th December 2013, 06:43 AM
  2. how to copy the text content of the "list" on a string?
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th February 2012, 11:30 PM
  3. Adding Return to "Change alterable Text" event
    By Teh_Purple_d00d in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th December 2011, 02:45 AM
  4. Text Blitter 1.5 "Load Image" action not working
    By Strife in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th May 2010, 10:40 PM
  5. "Type Writer" text animation for Dynamite422
    By Game_Master in forum File Archive
    Replies: 2
    Last Post: 18th October 2007, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •