I am trying to do a leaderboard for my game, what is the best way to do it? If I do it in a normal cocos2d scene rendering at 60fps, wouldn't that waste battery?
How would i do a leaderboard
(5 posts) (3 voices)-
Posted 2 years ago #
-
I'm not so sure for the amount of time you'd look at a leaderboard there'd be that much wasted energy via the extra cycles but I guess YMMV. For what it's worth though, not sure if you were going to roll your own board but I just added OpenFeint to my game yesterday, and I've got to say it seems to be pretty slick. Unlike other folks, it took me a while to get it fully integrated as I kind of stumbled my way through it as a new developer (like oh BTW even though the portrait folder may be deleted it'll still end up displaying a blank portrait screen so you have to make sure to enable the landscape setting in settings as well). But in the end I think it adds a nice bit of polish to the game for very little extra effort.
Posted 2 years ago # -
If you are worried about the battery you can reduce the frame rate - this is what the Director does when your game is paused.
Alternatively if you use a UIKit GUI like OpenFeint does then you can stop the Director altogether whilst the leaderboard UI is displaying and then restart it when the leaderboard UI is closed.
Posted 2 years ago # -
And I'll add that it's essential to pause director while showing the OpenFeint screen if using fastdirector cause otherwise not all touches are picked up. Fortunately the pause and resume are easily done with code placement in OF's method calls. Of course on the other hand you're burning juice to now connect to an online service to download score board data, which I'd imagine is worse than just viewing local leader boards at 60fps.
Posted 2 years ago # -
so i can pause the director and that will make run at 4fps. but how can add an a uikit layer (could i even use a xib so i could use interface builder)?
Posted 2 years ago #
Reply
You must log in to post.