Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

My co-op RPG game.

Discussion in 'Multiplayer' started by StarGamess, Jan 2, 2015.

  1. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    So me and my friends have created a small co-op RPG game but we wanted the world to be huge so we had to spilt it up into different scenes. The way it is set up now is that if 1 person wants to enter a zone everyone currently playing needs to enter the same zone. Now here is my question is there a way around this so people can play in different scenes but still be on the same server? Or game has a maximum of 12 people and we are using Photon to host or server. It not something we intent to release but more for or own fun.

    And sorry if this post contains any grammer errors my english isn't that great.
     
  2. Sbizz

    Sbizz

    Joined:
    Oct 2, 2014
    Posts:
    250
    Of course you can have different players on different scenes. They will be able to "talk" to each other as long as they are in the same room.
     
  3. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    yea but if one of them joins and i dont let the server load the scene then if another one joins later he will be in the same scene but in a different instance so he wont see the other guy who was already in.
     
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,018
    It might make sense to join the room and find out where the others are. Then load the scene as necessary.
    It should not be a problem in PUN, as it doesn't mind which scene you are in.

    If you destroy stuff that gets loaded with the scene, then you might need extra work.
    The room properties are available really early when you join. You can store the current position/scene in there. When you join, the room props change and you get a callback. You can pause the incoming message queue there and load. When you loaded the scene, unpause the message queue and all messages you get should relate to the scene you now loaded.

    I can't provide a proper solution and it might be a bit more tricky to actually do this, but that's the general idea.
     
  5. StarGamess

    StarGamess

    Joined:
    Jul 21, 2014
    Posts:
    179
    Thanks Tobiass but we decided to make the co-op a little more like borderlands this is alot easier for us as a small team. So this is no longer a problem for us.