FixedLogicrateGame and Framerates questions

I was looking at the FixedLogicrateGame class and it seems to be what I want. My understanding of it is that calls to update are capped at whatever number per second you set but calls to render are as fast as possible.



The current SimpleGame examples all compute the framerate in the update() method. This means thats if you do 60 updates a second your framerate is reported as 60.



My question is this … does framerate normally refer to the number of calls to render per second, or the number of calls to update per second?



My guess is framerate should be how many times the scene is rendered per second. If that’s true then how do I get a correct framerate reading when using FixedLogicrateGame Class?



update currently has a variable called tpf which is set to timer.getTimePerFrame. Should this tpf variable (time per frame) now be referred to as tpu (time per update)?



Do I need to add another timer to the render method to get the true framerate?



Thanks for any clarification!

framerate is how many calls to render per second are occuring. We have historically tied update and render calls at a 1:1 ratio. It would probably make sense to seperate it into two counters in certain instances such as the Swing stuff and in any other case where a call to render or update may be skipped in some way. How soon that may happen, I’m not sure, but I’m glad you brought it up and it will definitely be placed in the queue.