Best way to reuse objects

Get help using Construct 2

Post » Fri May 02, 2014 3:42 pm

Hello, I would like to know whats the best way to reuse objects (sprites).

For example on a infinite scroller, some enviroment is destroyed when it goes off screen but it has to be spawned again. Another example is for enemies, when they are thestroyed but should be respawned.

So whats the best for performance, specially on mobile. Should I destroy them and create them again, or should I make them invisible and then move them to a new location and make them visible again?

Thank you.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Fri May 02, 2014 4:08 pm

I usually destroy and recreate, but I don't know if it matters that much which way you do it. Be interesting to hear from some of the smarter folks on this :).
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,667


Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, brunopalermo, kellehk, R0J0hound, ST314 and 25 guests