开发者

Simulate text writing using Cocos2d on iOS

I am looking for suggestions on how to simulate the writing of dynamic text using Cocos2d on iOS.

The effect should look as though the text is being written by an actual pen in real time.

My main concern is the best way to convert the text into a path that I can move the pen along.

I really don't want to create my own paths manually. It would be great if I could somehow generat开发者_JAVA百科e a path from a Cocos2d sprite.


I think the best way will be store the path as an array of points. It is really simple to write a small program that will load a font characters image and will be responsible for touch. In touch handler just store the touch position in an xml file. And also store the first touch point as an origin of a character. So it will be an easy way to generate paths.


The last time I had to do that. I resigned myself to create a video with After Effect... (here is a good tuto to do that)
Play it with MPMoviePlayerController and replace the view at the end of the video by your sprite.
The bad thing about this methods is you can't do that on iOS earlier than 3.2 (MPMoviePlayerController can only be in fullscreen mode)

I don't think it's the answer you are looking for but I've spent some time before did that
Anyway, good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜