Game Development Community

Gamecenter integration for T2D on Mac OSX ?

by Blake Drolson · in Torque Game Builder · 10/02/2012 (7:22 pm) · 6 replies

Hi there,

I haven't been able to find any info on this, wondering if anyone has done the necessary work to enable Gamecenter integration for a TGB (T2D) based game running on Mac OSX, I guess 10.8 Mountain lion is needed.

#1
10/04/2012 (5:22 pm)
Ok so I guess no one has done this yet on the mac side...

So does anyone know how big a job it would be to port the iOS Gamecenter integration code over to the Mac ? Havn't looked at the code for it yet. Wonder if anyone with experience working with the Ios Gamecenter code could comment?
#2
10/08/2012 (7:37 am)
@Blake - The code I wrote for iT2D is very portable. You should be able to just move the files over, include the proper framework, compile, then resolve any minor issues that might crop up.
#3
10/08/2012 (11:44 am)
Thanks Micheal thats what I was hoping to hear, let you know how it goes :).
#4
10/08/2012 (11:50 am)
Appreciate it Blake
#5
10/25/2012 (2:19 am)
Ok well I am stuck and I am not sure if I am going about this the right way.

I copied the GameCenter.mm and gamecenter.h over from the Itorque 1.51 preview build, and linked in the gameKit framework. The thing is that gamecenter.mm includes platformiPhone.h, and this pulls in a whole bunch of frameworks, UIKit, CoreGraphics and so on. I tried pulling these from different places, including the iphone simulator platform, in order to get things to compile, but I could never clean it all up.

It felt to me that it was stange that I was pulling all the iPhone platform code and associated frameworks, in order to just integrate with gamecenter on OSX.

Is there another way to get that gamecenter code pulled in, without pulling in all the iphone code? Does it sound like I was doing the right thing? Just wondering if I was on the right track or not.
#6
10/26/2012 (2:17 pm)
So in thinking about this more, I have one central question. What if I took out the link to iPhonePlatform.h from Gamecenter.mm ?? What if I tried to pull out all Iphone dependencies? Would it be possible, like say to define the GKAchievement structure for gamecenter? Would this be a possible approach that could work? Really stuck here and could use some advice on best approach to solving this.