Jump to content

lan game discovery


Recommended Posts

hello everyone!

i wanted to ask if there're already plans for lan game autodiscovery.

i couldn't find anything related to that in the forums or in the tracker what made me wonder a bit, since you already have a online lobby.

also i guess it wouldn't be to hard to implement and i would give it a look if nobody else is working on it so far.

regards

  • Like 2
Link to comment
Share on other sites

ok, i had a first look into it. it seems like the enet library doesn't provide any functionality for it, so i'd have to make it myself.

i think the easiest solution would be a simple udp broadcast to 255.255.255.255.

didn't have the chance to talk to the networking people, so this goes to you: what do you think about this solution, and if you like it, what would be the cleanest way to implement it?

i thought about a simple pthread in NetServer.cpp

Link to comment
Share on other sites

ok, i had a first look into it. it seems like the enet library doesn't provide any functionality for it, so i'd have to make it myself.

i think the easiest solution would be a simple udp broadcast to 255.255.255.255.

didn't have the chance to talk to the networking people, so this goes to you: what do you think about this solution, and if you like it, what would be the cleanest way to implement it?

i thought about a simple pthread in NetServer.cpp

Seems reasonable, but will LAN games be a separate mode? Or will any non-lobby mulitplayer games also send these messages? And I wonder how the UI might look, perhaps when hosting (Multiplayer > Host Game) there could be an option to enable LAN advertising, and when joining (Multiplayer > Join Game) there could be an option to display the list of LAN games. It's a convenient feature to have :)
Link to comment
Share on other sites

IMO it would make sense to reuse as much as possible from the multiplayer lobby which is currently internet only (I'll call it internet lobby).

Most of the features from the internet lobby are also needed or nice to have for the LAN lobby (chat, map preview etc.).

Reusing avoids duplication and helps achieving a more coherent user experience. I'm not saying it's trivial though because the internet lobby wasn't designed with that in mind as far as I know.

Some important differences:

  • You don't need a registered online account for the LAN lobby
  • The rating stuff and probably most of the spam and cheat prevention stuff isn't needed for the LAN lobby
  • Hosting, Joining and listing available games works different technically
  • ICMP chat without the lobby server won't work for the LAN

The use cases that need to be covered are:

  • Host unlisted LAN/Internet game directly
  • Host listed LAN game
  • Host listed Internet game
  • Join LAN/Internet game with IP
  • Join listed LAN game with LAN lobby
  • Join listed Internet game with Internet Lobby

Keeping the direct hosting and joining is necessary IMO.

LAN discovery won't work accross subnets for example and you could want to play with players in multiple subnets but still in a LAN setup.

I'm not completely sure about hosting. Direct hosting does not need any network discovery functionality (either LAN or Internet), so it could be nice to have in some setups.

Maybe it could even reuse the internet lobby and add LAN games to the same list with some filter functionality (checkbox LAN, checkbox Internet).

This would need changes to the internet lobby logon though. It could have a LAN-Only mode where it does not display internet games and does not need a registered account for the login. There could also be checkboxes for "internet listed and LAN listed" for the hosting. Checking none of them would be the same as the "Host game" option from the main menu (use case "Host unlisted LAN/Internet game directly").

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...