Change SetUpdateRate()?

Monkey Forums/Monkey Programming/Change SetUpdateRate()?

Midimaster(Posted 2013) [#1]
Does anybody know something about dynamic changing of the update rate? I would like to call SetUpdateRate() in OnUpdate with different values depending on being in the game's menu or game'splayscreen.

Has somebody already made experiences with this?


Capn Lee(Posted 2013) [#2]
my first game in monkey was a snake clone that changed the update rate depending on the skill level you choose. it works, but it's not good practice


MikeHart(Posted 2013) [#3]
I see no reason why this would be a bad thing. I did that to before. No problems noticed. Why do you consider doing this?


Shinkiro1(Posted 2013) [#4]
It really depends how you calculate changes over time.
If you do frame based calculations (which you shouldn't) it will slow down your whole game
If you you are doing it time based, so using delta time and all that you should be fine.

So technically it's no problem, but form a design viewpoint it breaks the consistency of your game.
It's that little something a player can't tell you why but to them it will feel wrong. Imo it shouldn't be done.


MikeHart(Posted 2013) [#5]
I would not change the update rate to speed up or slow down a game. But for the usage for using different speed in menus, i see no prob.


Gerry Quinn(Posted 2013) [#6]
I see no harm in it but I'm not sure whether you will see any benefits either. If it is slow updating in menus due to printing text, a few less calls to OnUpdate() won't speed it up significantly.


MikeHart(Posted 2013) [#7]
I see no harm in it but I'm not sure whether you will see any benefits either.


It could be that the app then drains less battery but then a player won't be inside a menu for long.


bazmonkey(Posted 2013) [#8]
I use SetUpdateRate(10) when the game is paused. Dont know if its really necessary, but Cocos2d does a similar thing when pausing its CCDirector, so I just did the same (to conserve battery and cpu cycles).