How to setup offline connection and data exchange between Android Phones
Hi, I am new to Unity Networking. I have to do make an Android offline multiplayer game via WiFi. There will be max. 4 players. It is a very simple 2D game, so I won't have to synchronize any player movement or respawn anything, so maybe the Unity Network Manager is too much for it. Since it is a location based game I will have to synchronize the location (GPS) of all players. At special locations events will be triggered. These events are small turn based fights. During a fight every player can select an enemy to attack - so I will also have to synchronize who chooses which enemy and how much damage they make - so everyone can see on their phone how much life every enemy and player has left at the end of the round.
I don't really know how to start. How do I setup the Network and what is the best way for synchronizing? I suppose I need a client-server structure and one player has to be both?
I've read the documentation on networking and maybe I could use network messages for synchronizing and the code here Network Clients and Servers together with the Discovery function to build up a connection?
Am I thinking the right way or is there a better/easier way for my "networking-needs" in this game? Or should I maybe just make a huge object that contains all the data that I want to be synchronized and just synchronize that object with everyone (I don't have a clue on how to start on THAT)?
Your answer
Follow this Question
Related Questions
Android VR Application crashing without splash screen. 0 Answers
voice recognition 2 Answers
[8 days stuck at it] I upgrade project from 5.4 to 5.5 and 5.6 giving Failed assemblies stripper. 0 Answers
Different Unity games cannot install on same Android device 4 Answers
Unity (PC/Mac) communication with Non-Unity (Android/iOS) over LAN? 2 Answers