Particle emitter without lifetime

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bigz94
Posts: 3
Joined: Tue Aug 21, 2012 8:43 am

Particle emitter without lifetime

Post by bigz94 »

Hi everybody

I pretty new in here and have recently startet with irrlicht. But now I got stuck on the particle system of irrlicht. The Problem is: I want to create a background for a space game, which will change when u move around. The Idea was to create the stars with particels. I was thinking I could create a emitter box to create particles randomly and an other box to remove those stars again.
Is this possible?
Thanks BigZ :)

Ps. sry for the bad english :/
theark
Posts: 4
Joined: Tue Aug 21, 2012 3:13 am
Location: West Yorkshire / UK

Re: Particle emitter without lifetime

Post by theark »

Forgive me, if my knowledge of Irrlicht isn't quite up to par, but why would you create another emitter box to remove those stars? Just delete the particle emitter object and that will remove when the level unloads or when you need to remove it, etc etc, or I think you can use a paricle affector fade out to achieve the same effect but don't quote me on that. As for the stars effect, particle emitters are used for rain, smoke, fog. I'm sure you could use it easily to achieve the same effect as your trying.
bigz94
Posts: 3
Joined: Tue Aug 21, 2012 8:43 am

Re: Particle emitter without lifetime

Post by bigz94 »

the thing is; u can move endlessly in the world and I was thinking I could remove the stars on the border of the screen for performance.
And how do u create particles just once and without a timelimite(lifetime)?
theark
Posts: 4
Joined: Tue Aug 21, 2012 3:13 am
Location: West Yorkshire / UK

Re: Particle emitter without lifetime

Post by theark »

I think the whole point of a particle emitter is to emit the particles, if you are drawing them once then you might as well just draw the stars yourself using a 2D image on a plane overlaying the entire scene? In fact, why not add the stars to the image in your image editor, using a particle emitter would mean you wanting a more dynamic approach, so this may not be what your after. I would, personally, draw the entire background image in the image editor of my choice and then loop the background over.

Also, removing the stars on the border of the screen, It would probbaly be more effcient if you just created one, huge set of stars rather then removing, and creating a new star set everytime the player got to the border of the screen.

Correct me if I've for you totally wrong here.
bigz94
Posts: 3
Joined: Tue Aug 21, 2012 8:43 am

Re: Particle emitter without lifetime

Post by bigz94 »

That sounds right, I could do it this way, but to learn it, it would be good to know how I could do something like that. It should be possible I think. I looked around a lot and I think I may have to write my own particel emitter ... do u know some good tutorial homepages, where I can learn how to work advanced with Particles? And thanks for the answers :)
theark
Posts: 4
Joined: Tue Aug 21, 2012 3:13 am
Location: West Yorkshire / UK

Re: Particle emitter without lifetime

Post by theark »

Looking through the Irrlicht documentation would be a good start, but I can't give you any direct tutorials, I'd guess start from implementing the IParticleEmitter Interface. http://irrlicht.sourceforge.net/docu/cl ... itter.html as you can see the IParticleEmitter has various emitter types, ring, box, sphere, so my judgement would be to see about implementing the public methods of that interface in your own inherited class.
Post Reply