|
Post by u9 on Oct 28, 2006 20:27:04 GMT -5
Hi, I think it would be a very good idea to be able to move the entire particle system. Not just the current placement of the emitter like you can now with fx.setxy Check out my space shooter: brutus.pewtersoftware.com/upload/files/SpaceShooter_v0.01.rarNow, as the level is larger then the screen, i scroll the background image when the spaceship moves to create the illusion of a camera following the spaceship; and as such i also need to scroll the particles that already have been emitted. You can see what happens by trying the demo. If you continue in one direction with the same speed, you see how i would like it t look, but as soon as you change direction, or slow down/speed up, everything just looks (and is) wrong. So the ability to move the entire "system" would be greatly appreciated. I hope you can do this as soon as possible If not, let me know, 'cause then I'll have to implement a particle system myself gulp!!
|
|
|
Post by Guilect on Oct 29, 2006 10:08:12 GMT -5
I ran your demo, and see what you mean.
But, I would hesitate to make any changes to the particle system because it is behaving exactly like particles and emitters would in real life.
If a particle is emitted going in a particular direction it should stay going in that direction for the remainder of its life.
That is what is going on in your program.
The issue is that the particles life's are so long that they linger around in space after your ship has made an abrupt turn. So you can make the life of the particle shorter (a smaller alpha value), and have them updated more often. It will take some playing around with but something like this is closer to the effect you are looking for, no?
fx.setcolor emitter, argb( 125, 60, 100, 210 ) ' Alpha = duration fx.setrate emitter, 30 ' Emission speed. Higher = slower
|
|
|
Post by u9 on Oct 29, 2006 14:22:01 GMT -5
Try to imagine that the view port (the window) is a camera. Now the playing area is suppose to be 10'000x10'000 pixels and when the demo starts the spaceship is positioned at (1000,1000) so therefore the camera has to be moved there in order to be able to see the spaceship. You can even see the camera coordinates displayed on the screen. That is what happens when the demo starts. Now of course all this is simulated, e.g. by using the TileImage command instead of having an image 10k by 10k pixels in size, I can just let TileImage keep scrolling and it gives the effect of the camera moving toward the spaceship. Now obviously I need to move any emitted particles when ever the camera moves, otherwise these particles will appear to stand still on the camera lens (or move slowly in the direction they are shot). The fact that the spaceship can turn so quickly can make the effect look weird, yes, but try flying in a very large circle, and you will still see particles shoot out the side of the spaceship, which is an effect of the camera moving (the background, while the particles cannot). I haven't tried to adjust the parameters that much because as the camera can move very quickly there will probably always be artifacts. To put it another way, I need the particles to stay fixed to the background, which can change direction while the particle still is alive. I not only need it for the engine-thrust, I also want to create explosions which will die out much slower, e.g. when blowing up other spaceships. I was even thinking of making a missile-trail using a particle emitter, which also has to stay fixed to the background. I hope you get the idea now
|
|
|
Post by Guilect on Oct 29, 2006 16:22:20 GMT -5
I understand now.
I will see what might be done.
|
|
|
Post by u9 on Oct 29, 2006 16:35:26 GMT -5
Try this version of my spaceshooter and you can see the effect when the other spaceships pass you by and you are flying around. Their trail... well just have a look. It's a bit difficult to explain
|
|
|
Post by u9 on Oct 30, 2006 16:32:27 GMT -5
I just noticed a bit of a problem with the particle emitters. Whenever they are off-screen, they don't emit particles. The problem is that when the emitter comes back into the screen region, it is as if it has built up so many particles to emit, that it bursts all of them in one go. Try version 0.03 of my space shooter and you will see that when the space stations come into the screen there is a short burst of particles before the emitter returns to a steady flow. Could you look into this? I think there should always be a steady flow of particles. No bursts. Let me know if you don't see the bursts. UPDATE: I just noticed, it is only when the space station come in from the bottom or right of the screen that there is a burst. Download: brutus.pewtersoftware.com/upload/files/SpaceShooter_v0.03.rar (~193kB)
|
|
|
Post by Guilect on Oct 30, 2006 17:42:21 GMT -5
There is a line of code in the particle FX code of B2D that basically says if the particle goes off the screen then reset it. This was done for rain and snow effects as their particles never die. The only time they get reset is when they go off the screen.
And this never seemed to be a problem for other types of particle FX because it was assumed that they would be used on screen.
I looked briefly at the code and logic can be added to have the above condition only apply to rain and snow FX. I just hope it does not add to much over head. We'll see.
|
|
|
Post by Guilect on Oct 30, 2006 19:56:27 GMT -5
Fixed issue reported regarding FX being off the screen as shown in SpaceShooter V0.03
|
|