- Home /
Local multiplayer networking - Howto
Hi,
I am a little puzzled by this and don't seem to be able to find the information I need. I am working on a turn based card game (two players) and the players are using their own PCs and the game server is running on another PC. They are all on the same local wifi network.
When the player wants to join the game, I need him to be able to find the game server on the local network, but I can not figure out how to make the server discoverable on the wifi network. May be I am over complicating it, but does anybody know where I need to look to figure out what to do. Any help is appreciated.
Thanks
Answer by Pangamini · Feb 24, 2020 at 10:33 AM
Over LAN this is traditionally done by broadcasting. If you are using UNET, you might want to take look at Network Discovery. Otherwise, if you want to run outside of your LAN, you will need some kind of a master server (which might be directly provided by UNET too, I am not sure)
Answer by GetLitGames · Feb 24, 2020 at 08:20 PM
UNET is deprecated. Try Photon Bolt - this has been answered several times recently and is easy to do with Bolt: https://assetstore.unity.com/packages/tools/network/photon-bolt-free-127156
Join the Discord channel for info on how to do local wifi LAN sessions, you should get an answer quickly: https://discordapp.com/invite/0ya6ZpOvnShSCtbb
I don't think that the best solution will be done with Visual Scripting. Anyway, it can be done with regular Photon or Mirror networking.
Answer by zardtomcat · Feb 24, 2020 at 10:53 AM
Great, it is the broadcasting that I was not sure about and this clearly says that, it broadcasts on the LAN. I am assuming that it doesn't have to be cabled and Wifi would be just fine.
Just checked some links on that page and they are broken. I then noticed that, "UNET is depricated and will be removed from Unity" :-(
Do you know of any skeleton code I can use? Dont worry, if you dont as I can put together a test one.