Just hoping Matty or someone else could give me a heads up on how the timing system works.
I want to experiment with non fixed time, so my understanding is that I use this command
dynSetTiming( 0, 0, 1). This will tell the system to not work to any specific time interval, and expect an irregular update pattern. I believe I then call these commands in this order in my loop:
dynFetchResults();
dynUpdate();
// Force related commands here
dynSimulate();
// Objects are moved now, so update camera here
With fixed timing, I believe the system performs multiple iterations of the physics calculations to get smoother/better results (as defined by the second parameter), and that with irregular timing I'm responsible for this. So would I do something like this?
-loop start
for i = 1 to 4
dynFetchResults();
dynUpdate();
// Force related commands here
dynSimulate();
next i
-loop end
If I'm applying forces every iteration, that seems pointless. But if I don't apply forces every iteration, then that seems weird! I'm assuming with fixed timing, the engine applies your forces gradually over each iteration? So if it runs 4 updates per dynSimulate(), it will apply 1/4 of the forces you applied per game loop? Or does it apply them straight away?
Also, I'm assuming I don't need to tell the physics system how much time has passed? It calculates that itself?
Basically, I just want to understand what's going on behind the covers so I can correctly implement an irregular timing system which gives the physics system the best chance at accurate, smooth physics.