I’ve been reading through the docs for a couple of days and I still have questions. I’ve even watched this video that walks through the Tanks app
-
My game has eight maps that can be chosen from. After the host chooses one of the maps, how does this get specified to all clients? I see that I’m supposed to drag only one play scene into the Network Manager inspector.
-
I’ve discovered the lobby hook script, and I believe this is how we send player names from the lobby to the play scene. Can anyone recommend some reading material on this, as I find both the documentation and Tanks project to be a little overwhelming.
-
I my game, each user is in fact playing their own game, but competing for the highest score. Each client needs to see only the other player’s progress. I believe this gets done with SyncVars. However, I’m confused about what the players are supposed to be. Do I need to specify an actual game object for each player, despite there being no “player” characters in my game?
Any advice is appreciated.
If players are simply playing their own game and just sharing their progress it doesn’t sound like you need a lot of the features UNet’s HLAPI is built around. I’d consider using something like UNet’s NetworkServerSimple and just share your progress back and forth with messages.
https://docs.unity3d.com/ScriptReference/Networking.NetworkServerSimple.html
https://docs.unity3d.com/Manual/UNetMessages.html
My vision is a game where two players do their best while seeing opponent progress in real time. It’s an air traffic control game. Ideally, a player would see information about their opponent such as numTakeoffs, numLandings, crashes, and stress. The game would end when someone has a crash, or when someone achieves 100 airplanes moved. I suspect the multiplayer platform is what I’d need, but I like the NetworkServerSimple concept, and will read through both links.
Any answers?
My game has eight maps that can be chosen from. After the host chooses one of the maps, how does this get specified to all clients? I see that I’m supposed to drag only one play scene into the Network Manager inspector.
Thanks, MichalBUnity. I’ve gone through the project you posted, but found it difficult to sift out the info I needed. Sounds like NetworkManager.ServerChangeScene is all that I need to make all clients move to a specific scene.