Hi All, i am coming from my
Previous Post.
(Be honest, I haven't picked up the native particle engine from Gideros yet...)
Currently, i am using the v16 of TNT Particle Engine.
This time, I do initialize particle first before using subsequently. Everything works well in my desktop. But when export to an android app, i notice a significant lag. (T.T)
Here I attached a mini project for demo.
In my game page, i have around 10 items, with each has the possibility to 'generate 4 types of particle effects'.
self:initTapEffectWave() --1 big wave
self:initTapEffectSparkle() --15 sparkle
self:initTapEffectFlashP2() --3 flash
self:initTapEffectFlashP3() --8 flash |
Here i use the scenemanager which navigates from Home to Game page. And you will notice a lag
during the navigation.
If I only execute initTapEffectFlashP2(), there is no lag at all.
So... my question is, is it i have hit the limits? How should I init so it won't lag? (or minimize it)
My Phone Spec: 2GM RAM
Android: 6.0
P.S.:
The lag also happens during game play. But my mini project only demo page navigation.
Comments
https://deluxepixel.com
Thanks for your info.
Now what i am doing is... kind of 'lazyloading'.
On First rendered, the item hasn't initialized the particle effect until it is first used.
Subsequently, it skips the init with an 'if-else' checking.
With this, it at least removes the lag during page navigation.
Let me know if there is a better way.
https://deluxepixel.com