★ TouchArcade needs your help. Click here to support us on Patreon.

How long did you work on Gamecenter integration?

02-11-2011, 06:03 AM
#1
Joined: Dec 2010
Location: Outer Space
Posts: 411
How long did you work on Gamecenter integration?

Developing a simple game now. Wondering how long you guys took to combine your score with GameCenter? Simple process?

Thanks guys
02-11-2011, 09:31 AM
#2
Joined: Jan 2009
Location: Switzerland
Posts: 194
Send a message via AIM to DrummerB Send a message via MSN to DrummerB
Quote:
Originally Posted by layzerboy View Post
Developing a simple game now. Wondering how long you guys took to combine your score with GameCenter? Simple process?

Thanks guys
Depending on your experience and skills, I'd estimate about 3-4 hours. It's not that difficult, but you have to test carefully. You also have to make sure scores don't get lost if the submission fails (no internet connection..).

Developer of Practice Pro for musicians.

02-11-2011, 01:49 PM
#3
As previously stated, Game Center is easy enough to add. The more complicated part is being prepared for offline use or submission failures. Apple has no sdk for saving Game Center data for later transmission and leaves it up to the developer. Another issue is saving data on a non Game Center device that may later become a Game Center device (like a person using an older OS that may later upgrade). In summary: Game Center is very easy to add to a game but dealing with offline data and connection issues can take a little bit of effort to get working correctly.
02-11-2011, 04:39 PM
#4
As everyone else has stated...integrating it is pretty easy. Apple practically gives you the code with one of their GameKit examples...can't remember which one (GKTapper maybe).

Handling the special cases (offline, saving GC data, etc) is a little more work. If you search the Apple Dev Forums on submitting GC scores there are some code examples that other Devs have implemented for some of these scenarios (at least there was when I implemented GC awhile ago). So along with Apple examples and the Apple dev forums you should be good to go with minimal research/coding on your end.

iPhone/iPod Touch Apps by Tiny Tech Studios
02-11-2011, 05:26 PM
#5
Joined: Jan 2011
Location: UK
Posts: 195
As TinyTechnician suggested, have a look at GKTapper sample to get going.

Took me 3 days in all to completely integrate GC and test to make sure the Leaderboards and Achievements were working correctly.

Implementing the code is relatively straightforward, but getting it to work correctly with the game can cause headaches.
In most cases, I would think it should be possible get away with even a naive implementation
02-11-2011, 06:49 PM
#6
Joined: Dec 2008
Posts: 1,240
Space Laser Race already had OpenFeint, so Game Center was just a matter of adding a few lines and putting the achievements and leaderboards in Game Center in iTunes Connect. OpenFeint is also pretty simple and quick to put in.
02-11-2011, 10:36 PM
#7
Joined: Aug 2009
Posts: 618
Quote:
Originally Posted by Fleabag323 View Post
OpenFeint is also pretty simple and quick to put in.
Alas, it is not. Game Center was easy. OpenFeint takes a while and needs a few hooks in your code that you may have trouble understanding if you're a beginner.

What do you get when you cross Robotron with Bomberman? - Coverfire HD
02-11-2011, 11:22 PM
#8
Joined: Nov 2010
Location: Portland, OR
Posts: 82
Leaderboards took me about 2-3 hours, but the majority of that was writing custom business logic for determining if I needed to post to GC and testing while I figured out exactly how the whole score posting thing worked, and making sure your scores would correctly post later on if you were offline. The code itself was easy.

Achievements were harder. I spent about 15 hours on that, as I wanted to do offline tracking of achievements, and writing each business rule for each achievement took some time, as many cases were pretty different from one another.

One gotcha I ran into was that while posting to GC is supposedly asynchronous, I still was getting some weird hiccups in my frame rate whenever it posted, enough to be noticable. You may want to consider spawning a thread selector to post to GC, as that fixed this issue for me.

RAMPS!! Previously iPhone Game of the Week on the App Store.
"... a simple and stylish physics puzzler that you won't want to put down." - Apple

COMING 10/11/12: Lotsa Blocks!

http://lotsablocks.com
02-16-2011, 02:04 AM
#9
Joined: Dec 2010
Location: Outer Space
Posts: 411
thanks for the info peeps.

much obliged and many thanks...
02-16-2011, 08:26 AM
#10
Joined: Jan 2011
Location: Myrtle Beach, SC
Posts: 269
quick tip, make sure you save your achievements locally for people who aren't online.

what I do is everytime the game boots it checks the save file against your live achievements and makes sure you are up to date.

and like others have said, use the gamekit.h file that cktapper comes with. very useful.

the most time consuming part was actually coming up with the achievements and graphics. the coding itself was easy.

Games: Boom Boat | Boom Boat 2
Developer: Razoric.com
Social: Twitter | Facebook