- Home /
Android multiplayer using hostpot wifi
Hi, I need help urgently, I'm trying to make a multiplayer game, the idea is for Android by wifi access point without internet, I want users to create games, and another can join them, and when they join they appear in a menu all those who are in that game and have a button to be ready and start the game. Which component do you recommend to use? I did so much with Network discovery and lobby manager but in none I managed to complete all that I want .. It is urgent please
Answer by BruceKristelijn · Nov 23, 2018 at 10:54 AM
I don't know if you have found these components already but here is a summery of topic to look into and use to realise this quickly.
First you use the Network Discovry function to discover other games
https://docs.unity3d.com/Manual/UNetDiscovery.html
Then when a user joins you user the Networking Lobby system to create a pre-game lobby,
https://docs.unity3d.com/Manual/UNetLobby.html
https://docs.unity3d.com/Manual/class-NetworkLobbyManager.html
This FREE asset has basically all the lobby fuctions you ask for but uses the Matchmaking system over internet so you need to change it a little bit to work with network discovery (Should not be too hard)
https://assetstore.unity.com/packages/essentials/network-lobby-41836
I believe this can set you into the right direction altough I feel you already where going there. Altough I cannot send you a full project I can still help you futher if this did not fully statisfy your question :)
brucekris44 Thank you. If I saw these components but did not know that I could use them together, I thank you, you made it clear to me. I have a doubt about network discovery, I would have to create a list of the games created with a prefab of a button, so that the client can find the ip of the host and thus join the same lobby, if I'm not mistaken, right?
You can indeed use a prefabs to give users the option to join other lobbys. Laso a tip for using network discovery, When i used it it gave me a 3 entries from the same game so maybe it is an idea to check if you already have saved the ipadress of that game so you will not instanciate 3 buttons doing the same
after having managed to make the network discovery and a lobby for the clients in the network, I am having problems when changing scene, what I want to do is from the scene of the lobby, to run to a loading scene and from there just the scene of the game but I get the prefab game players appear in the game scene.
Are you still needing help with this? Only just now saw the question. I have once exaclty made a system like you discribe so I might be able to help further.