How long did you work on Gamecenter integration?

Discussion in 'Public Game Developers Forum' started by layzerboy, Feb 11, 2011.

  1. layzerboy

    layzerboy Well-Known Member

    Dec 1, 2010
    411
    0
    0
    Outer Space
    Developing a simple game now. Wondering how long you guys took to combine your score with GameCenter? Simple process?

    Thanks guys
     
  2. DrummerB

    DrummerB Well-Known Member

    Jan 17, 2009
    194
    0
    0
    Switzerland
    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..).
     
  3. Rogue

    Rogue Well-Known Member
    Patreon Bronze

    Feb 9, 2011
    174
    0
    0
    Games Developer
    Brisbane, Australia
    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.
     
  4. TinyTechnician

    TinyTechnician Well-Known Member

    Apr 21, 2010
    211
    0
    0
    Developer
    Los Angeles
    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.
     
  5. nvx

    nvx Well-Known Member

    Jan 7, 2011
    195
    0
    0
    UK
    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
     
  6. Fleabag323

    Fleabag323 Well-Known Member

    Dec 19, 2008
    1,239
    27
    0
    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.
     
  7. thewiirocks

    thewiirocks Well-Known Member

    Aug 28, 2009
    618
    0
    0
    Expert Software Engineer
    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.
     
  8. u2elan

    u2elan Well-Known Member

    Nov 8, 2010
    87
    0
    0
    iOS Developer
    Portland, OR
    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.
     
  9. layzerboy

    layzerboy Well-Known Member

    Dec 1, 2010
    411
    0
    0
    Outer Space
    thanks for the info peeps.

    much obliged and many thanks...
     
  10. Razoric

    Razoric Well-Known Member

    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.
     
  11. ram.alapati

    ram.alapati New Member

    Feb 16, 2011
    1
    0
    0
    how do we establish wifi connection between two devices?

    We developed a multiplayer game with gamecenter. The connectivity is always happening through bluetooth, how do we connect two devices using wifi?

    Thanks in advance
     

Share This Page