Hi. I saw some topics about Game Center but I didnt find how to implement it in my game. Is there any tutorial explain that? Thanks. [import]uid: 40281 topic_id: 16641 reply_id: 316641[/import]
There isn’t a tutorial, no.
What you do is set up OpenFeint first, then you will create matching leaderboards/achievements in Game Center and add your OFgamecenter.plist file, explained here;
http://support.openfeint.com/dev/game-center-compatibility/
Peach
[import]uid: 52491 topic_id: 16641 reply_id: 62182[/import]
Ok. Peach!!! My OpenFeint Leaderboard is working. Do I really need configure my game in iTunes Connect to use Game Center?
About OFgamecenter.plist - Do I need to configure it in build.setting file? If this is true, how can I configure it?
Sorry about my questions, this is my first game. I hope you understand. [import]uid: 40281 topic_id: 16641 reply_id: 62639[/import]
Using the same editor you use to write Lua make a new document.
In it put this;
[lua]<?xml version="1.0" encoding="UTF-8"?>
Leaderboards
OpenFeintLeaderboardID1
GameCenterLeaderboardID1
OpenFeintLeaderboardID2
GameCenterLeaderbaordID2
Achievements
OpenFeintAchievementID1
GameCenterAchievementID1
OpenFeintAchievementID2
GameCenterAchievementID1
[/lua]
That is from the OF link above. You will replace each bit of info there with your own leaderboard/achievement IDs.
Save it with the file name; OFGameCenter.plist
You do need to add your game to iTunes Connect to set up GameCenter, yes - you have to create the achievements/leaderboards that you want in iTC because GameCenter is an Apple thing.
Does that help?
And no worries about the questions, hopefully they will help other newbies in the future 
Peach [import]uid: 52491 topic_id: 16641 reply_id: 62741[/import]
I tried this but didn’t have much luck. The game center seems to be set up okay and the app and open feint are recognizing it (i.e. it tells me I am logging into the game center) but when it posts a high score it does not post to the game center, only open feint. I have the keys set up in the plist file. I even changed the leader board id to something different and updated the plist to see if that would fix it.
Are we getting true (i.e. not through open feint) game center support soon? [import]uid: 8776 topic_id: 16641 reply_id: 63415[/import]
I can’t comment on your last question as that isn’t my department, however with your main issue - have you set yourself up as a test user in iTunes Connect? If memory serves you need to do so for scores to properly submit.
(Also keep in mind changes can take several hours to take effect on the Apple end of things.) [import]uid: 52491 topic_id: 16641 reply_id: 63743[/import]
I’ll try that next time. This was a test run to see how to implement OF, the game I really need to implement it in is due out hopefully in the next few weeks. [import]uid: 8776 topic_id: 16641 reply_id: 63788[/import]
OF is easy to implement, it’s GC that can be a little tricky. (Not really tricky, just a little slower most of the time.)
Let me know how you go 
Peach [import]uid: 52491 topic_id: 16641 reply_id: 63969[/import]
Haven’t had much luck with this. I’ve tried creating a test user in iTunes connect but that didn’t seem to do anything. Weirdly, GameCenter recognizes that I’ve played the game, it just doesn’t show the score. [import]uid: 8776 topic_id: 16641 reply_id: 65119[/import]
Double check that your IDs are correct and that they are strings.
[lua]“1234XXXXX”[/lua] etc.
Are the scores showing on OpenFeint? [import]uid: 52491 topic_id: 16641 reply_id: 65161[/import]
The scores are fine on OpenFeint. Everything seems fine in OpenFeint.
I do not believe I have double quotes surrounding the id fields in the PLIST file. That would be a rather odd requirement. I can change it and check, of course.
GameCenter is obviously recognizing something because it logs me in when I enter the game, though when it logs me in it says “Welcome back, username” and on the next line it has “***sandbox***”. Not sure if that is normal. [import]uid: 8776 topic_id: 16641 reply_id: 65169[/import]
I had exactly the same problem, but eventually the scores appeared. I think it took about 24h or so. Since GC recognizes you, I suggest you give it some time. [import]uid: 13507 topic_id: 16641 reply_id: 65177[/import]
In my case, achievements appeared instantly to Game Center, but it took over 20h for leaderboard scores to appear. [import]uid: 13507 topic_id: 16641 reply_id: 65178[/import]
That must be it. I just checked and all of the scores I recorded this afternoon were showing up in GameCenter. That’s a crazy bit of lag, but better than nothing.
Thanks for the tip. Also thanks Peach for being attentive to the issue. [import]uid: 8776 topic_id: 16641 reply_id: 65180[/import]
Helpful topic 
One question though regarding openfient leaderboards…
Ive set up both achievements and leaderboards in my game, the achievements work fine and i can submit scores to the leaderboard.
BUT, in the openfient dashboard in-game, it doesnt show a leaderboard button at all, no matter what i change. I can see the leaderboards if use gameNetwork.show( “leaderboards” ) and it displays the scores i submitted. But i want them to show in the dashboard aswell… which doesnt seem to work.
Any thoughts as to why they wouldnt be showing?
As per the advice above, i waited a day or two and the button still hasnt magically appeared…
[import]uid: 69826 topic_id: 16641 reply_id: 65201[/import]
I’m still waiting for OF achievements to show up in the dashboard. They are registered instantly and I can see them in the Open Feint site, but not in the ingame dashboard. Someone mentioned that they will magically appear someday:)…hopefully that is true… [import]uid: 13507 topic_id: 16641 reply_id: 65203[/import]
@havlen - No worries, thank you for the appreciation 
@jammy and polygon - this is an issue I’ve experienced in the past too which magically got resolved. I would suggest you consider contacting OpenFeint as they may be able to assist with it. (Sorry I don’t have an easy answer for that one.)
Peach
[import]uid: 52491 topic_id: 16641 reply_id: 65354[/import]
Now I’m having problems getting a second leaderboard in the same game to show up. I’m sure I’ll work though it though am a little baffled since the scores are registering and the leader board itself simply isn’t listed.
in the meantime, I have this code in the project:
gameNetwork.request( “setHighScore”, { leaderboardID=of_highscores, score=score, displayText=display } )
gameNetwork.show( “highscore”, of_highscores )
and when it runs the score gets registered but when the high scores are shown the last best score is shown. You have to refresh to get the score that was just registered. I’m assuming this is because the processes are multithreaded and are running asynchronously. Do I need to put a timer.delay on showing the high score?
Also, does the offline mode work? I saw something on openfeint.com about an offline configuration file. [import]uid: 8776 topic_id: 16641 reply_id: 65421[/import]
A very brief delay would prevent that, yes 
For the offline stuff, there’s info about that on the openfeint website.
Peach
[import]uid: 52491 topic_id: 16641 reply_id: 65589[/import]
For the OFGameCenter.plist do the values inside the blocks need to be in quotes?
I have mine like this:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0"><br><dict><br> <key>Leaderboards</key><br> <dict><br> <key>1234567</key><br> <string>1234567</string><br> <key>1234587</key><br> <string>1234587</string><br> </dict><br> <key>Achievements</key><br> <dict><br> <key>54321010</key><br> <string>54321010</string><br> <key>54321020</key><br> <string>54321020</string><br> </dict><br></dict><br></plist>
When I play the dev version of the game on my ipad, it logs into Game Center, says something about ** Sandbox **, but says “This game is not recognized by Game Center”.
I have set up all of my Achievements in both OpenFeint and Game Center. All of the achievements show up in OpenFeint.
What else do I need to do to have Apple recognize the game in Game Center?
Thanks.
[EDIT] I went into iTunes Connect, and turned on Game Center for my build version, but it still doesn’t work. Either Game Center takes time to propagate the change, or that just doesn’t work with Development builds. I hope that isn’t the case because it would mean I would have to wait until the build was live to test my achievements.
Or, do I make a “release” build, upload it to iTunes Connect (but NOT submit it), then test that release build on my iPad?
Anyone who has gone through this, your wisdom is appreciated.
[EDIT] For anyone else who runs into this issue here is what you need to do:
-
Set up Leaderboards and Achievements in OpenFeint
-
Set up Leaderboards and Achievements in Game Center
-
Create the OFGameCenter.plist file that Peach mentions above with your data
-
Place the OFGameCenter.plist file in the same folder as your main.lua file
-
Generate an Ad Hoc Provisioning file
-
Install that provisioning file on your device
-
Create a build using that provisioning file
-
Enable Game Center for your app in iTunes Connect
-
Install your build on your device
-
Test your app!
This worked for me! Thanks everyone for the help. [import]uid: 16734 topic_id: 16641 reply_id: 78249[/import]