Hi,
I’m right now trying to make a LAN multiplayer games using DefNet. I found out that DefNet is exactly what I need to make a simple multiplayer game from 2 to 4 players. My plan is to use the p2p discovery to let others to detect a host machine, then other can connect to the host machine using the ip address that it provides using TCP socket. But I found some issues when trying the examples:
- I’ve tested p2p discovery and found out that only the first machine discover the host can receive the data, when I ran the 2nd and the 3rd ones, it just kept listening without discovering the host.
- When I open 2 instances (I’m gonna call it [instance1] and [instance2]), I use [intance1] to broadcast and [instance2] to listen, everything is working fine. But when I get back to the main menu and get back again to change to [instance2] to broadcast and [instance1] to listen, it doesn’t work anymore.
I’m a newbie to networking, so maybe there’s something to twist to make it works but I don’t know yet, or this is the way DefNet P2P Discovery works?
Edit: So I’ve found out that when you testing, if it’s more than 2 instances, you should test it in other machines if you want to use P2P_Discovery.