Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity Multiplayer Single exe for multiple rooms

Discussion in 'Connected Games' started by atmuc, Jan 10, 2016.

  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    i will build my game for windows and deploy it to a vps on internet. running separate exe file for each room will consume too much memory. my game is turnbased so single instance can handle 100 rooms.

    for each connection there will be a player object on the server and this player will be created on other clients. how can i limit this creation? i want players A,B,C to see their player objects like they in a private room and players D,E,F to see their player object. how can i do that?
     
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
  3. GraphXCreations

    GraphXCreations

    Joined:
    Jul 6, 2014
    Posts:
    121
    Will this work like the old legacy unity networking used to have "Network groups" feature?

    because the way i see it , it currently only does area of interest and not network groups, right?
     
  4. Severos

    Severos

    Joined:
    Oct 2, 2015
    Posts:
    161
  5. robertono

    robertono

    Joined:
    Jun 3, 2014
    Posts:
    21
  6. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    UNet does not support LoadSceneAdditive, in particular loading the same scene multiple times when it contains scene objects with NetworkIdentities.
     
  7. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    Single scene is ok for me. i can handle 100 rooms in single scene for a turn based game. as saying room i mean a group of players, i do not mean real isolated room. if i use network visibility, will it supply security for me? i do not want to send one room's info to other room.
     
  8. Severos

    Severos

    Joined:
    Oct 2, 2015
    Posts:
    161
    Do you mean if I write a server in UNet I can't open more than 1 scene at a time? what if server have multiple maps? will I have to run 1 at a time only? how would something like an mmo work with a single scene???

    it's tricky to use network visibility, you can make players not see each others, but lets say you have colliders, they'll hit each others normally since they all exist in the same place on your server, it's just that the client doesn't see it.
     
  9. clever

    clever

    Joined:
    Oct 11, 2012
    Posts:
    35
    Also working on a turn based game with multiple rooms and having the same dilemma, currently using Network Groups to emulate rooms but the new UNET doesn't let you do this easily. I'll have to think about how NEtwork Visibility might work. The other way is to use Network Messages instead of spawning players which I'm leaning towards currently.
     
  10. Alfy00

    Alfy00

    Joined:
    May 3, 2016
    Posts:
    1

    Did you come right with this?

    I'm interested in doing something similar with PUN, but I found when I created and joined a room on the same scene, it automatically disconnected the previous room the scene was connected to.
     
  11. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    network visibility can manage players on client side. now i create single player as local player. there are many players on server side. so it solved my problem.