开发者

How to use particle effects in view based application?

How to use particle effects in view based application?

I have created a game using view based application and I want to use开发者_JS百科 a particle effects in my game. But, I don't have any idea about using a particle in view based application.

Please give some/any idea.


In generally... you can't. Use fullscreen GL for regular particle effect.

Particle effect requires massive count of sprite drawing and alpha blending. You can do this with GL, however, a GL view cannot be overlay over other UIViews.

Normal UIView is implemented with backing CALayer. This is a kind of GL drawing, but optimized for smooth animation of low density UI, not for massive drawing count. So it's performance is too low and unacceptable for particle effect.

I tested CALayer based particle, and 128 particles were max fps with meaningful fps in 3GS.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜