Spawning Object Clean up: Expensive?



  • I've noticed some delays and lags that look to be timed with spawned object clean up.

    I'm spawning lots of scoring graphics, and they only last a short time, then die, roughly all at around the same time, at which point there's several frames of stutter/lag and slight unresponsiveness to touch noticeable.



  • If they all die at once, you'll see the same toll as if they all spawned at once. Try killing one or two per frame.



  • @Thecheater887 I doubt that's true. I instance them all at exactly the same time... no stutter. No slowdowns, nothing. Not even a hiccup.



  • @Deeeds So maybe destroying objects is slower than spawning them. Either way @Thecheater887’s idea of just not killing them all at the exact same time should work. If you want them to look all destroyed at the same time, make them hide themselves all at the same time, then destroy themselves over a short time, probably one at a time.


Log in to reply
 

Looks like your connection to hyperPad Forum was lost, please wait while we try to reconnect.