I created an online game, did the client and server, both separate the client normally connects to the server on localhost, but when I set up with the hamachi IP, the other players can not connect to the server (which is in my machine) ... the client does not connect to the server by Hamachi.
the AppGameKit 2 is limited in P2P connections? or have something wrong with my code?
Someone can help me ?
Code of Client :
SetWindowTitle( "Client network test" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetScissor(0,0,0,0)
main()
function main()
Global rede as integer
rede = JoinNetwork("25.143.79.48",1026,"CLient")
do
if GetNetworkNumClients(rede) = 0
end
endif
sync()
loop
endfunction
Code of Server :
SetWindowTitle( "Server network test" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
global server as integer
server = HostNetwork("server","server",1026)
main()
function main()
do
if server > 0 and IsNetworkActive(server)
print("Server Ready :D")
endif
Sync()
loop
endfunction