way to prevent fps going down

suppose we have a thread, and it will execute 60 or 30 times per second,
but if we have too much collisions, or sprites in the game loop then that fps count it will go down,
but that is because we are processing the same thing those times right, I mean , if I have a particle system ( and I know those consume much process power ), what will happen if I dedicate one tick to process only the particles instead to process them, and the input, then sprites, then render,
I mean, there is no point to process all of that all the time, right?

im trying to say that, what for certain functionality I can skip other work?, to prevent that FPS going down


run()
{

while( true )
{

if( particles processed ) continue;

processinput
process collisions

render

}

}

Hi

You’re not forced to update your physics as much as the rendering.

You can use continuous collision detection (implemented in (J)Bullet) instead of updating your physics more often.

You can use bounding volumes in order to avoid making very costly computations when it’s not necessary.

I advise you to read this paragraph:

As said above, there is no need to check collision all the time, you should only check for collisions near by. If you want an easy approach then use a physics library like JBullet. But to narrow it down what you should be looking into, you should look at Octree, QuadTree or BSP, which is included in the Wikipedia link above