Typewriter effect

perfectanswerperfectanswer PRO Posts: 121
edited February 2012 in Working with GS (Mac)
Hello,

is there a way to simulate a typewriter effect with text?
I've build it up with animations, but this is just a waste of memory and a mess do to the animations in several languages ;))

thanks for any advise in the right direction
Bernd

Comments

  • LeonardDeveloperLeonardDeveloper Member Posts: 4,630
    Nope... Maybe using the alpha and a timer behavior and having different actors for each letter (That could work)
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    A quick and dirty way might be to simply cover up each word / line and 'reveal' them bit by bit, do it fast enough (and throw in a typewriter sound) and you might get away with it . . . . here's very bad example thrown together in 40 seconds - but if you spent some time doing this kind of thing properly it might work for you.

    http://www.mediafire.com/?iwu3x9niexgvhz3
  • perfectanswerperfectanswer PRO Posts: 121
    Hi Tynan,
    thanks for the example. This works very well if you have background with one color. My problem is a smooth gradient background where you see the "cover actor" moving.
    Maybe there is a way with tables, but every single letter in a different cell, in multiple languages?
    Or is there a way with math and string operations?
    Still open for any advice ;)
    Bernd
  • Rob2Rob2 Member Posts: 2,402
    Or just use a left aligned wrapping display text behaviour that pulls its data from a table. Each cell in the table is the complete text plus the next bit you want to appear. Then just cycle down the cells. The great thing about the display text behaviour is that it updates automatically. Change the value of the expression and the display text automatically does the rest!
  • Rob2Rob2 Member Posts: 2,402
    edited February 2012
    http://bit.ly/wsZKeG vey basic but it may help - just click!
  • perfectanswerperfectanswer PRO Posts: 121
    Hi rob,
    this comes close to my own question/suggestion of putting each letter in a cell.
    Looks like this:
    I
    In
    Ini
    Initi
    Initia
    ....
    Initialize Tracker
    The table idea could work with a timer each 0.3 sec. read a new cell, the timer control the speed of typewriting.
    18 cells for this one ;)
    I have round about 14 sentences, each of around 20 characters. We talk about 280 tiny .png files per language (two at this time) 8-)
    The animation for one language are ready and there is no lag and it runs on iPhone 3G with 50 Frames and 38 MB Memory.
    The animation is time consuming, but looks lot better as the build in text.
    I give this solution a try for one sentence.

    There are no string expressions in the expression editor like a trim function, so this way is a dead end?
    Thanks again for your advise.
    Bernd
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @perfectanswer

    "This works very well if you have background with one color. My problem is a smooth gradient background where you see the "cover actor" moving.

    It was just the method I was illustrating , you would of course need to adapt it to your particular project.

    Here's the same thing in white type on an image / coloured / gradient background (which could be your gradient).

    (Don't forget to turn your sound up, so you can hear the typewriter):

    http://www.mediafire.com/?gtsj2c8jsoxjt1t

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I use Apples motion and to it with a type text behavior and make it 10 frames. Then I can adjust the frame rate in GS.
  • perfectanswerperfectanswer PRO Posts: 121
    This is a great tool, and I don't know it before (shame on me). thanks for this great tipp. This comes also very handy to build up game trailers. For 49$ this is a bargain.
    My decision is using the tables, because there many images for the animation (nearly 300 for one language) kills the loading time of the app. If I disable preloading images, than after choosing some option the framerate drops from 60 to 8fps on a iPhone 4.

    The quality of the rendered text is not so brilliant, especially if I use courier as the font (need this font for a believable feeling on a in game monitor). The animated Text looks much better and I suggest the using of this for smaller animations. The advantage of tables are easy editing if a typo error comes around and easy adding new languages without putting more images to the app and prevent extending the loading time.

    Thanks for all the advices again :D
    Bernd
Sign In or Register to comment.