Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 58

MobileAppsABC
Aspiring developer
Profile
Posts: 28
Reg: Dec 19, 2012
Longueuil
4,480
03/27/13 01:55 PM (12 years ago)

Many Leaderboards in GameCenter

Using this tutorial, I have created many Quiz apps with Leaderboard in Game Center. http://www.buzztouch.com/files/howtos/Game-Center-Tutorial.pdf. I want to build a new app with including many Quizzes, each quiz posting result on different Leaderboards. I am looking for hints, code sample or tutorial to do so. Thanks
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/27/13 08:48 PM (12 years ago)
Yes, this can be done - MGoBlue (the same guy who wrote that tutorial) posted this handy block of code in a thread a while ago. You will need to paste this submitScore method over the entire submitScore method from the tutorial - //submit score -(void)submitScore{ if(totalPoints > 0) { self.currentLeaderBoard = [self.screenData itemNickname]; [self.gameCenterManager reportScore: totalPoints forCategory: self.currentLeaderBoard]; } GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; if (leaderboardController != NULL) { leaderboardController.category = self.currentLeaderBoard; leaderboardController.timeScope = GKLeaderboardTimeScopeWeek; leaderboardController.leaderboardDelegate = self; [self presentModalViewController: leaderboardController animated: YES]; } } This method works by looking for a leaderboard id to match the nickname of the current screen. You will need to make sure that the screen nickname for each quiz is identical to its corresponding leaderboard id hopefully that makes sense :)
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/28/13 05:29 AM (12 years ago)
The whole thing doesn't work anymore with the latest Xcode, Buzztouch and IOS. MGoBlue is aware of that and wanted to update his tutorials. Waiting time.
 
MobileAppsABC
Aspiring developer
Profile
Posts: 28
Reg: Dec 19, 2012
Longueuil
4,480
like
03/28/13 06:57 AM (12 years ago)
Hi ! I just add the code and add some statement in AppSpecificValue.h #define kLeaderboardID @"yourlearderboradId" // for each leader board Just tested everything and it seem to work fine. Thanks Absentia !
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/28/13 08:11 AM (12 years ago)
Working on the latest Xcode, buzztouch and ios??
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/28/13 08:25 AM (12 years ago)
Yep, the majority of the tutorial still works as far as I can tell - it's just some of the BT_quiz.m stuff that needs a little tweaking
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/28/13 08:28 AM (12 years ago)
ok, so could you publish the little tweakings?
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/28/13 09:09 AM (12 years ago)
This is really the only one - http://www.buzztouch.com/forum/thread.php?tid=7D84F0940EAC024FB8FFCC6&command=isSearching&currentPage=1&topicTitle=2.0%20quiz&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= Oh, haha I just noticed you've already been posting in that thread...what part of the tutorial are you having trouble with exactly?
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/28/13 09:14 AM (12 years ago)
I got many red errors as I was 75% through the tutorial so kinda stopped. Cant believe anyone could get this working on the newest source downloads.
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
03/28/13 09:19 AM (12 years ago)
What kind of errors and where are they?
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/28/13 09:22 AM (12 years ago)
will reproduce it and post it here.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.