Update kills all the game

Hi,



I had a jME Version from before last Christmas when it all was in one jMonkeyEngine.jar. Someone in this forum called it “ancient”… well, since that’s not acceptable, I (or rather: we) updated.



Now… everything is broken. We got a major problem:



The game is ultra fast. The update loop is called extremely often and thus everything happens faster than ever. I use the getTimePerFrame method for timing, but the tpf values decreased (compared to those before) and I doubt it is still correct. I could do some bugshooting here; but I think a change in the engine should not require me to redo all my code. So does anyone of you know about this issue, or where I can find a detailed changelog?



Thanks for your help :slight_smile:

So you are complaining that jME works more performant now? :roll: You have to make your game framerate-independent. If you move a spatial x units each frame you have to make that x * tpf units.

I am not using the tpf but the timer.getTime() function to calculate every movement in my game, so a faster framerate wouldn’t change anything. In fact, we are always testing on several systems to check if there is a timing difference if you use different hardware; but there isn’t.



The getTime() function still does well, so I am kinda confused… but I would not preclude that my code is just buggy and the update reveals my errors XD



Still there is the possibility that the update changed something about timing; thus I am asking.

use tpf, its the result of the timer which can be locked to a video framerate or smoothened. using timer.getTime() might cause the framerate to be calculated wrong

Yeah, I will. And i just found the problem: getTime() did formerly give me the milliseconds the game is running, after the update its in microseconds. I just checked if the seconds go up and did not realize that the number is much bigger now. Well, I will do timing with tpf now, thank you :slight_smile: