playMaker

Author Topic: Typewriting speed (from the demo)  (Read 1702 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Typewriting speed (from the demo)
« on: July 12, 2013, 06:47:36 PM »
Im printing text on the screen, like a typewriter.
Im using EXACTLY the sam approach that is offered in the PlayMaker demos.
Using Get String Length, Send Event, Add Int Int Compare and Get String Left.

The speed of the writing is set by the little delay in send Event, before it loops back on itself.

But its too slow. I guess its connected with frame speed? (Im not achieving very hight frame rates right now, Another one for the TO DO list)
How can I get the text to write faster, and unrelated to frame rate?

I tried Adding more in the Add Int part, (to print 2 letters at once, but this resulted in a Out of range exception error) Was a bit of a botch fix anyway..

Other ways?

Mark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Typewriting speed (from the demo)
« Reply #1 on: July 15, 2013, 02:53:37 AM »
Hi,

 for this ( I had the case last week :)  simply use hotween:

http://hutonggames.com/playmakerforum/index.php?topic=2299.msg10104#msg10104

you can tween a string with this.

 AND, to get a constant typing speed, simply get the number of characters of your string, and multiply it by the amount of time you want per char, and inject that as the time for the tween, and you will get a framerate independant, AND constant writing speed, no matter what is the content.

bye,

 Jean