Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Reusing particle emitters?

Author
Message
Jogimus
12
Years of Service
User Offline
Joined: 10th Nov 2012
Location:
Posted: 20th Nov 2012 18:48
I'm planning to use particle system to create sparks when object hits a wall, one spark burst should last about 1-2seconds so what is correct way to create such spark bursts.. Do I always create new particle emitter when collision happens (so lots of emitters during gameplay..) or can I somehow reuse just few particle emitters -> how to check when old emitter is free to reuse and how to restart old emitter??
I have tested changing particle params during particle life and that works ok but restarting/recycling particles are bit mystery..
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 27th Nov 2012 11:45
That sounds like a good question to me...

although setparticlesactive and setparticlesvisible would probably be a good way to go about it. having 4 or 5 emitters ready to go.

Since in (my) windows xp takes about 25 second to start a single emitter in the first place...
I have heard that this may only be a problem with ati video cards.

Haven't tested it on the phone or tablet though.
Jogimus
12
Years of Service
User Offline
Joined: 10th Nov 2012
Location:
Posted: 27th Nov 2012 12:08
If I remember right, my test went ok'ish when I just used one particle emitter and was resetting that when needed new sparks to appear.
This worked because I had just short particle burst (0.5s, particle count limit about 10) and I could limit particles from appearing any sooner. By using few particle emitter more recycling should work fine even if couple of particle emitters were alive at same time.

Login to post a reply

Server time is: 2024-11-24 04:55:23
Your offset time is: 2024-11-24 04:55:23