Hi guys,
I’m working on a multiplayer game that will support LAN play. I would like to know the best way to implement host discovery on the LAN.
I think I know part of what needs to be done, though I would appreciate your thoughts. If a player decides to host a game, I assume I need to have that host do an IP broadcast to the LAN. If the player dissolves the game, then again I would guess that host needs to broadcast the fact to the LAN. (Can I do that using TCP, or do such broadcasts have to be UDP?)
The part where I’m not sure what to do is this. Suppose there are already games being staged on the LAN, and a new player joins the LAN. What is the best way for that player to be made aware of the games? Does the host need to issue periodic broadcasts, so that the new player learns of the game? If so, what is a good time interval? Or is there a better way to do it altogether?
Thanks,
Willie