Kovak / CBL_SECRET_PROTOTYPE_RUNNING_GAME

0 stars 0 forks source link

20 improve particle emitter a #44

Closed sbrother closed 11 years ago

sbrother commented 11 years ago

Particle Effect creation now takes place only once. I had to add a Clock.schedule(_update) to ParticleSystem.start() so that the program could re-use each effect.

Obviously this has the side effect that the game can only use one of each type of effect at the same time. That's alright for now (and we get a serious performance and memory gain from only instantiating one of each type of effect) but if we want to use more effects in the future, we should add some kind of add_new_effect() method to ParticleEffects.

sbrother commented 11 years ago

Oops, I am sorry - I appear to have accidentally based this branch off 42-optimize-sound-a instead of master_candidate. If you guys want to merge this one but not the sound updates then I will have to re-do these changes on master_candidate. I think both branches are pretty uncontroversial though so I'm not going to bother doing that unless needed.