has anyone had any luck with the gamecenter commands on android? when exporting as apk i got as far as it detecting gamecenter exist and getting a prompt to continue with a display that shows my gmail for google play, after that i cant get it to show my name or id like i can when i test it with appgamekit player
// Initialize the AppGameKit engine
SetWindowTitle("Simple AppGameKit Example")
SetWindowSize(800, 600, 0) // Set window size to 800x600, 0 means no window border
setresolution()
SetOrientationAllowed( 0,0,1,1 )
SetScissor( 0,0,0,0)
GameCenterSetup()
GameCenterLogin()
global gamecenter as integer
gamecenter = 0
global moveon as integer
moveon = 0
global name as string
name = GetGameCenterPlayerID()
global moveonbutt = 1
AddVirtualButton( moveonbutt,GetVirtualWidth()/2,GetVirtualHeight()/2, 100 )
repeat
print("ready to test")
if GetVirtualButtonPressed(moveonbutt) =1
moveon = 1
endif
sync()
until moveon = 1
DeleteVirtualButton(moveonbutt)
moveon = 0
do
//check for gamecenter
if gamecenter = 0
if GetGameCenterExists() = 1
gamecenter = 1
AddVirtualButton( moveonbutt,GetVirtualWidth()/2,GetVirtualHeight()/2, 100 )
repeat
print("Game Center availible")
if GetVirtualButtonPressed(moveonbutt) =1
moveon = 1
endif
sync()
until moveon = 1
DeleteVirtualButton(moveonbutt)
moveon = 0
gamecenter = 1
else
do
print("Game Center unavailible")
sync()
loop
endif
endif
//
// log in
if GetGameCenterLoggedIn() =0
repeat
print("Logging in")
sync()
until GetGameCenterLoggedIn() = 1
endif
//display infor if logged in
if GetGameCenterLoggedIn() = 1
repeat
print("logged in")
print(GetGameCenterPlayerID())
print(GetGameCenterPlayerDisplayName())
sync()
until moveon = 1
endif
print ("logged in" +" "+str(GetGameCenterLoggedIn()))
sync()
loop
function setresolution()
if GetDeviceBaseName() = "windows"
SetVirtualResolution(1280,720)
SetWindowSize(getdevicewidth(),GetDeviceHeight(),0,0)
SetWindowAllowResize(1)
else
if GetDeviceWidth()>GetDeviceHeight()
SetVirtualResolution(getdevicewidth(),GetDeviceHeight())
else
SetVirtualResolution(GetDeviceHeight(),getdevicewidth())
endif
SetWindowSize(getdevicewidth(),GetDeviceHeight(),1,0)
endif
endfunction