Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Particles (probably) slowing the shit out of my game; Goddamn
Topic Started: Apr 2 2009, 07:24 AM (270 Views)
Fartface_McGiggles
Advanced Member
[ *  *  * ]
So I made a flamethrower effect I think is pretty sweet:
Posted Image
But it slows the shit out of my game. Obviously it occurred to me to make less particles, but even if I get rid of all the particles, or stand in front of a wall firing continously making all the particle systems destroy themselves as soon as they are created, it slows the game down to around 30 FPS. And I'm using pretty much the same particles as I used for an explosion that ran at a smooth 60 FPS, even when there were lots of them going off at once.

Anyone know what I'm doing wrong? Thanks in advance for any help.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Can we have a look at the particle code to see how many particles you create?

Btw, I think the lizard should be walking on his back legs and not all four ;) Just a suggestion.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
I hope you're only creating one particle system.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Fartface_McGiggles
Advanced Member
[ *  *  * ]
Ah there it is, thanks skarik - I was making 2 systems each step, now I only have two existing at a time. It works much better.

Just another question though - I'd started getting "You are trying to create too many particles" messages that wouldn't go away occasionally. It seemed to only happen if I was firing into a wall and changing directions, but it just happened occasionally and seemingly randomly, I couldn't find any way to make it happen. I thought it might be a bug in the collision code, meaning that if I get too close to a wall it would be doing this:

distance=0
SetParticleLifetime(min(10,distance/2),min(20,distance))

and I've since changed it so distance can't be less than 1 to avoid dividing zero, but since I can't test whether that's worked, can anyone confirm that that might have been causing it?
Edited by Fartface_McGiggles, Apr 6 2009, 03:26 AM.
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply