Particle System Slow-Down

Started by
10 comments, last by g7tommyB 21 years, 7 months ago
Well just a few notes here for particle preformance.

#1. Don''t calculate the particles camera transform for each particle. Do it for the first particle then use this value and apply it to all the other particles. This should improve preformance quite a bit.

#2. Linked lists aren''t exactly the best to use in this situation, because if you set a particle to "dead" you still have to iterate through it to find the next particles address. A dynamic array that''s calculated on startup should improve preformance a bit. Remember don''t delete your particles just set them to "dead". Dynamic allocations/frees eat alot of CPU time.

#3. Make sure your caching the texture your using for your particles don''t load a texture from a file durring the time your particle systems running only on startup. (yes I know this is a stupid point but you''d be amazed at what people do). File IO is very slow.
Advertisement
Well,
I was debating whether I should post this or not - but I decided to do it, so that you guys may have a good laugh at me...
While designing my particle system, I was logging various parameters to a file and completely forgot about removing the logging. It was logging per particle! I removed the logging and the animation literally flies now!
Thanks very much for everyone''s help and I promise not to waste your time next time.

TommyB
g7tommyB

This topic is closed to new replies.

Advertisement