- Home /
Is Internet connection needed for network game?
I am working on the game which is already finished. I have two exe file for them. Now these two need to run on two different PCs and both are in the network. I can run the game properly if I have internet connected. But they can't run if I have not attached to the external internet. The application runs but no communication.
So is it external internet required to run even LAN game? If no then let me know the APIs we can use.
Thanks in advance.
No, external internet is not required for network play in Unity. There must be some other factor in play.
Are you using the $$anonymous$$aster Server? Obviously that needs an internet connection.
Its like this. Exe one acts as the main screen where whole gameplay is there. In the second exe the radar stuff shows the data. Not much processing. Exe 1 is act as server and exe 2 connects to that and uses the info generated by it.
We have LAN connection and different IPs. But this requires external internet.
Weird. In my experience, unless you're using the master server for something, an external internet connection is completely unnecessary. What networking libraries are you using? Unity internal?
Yes. From logical point of view. Even it is master server we have address of the PCs in each exe so no need to go out side of the LAN. it has to run.
Check this link. http://unity3d.com/support/documentation/Components/net-HighLevelOverview.html
"Connecting servers and clients together" point. Its says strange thing,
Answer by fherbst · Mar 15, 2012 at 09:21 AM
If you use a Master Server, you need an internet connection, because the master server is somewhere on Unity's servers. Then everything you send runs over the master server (I think), you don't have direct connections between the players.
If you want to use pure local connections, you have first to detect the other players by other means (i.e. the host does UDP broadcasting, the others listen to that, and connect), or simply connect to them by using the direct IP. Then you have a direct connection between host and clients.
Thats two entirely different approaches for detecting other players and connecting (and the cause why most games have a choice between "Internet Game" and "LAN game").
Your answer
Follow this Question
Related Questions
Occasionally issue with Wifi connection 0 Answers
Which ways are available for a Unity program to communicate with other programs? 2 Answers
Ping class producing false positives, alternative to check connectivity? 3 Answers
Questions about the fixed frame rate of Unity 1 Answer
Problems with UDP data sending 1 Answer