SetUpdaterate()

Monkey Forums/Monkey Programming/SetUpdaterate()

tagoror(Posted 2011) [#1]
Hello,

What's your advice with SetUpdateRate() for IOS and Android?

I'm using SetUpdateRate(60) for my projects but i would like to know if i must consider to use a value of 30 on this platforms.

Thank you,

Javier


Xaron(Posted 2011) [#2]
I always use 30. That way I can be more sure that this rate will hit as with 60 fps.

But for my apps so far it doesn't really matter...


benmc(Posted 2011) [#3]
I think it really depends on how much your game has to do between updates. For example, when I was starting my game, I could easily run it at 50 FPS on iOS and Android. But now, as the game has to do so much, I peak at 45 FPS and maintain a really smooth feel on iOS and Android.

But on my iPhone 3GS and iPod 4th Gen, 45 FPS seems to be no problem at all with all debugging turned off and creating a release-build in XCode.

As I dig into the source that is created with Monkey, I found some of my little tricks that used to speed up my code in Java on Android weren't happening. For example, a Select is turned into an elseif tree. I used to find on Android that using cases instead, I could pick up a few clock ticks, but now that I know it's all elseif, I have to come up with new tricks.

Also, I used to use SurfaceView on Android, which was slow, and now I've learned that it's important to draw EVERYTHING off screen at least once on Android during a loading process before using the graphics in game play or you get a lot of hiccups.

Still, I find these little things completely workable given the beauty and ease of using Monkey.