Thanks for your opinions!
Quote:Original post by SteveDeFacto
What physics API did you use?
It's my own physics engine.
Quote:Original post by forsandifs
My only suggestion atm is to try and triple that framerate somehow. Easier said than done of course.
When it comes to low framerate it's caused by few things. Firstly, Fraps reduces it to max 25fps (without Fraps framerate is about 40-60). Secondly, balls are complex ~1280 triangles per ball (this "snake" contains 100 balls). Moreover, SSAO is very expensive effect, especially that it uses both depth and normal map. Shadow mapping lowers framerate too.
I want to add environment mapping soon, which also can cut some fps.
Quote:Original post by bythos
Do you use any threading for the physics?
The physics and graphics are separated. Physics engine has got fixed timestep (0.01 s = 100 Hz). Although, there is not any other thread. I'm using something like this:
double accumulator = 0.0;const double dt = 0.01;while (!quit){ accumulator += getDeltaTime(); while (accumulator >= dt) { StepSimulation(dt); // Integrate simulation accumulator -= dt; } Render(); // Draw stuff}