[SOLVED] Game speed - animations and code


#1

Hi guys ,any one know if there is any way to slow down the whole game ? .
Like lets say i want a slow motion for the game , i have my internal clock in uppdates .
But i dont know how could i slower down ALL the game at once ,like all animations and more .
I know its possible to set animation speed , but i have soo many chanels and listeners …
I suppose all the engine is updated at some speed ,that is took by normal flow of all chanels and rest
of functions ,soo i would like to know how to get it and possible manage it without blow the world up.
Gaming and realty :smiley: .


#2

I’m not sure of the repercussions, though. Personally I’d set my own just to be sure.


#3

is there any standart speed ?
lets say i change a speed ,how could i reset changes ?


#4

The code is right there if you just search for ‘speed’ in the file already provided.

so 1 = normal, 0 = stopped completely.


#5

Thank you , i did gave a look but was still uncertain , dont want to break some code i did not created .


#6

Thank you for help


#7

i have my internal clock in uppdates

?

please note, all your code need to be based on tpf(time per frame), otherwise your code that is not based on tpf will be not affected by game speed and will work different for each computer.

you need use tpf in all your code that need be affected by time.


#8

Yeah ,its all fine from that side , i made a clock based on tpf , i just did not wanted to do all actions each round ,soo made a clock that runs some actions once each minute second or hour . And needed some clock as well , but its all based on tpf :slight_smile: .


#9

ah, got it. i have something similar to avoid code duplication for a time delayed actions(that take a lot cpu/ram) :slight_smile: there is something like this already in JME anway but i dont remember what was it. There is also a queue in jme (but it runs in next frame) but its good for synchronize some calls

then everything is fine.