Forum


Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: An efficient way to handle lots of particle emitters?
Ozkar619
Newbie
Posts: 3
Permalink
Post An efficient way to handle lots of particle emitters?
on: August 13, 2012, 10:31
Quote

Hi!
First of all, I wanna thank you for all the support and engines you do to support the Gideros Developers.
I've been working with Gideros since a few months back and now that I have a halfay finished game, I wanted to give tnt particles engine a try.

It is awesome, I must say. Really intuitive and flexible.

But I know I'm doing something wrong when implementing it.
I'm currently working on a project, where the player needs to fix a boat, by pressing the holes that suddendly appear.
At the first levels, the particles engine works perfectly, but when advancing into the game, I'm having trouble handling 60+ emitters. They're small ones, about 60*60 px and they only do a max of 20 particles. But it get's really slow and it messes with the gameplay. I know I must be doing something wrong, so is there an efficient way for handling that kind of quantity of particle emitters? Or am I pushing the phone to much?

The way I'm doing it is creating an emitter with it's particles in every hole init function, and then starting it and stopping it every time it's needed.

Well, that's the little problem I'm triying to fix. I hope there's a way.
Thanks in Advance.

Oscar Obeso.

gregbug
Administrator
Posts: 19
Permalink
Post Re: An efficient way to handle lots of particle emitters?
on: August 13, 2012, 18:12
Quote

Quote from Ozkar619 on August 13, 2012, 10:31
Hi!
First of all, I wanna thank you for all the support and engines you do to support the Gideros Developers.
I've been working with Gideros since a few months back and now that I have a halfay finished game, I wanted to give tnt particles engine a try.

It is awesome, I must say. Really intuitive and flexible.

But I know I'm doing something wrong when implementing it.
I'm currently working on a project, where the player needs to fix a boat, by pressing the holes that suddendly appear.
At the first levels, the particles engine works perfectly, but when advancing into the game, I'm having trouble handling 60+ emitters. They're small ones, about 60*60 px and they only do a max of 20 particles. But it get's really slow and it messes with the gameplay. I know I must be doing something wrong, so is there an efficient way for handling that kind of quantity of particle emitters? Or am I pushing the phone to much?

The way I'm doing it is creating an emitter with it's particles in every hole init function, and then starting it and stopping it every time it's needed.

Well, that's the little problem I'm triying to fix. I hope there's a way.
Thanks in Advance.

Oscar Obeso.

Hi Oscar!
thanks for using my libs.! :)

about your problem it seems to me that it's a memory leak issue! (but it's hard to say without sources)

you said that at first levels particles works fine... so i think is not a problem of "phone cpu power"

when change levels are you freeing all particle and emitters (and all references) ?

let me know...

ciao! :D

Ozkar619
Newbie
Posts: 3
Permalink
Post Re: An efficient way to handle lots of particle emitters?
on: August 14, 2012, 01:26
Quote

It seems that it's a Scene Manager Problem. I remove all the elements from the containers, and then I collect the garbage, but I don't know why they are still consuming resources (I figured this out when I lost in a level, and then by playing it again I noticed my life was going down even when I fixed up the visible holes). I'm gonna check that problem again; also I don't set free the unneeded emitters (I thought i was enough with stopping them).
Thanks for the answer, I'll keep you informed if I fix the problem!

btw: "thanks for using my libs"? Thanks for making them!! :D

Oscar Obeso.

gregbug
Administrator
Posts: 19
Permalink
Post Re: An efficient way to handle lots of particle emitters?
on: August 14, 2012, 17:55
Quote

:) hope to see soon your game published

Ozkar619
Newbie
Posts: 3
Permalink
Post Re: An efficient way to handle lots of particle emitters?
on: August 15, 2012, 11:16
Quote

Hi! Just to inform that the Memory Leak Problem is death! :D! and The particles seems to work much better now. Either way I still have little (tiny) performance issues when handling 60+ emitters. Not as notable problem as before (it slightly affects frame timing) but I'm blaming my phone on that. Thanks a lot for the tip (:!
Have a great day!

Oscar Obeso

Pages: [1]


Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.306 seconds.