i need a particle system with more than one texture to display. did anyone did this already or can someone gimme a hint whats the best way performance wise?
enhance pointparticle sytem and do the draw method twice?
two separate systems?
chhers
A fast, easy to use, free, and community supported 2D game engine
i need a particle system with more than one texture to display. did anyone did this already or can someone gimme a hint whats the best way performance wise?
enhance pointparticle sytem and do the draw method twice?
two separate systems?
chhers
The sample app in the cocos2d source named "ParticleView" is your friend.
hey tjweir
the particleview example contains MULTIPLE particle systems, but i want ONE particle system with multiple TEXTURES
Then why did you write "two separate systems?"
Why not test it and see if the performance is up to your needs?
ok my bad, using two seperate particle systems is a waste of ressources, as the data is the same, only the visual data differs.
i'm trying to extend the pointparticle system, but i'm so bad coding opengl...
I would only start on the particle system that supports multiple textures if running 2 at a time is slow/awkward/fatal.
Running the ParticleView demo on my 2G iPod Touch with all 5 emitters running stays smooth at 60 fps.
Maybe just use two at a time to get going and if things start to slow down, work on the the new emitter.
Only a suggestion, not a directive. :)
A point particle system cannot display more than one texture because it uses point sprites to draw. If you want multiple textures, you'd have to draw the particles as actual quads, which is going to be many times slower than simply having two particle systems as point sprite systems.
That said, it might be useful to create a quad-based particle class that accepts an atlas sheet; this would not only allow you to create multiple textures with a single system, but animate the textures as well (via uv offsets). Either way, these systems would be much slower than point-sprite based systems.
thanks guys for your help.. i guess i just "raped" the particle system - i'll try to reimplement my stuff using atlas sprite.
thanks guys for pushing me into the right direction (again) ;)
That was easier than expected! Cheers for the pointer to initTexCoords Steve.
You must log in to post.