Search Unity

Unet player island

Discussion in 'UNet' started by Avi3ator, Nov 11, 2018.

  1. Avi3ator

    Avi3ator

    Joined:
    Feb 29, 2016
    Posts:
    64
    Hi! Im working on a project to learn some C# unet.
    I want to create a spawn system that gives each player their own island, and other people can visit that island(kinda like Clash of clans or pirate kings). And i would be happy to get some pointers and tips on how to do this :)
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    My first tip would be that Unet is being removed from Unity in a matter of months, so putting effort into learning it now is not the best use of your time. Choose a networking API that isn't deprecated.

    Also a game like Clash of Clans wouldn't do well with the Unet HLAPI, as players are primarily in separate locations that don't need to and you don't want to sync to all other connected players (which is what Unet's HLAPI is build for). You'd want to build your own networking needs on top of a lower level API, so you just sync to individual clients what they need.
     
  3. Avi3ator

    Avi3ator

    Joined:
    Feb 29, 2016
    Posts:
    64
    okay so this isnt easy with photon aswell? They dont have any like built in feature?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Every networking API has some form of low level messaging functionality.
     
  5. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    With Photon you could use RaiseEvent to handle communication between clients, that way you can control specifically who you send data to. So you could avoid sending data between players that are on different islands.

    It's essentially the same problem we faced with the RPG we're developing when players are on different maps, which we resolved by using RaiseEvent.