treba Posted January 25, 2014 Report Share Posted January 25, 2014 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 2 Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted January 25, 2014 Report Share Posted January 25, 2014 If you can do something like that, go ahead You can join #0ad-dev on quakenet if you want info on something, or to discuss stuff. 1 Quote Link to comment Share on other sites More sharing options...
treba Posted January 27, 2014 Author Report Share Posted January 27, 2014 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 Quote Link to comment Share on other sites More sharing options...
Yves Posted January 27, 2014 Report Share Posted January 27, 2014 i think the easiest solution would be a simple udp broadcast to 255.255.255.255.It's the only sensible way I know about and I think it's the right way.I don't know the network code and can't say anything about the implementation at the moment. Quote Link to comment Share on other sites More sharing options...
treba Posted January 28, 2014 Author Report Share Posted January 28, 2014 alright it seems like enet can do it. i'm now just doing it some way, just to get it working. then we can discuss if something should better move to some other place. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted January 29, 2014 Report Share Posted January 29, 2014 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.cppSeems 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 Quote Link to comment Share on other sites More sharing options...
treba Posted February 5, 2014 Author Report Share Posted February 5, 2014 i think the right way would be to remove the host/join menu points on the long run and replace them something like this:there should still be a button for 'join by ip' though 1 Quote Link to comment Share on other sites More sharing options...
Yves Posted February 6, 2014 Report Share Posted February 6, 2014 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 lobbyThe rating stuff and probably most of the spam and cheat prevention stuff isn't needed for the LAN lobbyHosting, Joining and listing available games works different technicallyICMP chat without the lobby server won't work for the LANThe use cases that need to be covered are:Host unlisted LAN/Internet game directlyHost listed LAN gameHost listed Internet gameJoin LAN/Internet game with IPJoin listed LAN game with LAN lobbyJoin listed Internet game with Internet LobbyKeeping 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"). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.