4
« on: July 22, 2014, 01:14:22 PM »
I want to preface that I'm new to network programming and methodologies as a whole, but I've been doing a lot of research on Unity networking solutions and yours seems to be the best fit for me. I've been spiking out which to use and thus, have not bought one yet.
I'm creating a multiplayer adventure game that is client hosted and contains several scenes. One of the biggest hurdles for me is multi-scene games. No example I've come across goes over this and I'm not sure if this is because they aren't possible or if the logic behind them is so simple that no one bothers. I'm looking for clarification.
So I have Player 1 (P1) and Player 2 (P2). P1 creates a game and loads Scene1. P2 joins the game and also loads Scene1. This is as far as most tutorials/examples/etc go. Let me know if any of the following is incorrect:
From here we use channels to divide the network traffic - generally 1 channel per scene and another channel for things like chat. So P1 and P2 are in channel1 together in scene1. P2 wants to go ahead and goes to the "load scene2" trigger, which then makes P2 leave channel1 and join channel2 (for scene2). Now, scene2 has some things that need to be generated on load, like which enemies to spawn - which should be done on the server/host - in this case P1.
Is it possible for P1 to be in scene1 (and channel1) while feeding state information of scene2 (over channel2) to P2? Would this be done through RFC / RPC calls? What's the best way to handle a situation like this?