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 / Particle Explosion

Author
Message
Doz
16
Years of Service
User Offline
Joined: 16th Apr 2008
Location:
Posted: 24th Aug 2011 06:47
So, unfortunately, the example in the help files isn't close to what I'm looking for, not even sure if we can do it. Basically I want an immediate burst of particles(100+ in a frame if I can get it), but the emitter doesn't seem to let me go for any time less than a second. I feel like I've played around with every setting but I'm probably missing something simple, anyone have an idea how I can make this work? Thanks.

Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 24th Aug 2011 16:05 Edited at: 24th Aug 2011 16:08
Just use an animated sprite, it's less CPU intensive and free's up resources and makes your game more battery efficient.
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 25th Aug 2011 01:50
First of all, I don't have the AppGameKit yet (I plan on getting it soon ) so this is going by the documentation only.

However I've been going over the particles commands and I think I see how you could accomplish that.

You could create a particle emitter and set its frequency to some ridiculously high number, 20000 for instance...

Then set the max number of particles for the emitter to 100.

The emitter will create your 100 particles in one frame and then stop creating new particles.


Example:

CreateParticles( ID, x, y )
SetParticlesFrequency( ID, 20000 )

Be sure to limit the max number of particles for that emitter to 100 or you'll have an out of control emitter pumping out 20000 particles per second.

SetParticlesMax( ID, 100 )


And that should do it...
Doz
16
Years of Service
User Offline
Joined: 16th Apr 2008
Location:
Posted: 25th Aug 2011 04:51
@Grumpy Jedi, thanks for the suggestion, it was closer to the effect I wanted but still not quite there. I think I'll be going with the sprite method Daniel recommended.

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 25th Aug 2011 11:48
If you get a decent looking explosion, would you mind posting a screenshot or two? Without additive blending, I'm struggling to get something I like the look of.

Login to post a reply

Server time is: 2024-04-19 17:14:19
Your offset time is: 2024-04-19 17:14:19