Hey gang…
Not sure how to make it work…
Objective:
- No Masterserver or external server to handle/facilitate connections…
- direct Peer conection (just player webbrowser build working as client and server)…
- Reading player IP with PHP and use that info to create a connection, so no one would have to inform any freaky IP…
But I´m not sure how - or if it is even possible - to handle NAT punchthrough inside my client game code… Sort of embedding the facilitator in the client…
Ideas???
Tks in advance guys…
No masterserver = 70%+ of all users can not play as only those can play who have setup portforwardings for the corresponding UDP port. This means that the majority of those playing browsergames ie casual users, will not be able to play at all.
What you can do for example is using the masterserver invisibly which means without showing it to the player but using it for NAT Passthrough
you can not handle NAT Punchthrough through the client, as the NATpunchthrough must be done by an “unshielded neutral 3rd point” that hands the ports etc between the parties so they no where to send the message and to which internet UDP port actually for the NAT to missassume that the connection actually is “ok”
Wow… that was a fast one!
Tks for your attention dreamora…
I was kinda of afraid that answer would come… lol.
Well… Now you´ve pointed me to the truth north… I got it…
Two quickies now…
1- Is Unity Masterserver free to use and access for a real production enviroment? I didn´t get that yet…
2- If so, can I assume as safe the fact that ONLY people using my client code (the web game) can “see” the server instances created in this game by other people?
Tks again!
Yes. As a service, unity3d.com hosts a master server for testing, but its possible and encouraged to build and host your own. You can password protect your servers and the master server its hosted on your own undisclosed IP and port.
http://unity3d.com/support/documentation/Components/net-MasterServer.html
http://unity3d.com/support/documentation/Components/net-MasterServerBuild.html
Well… Now I feel comfortable with it!
Tks for the infos Ant!