Game Development Community

Bullets + particles eating fps ..

by Trevor "PointDestruction" · in Technical Issues · 11/17/2002 (11:36 am) · 9 replies

Alright, currently I have guns that fire projectiles that each have a particle emitter on the bullet. However, this seems to be eating fps immensly when bullets fly in the air. 5 or 6 does fine, but when you get more than that, the fps shoots down fast.

Any ideas on optimization?

#1
11/17/2002 (11:47 am)
if you Must have an Emitter on the round ..
your going to have to Really tune this emitter down.


that's crazy .. and no automatic weapons either.

start with your Emitter doing nothing ..
then slowly increase the timing values
#2
11/17/2002 (12:02 pm)
ok, I took off the particle effect completelly and there was like ... no fps decrease at all - so its definitally the particle emitters.

What do you mean slowly increase the time?
#3
11/17/2002 (12:26 pm)
under particleData, change this to a low setting:
lifetimeMS      = 1000;
(this would equal 1 second lifetime)

--Eric
#4
11/17/2002 (12:43 pm)
i'm currently on 500 ... which simulates the effect I want but as I said, its immensly eating up fps when more than 6 on the screen.


Is there some sort of a code we could put in the engine to ... make a line from the person rendering the particle emitter to where the emitter is, and if the line is over a defined length, dont render it?
#5
11/17/2002 (12:48 pm)
That's odd that is happening with only six shots. What card do you have?

Also, if you haven't already, you may want to implement this.

--Eric
#6
11/17/2002 (1:27 pm)
Raise the ejectionMS on the emitter so it emits less particles.
#7
11/17/2002 (1:34 pm)
well I have a geforce3 ... unless its going bad or I have too much stuff open ... I have tons of things open when I test :/
#8
12/13/2002 (5:43 am)
try useInvAlpha = 1; or useInvAlpha = 0;
one way adds colours to white, the other just levels them - some FPS differences in different situations.

less fading too, many translucent layers = slower, solid is faster
#9
12/24/2002 (6:56 pm)
for bullet trails try something like a couple white particles trailing the bullet, it works well if done right. make it so the bullet trail just holds stiull and doesn't go up or down. creates a matrix effect and work nice, no major fps deletion.