MattBrooklyn Posted October 10, 2014 Share Posted October 10, 2014 Hi all, Been playing around with Phaser for a couple months now; really like it! This might be more of a general game dev question, but either way I'm still wondering if anyone might have any insight on the following: Which would be expected to perform better on mobile? Tweening the properties of a sprite/image, or animating through the frames of a sprite to achieve a similar effect. For example, which would perform better?a. Tweening the alpha, scale, tint of a spriteb. Animating a sprite through frames that look similar to the above described tween Thanks for the help, and thanks for this great community. Matt Link to comment Share on other sites More sharing options...
rich Posted October 10, 2014 Share Posted October 10, 2014 Hi Matt Animation, definitely - depending on texture size though. As all it has to do is update a single draw call and not alter the transform. Link to comment Share on other sites More sharing options...
MattBrooklyn Posted October 10, 2014 Author Share Posted October 10, 2014 Thanks Rich. So then, would you say the same might apply to particles? If all I want is a simple particle explosion, would I get better performance by animating through the frames of a sprite with a rendered explosion, rather than use particles? Link to comment Share on other sites More sharing options...
rich Posted October 10, 2014 Share Posted October 10, 2014 A texture based animation will always be faster than actual particles, yes. But it's a trade-off. If you use too much memory with too large textures, then you'll cripple your game by exhausting device RAM. But on a technical level, yes, definitely faster. Link to comment Share on other sites More sharing options...
Recommended Posts