- Home /
smoke, fire, flame thrower no particle
It seems too be very popular to use particles with smoke and flame thrower effects. we are trying to run our game on ios (eventually) and that means its best avoid particles. I understand you can get away with small particles, but:
A. this not the effect we want, particles have a fuzzy cotton candy look to it, we are doing a cartoon style 2d side scroller. Particles would clash with this style terribly.
B. the game will have high physics demmands on it, so we are looking to chop out any cpu processors wherever we can.
So we are looking for a script that can take an animated sprite,
duplicate several times, have them start from one point and have them slowly spray out while rotating and scaling up the sprites as they get farther away from the emiting point. I need it to have a the flame or smoke trail be able to "whip" eg. changing the direction of the emiting point will only effect the direction of newly created sprites. just like smoke and fire, the sprites should very slowly go up or start to slowly go up a certain distance from the emiting point.
I know this is a long list of needs, but suggestions on any of these behaviors would (few or many) will be appreciated.
I am no stranger to javascript, so links to help me write a script on this are also welcome.
Thanks for your help
What you are describing is still basically a system of particles. Particles are not necessarily fuzzy-looking; if you want you could use them to draw an animated sprite from a sprite sheet without any translucency, even using the default (and legacy) particle emitters/renderers and no scripts.
Personally I've found that on some mobile devices, dynamic geometry can be pretty slow in Unity (which makes dynamic batching and Unity's built-in particle renderers and most sprite frameworks too slow), at least as of Unity 3.5. And moving and rotating and (especially) scaling many separate game objects with meshes attached is even more expensive on mobile.
So far, the most efficient alternative I've found is actually to call Graphics.Draw$$anonymous$$eshNow with a 4-vertex plane mesh once per particle (where each particle is simply a Vector3 and/or a matrix that I update in a loop) inside the OnRenderObject of a game object. It sounds like it should be slower, but it avoids a lot of the CPU overhead that's usually part of Unity's rendering pipeline, and it gives you full control over the particles. But it's kind of advanced stuff to get it right, and regular particle systems are fast enough for many situations even on mobile as long as you take care to $$anonymous$$imize the particle count and overdraw (which btw should be done either way).
Right, particles only have a "fuzzy cotton candy look" if you make them that way.
Answer by VictoryX · Jun 16, 2012 at 07:35 AM
I did a test of my own with a particle system I was able to achieve a decent flame thrower effect while only emitting 30 particles at any given time. It was pretty simple, by just adding a particle system component to my Gun Then using a Sprite sheet I found online as a texture. I messed with some of the emitter options and put in some very basic code to get it going. Below is a link to a video I recorded of the effect and some coding I used.
link not working, can you share again? I want to do exactly what u describe.Thanks
Your answer
Follow this Question
Related Questions
Two Particle Systems 1 Answer
Torch, Particles & Ladder 1 Answer
Create Fireball with fire effect 1 Answer
rendering one particleEmitter over another particleEmitter? 3 Answers
Magic Spell with Particles 1 Answer