I'm curious about the best way to do what I want to do. (It's a 2D game)
On my game, I need to spawn lots of enemies, when each one dies, they will spawn some Xp particles, in order to do this I need to instanciate the XpParticle
scene. What I am looking for is the best way in terms of performance and a clean code, but I don't really know how the engine will handle.
Using autoload I made a global instance, so each and every node can see it, but turns out that the only way I can create other XpParticle object, is to duplicate()
the global scene, what some people said is bad.
The other way around that I know about is to preload()
the scene on each different enemy of the game, what i think that might consume more performance as the game needs to handle more and more objects.