Can I check the proper use of tpf? Currently, I multiply all movement vectors by the tpf each frame to get a constant rate. However, if I run my app on a slower computer, the game runs slower, which I assumed the tpf would counteract. Also, suspiciously, the tpf is exactly the same every frame. I would have thought it would vary slightly? Should I implement my own game timer?
I tried that code, added a simple “System.out.println(“tpf=” + tpf);”, and that outputs what I would expect, ie. a varying numbers. However, my code, which also extends SimpleApplication, has an almost identical method:-
Yes, the video recorder will force 30fps (I think) so you have a consistent framerate output for the video, so it will slow down the rendering depending on how fast the computer is. This is mainly because the encoding causes additional overhead but can also be used as a feature to get a smooth video rendering of scenes that would normally not render fluently even without the video recording overhead.