Search Unity

World map - server split

Discussion in 'Multiplayer' started by UDN_be4973e8-b365-499d-8a6d-fa8aba66ef24, Jun 2, 2017.

  1. UDN_be4973e8-b365-499d-8a6d-fa8aba66ef24

    UDN_be4973e8-b365-499d-8a6d-fa8aba66ef24

    Joined:
    May 31, 2017
    Posts:
    2
    Hi, I have worked in Unity for almost 4 years and I have always found the solution in the forums for almost anything, but I think that after a certain time one starts to create more ambitious projects and now I am in one of those projects in which I was not almost nothing.

    Basically I would like if it is possible to have a world and divide it into a grid where each frame is controlled by a server, in this way divide the load of a whole world into different servers. Something like that:



    I have only managed to do the basic tutorial of Unity provides of multiplayer, if anyone knows about any tool or an asset that can use would be great.

    It would also be helpful to know the term of what I am trying to do.

    Again thank you very much :D
     
  2. donnysobonny

    donnysobonny

    Joined:
    Jan 24, 2013
    Posts:
    220
    Ultimately what you are referring to is known as "interest management", which ultimately states that every peer you network has some sort of area of interest and will only receive updates for other objects that fall within that area.

    UNET's HLAPI has this functionality in the form of proximity. I haven't personally used it but I assume it will work based on distance checks rather than some sort of grid, but you might want to check that out if you're already using UNET, maybe someone in here can give more info on it if they have used it.

    If you want to venture out further, there's not really much in terms of a solution that you can already use. What you will find though is that there are plenty of algorithms out there that help you define grids/tiles in which you can easily determine the relationship between an object and the tiles of your world. If you manage to get something like this working you'll find it to be far more efficient than using proximity checks (like UNET will be using) because proximity checks are constantly doing distance calculations which are not cheap. A tile/grid setup is less accurate (because your interest management is based on a wider area by saying "is an object in this general area" rather than "is an object exactly within a certain distance") but you should find it to be more efficient overall.

    Feel free to ask further questions in here while you're learning more about the topic. It's a pretty complex one that's for sure!
     
    Devin299 likes this.
  3. UDN_be4973e8-b365-499d-8a6d-fa8aba66ef24

    UDN_be4973e8-b365-499d-8a6d-fa8aba66ef24

    Joined:
    May 31, 2017
    Posts:
    2
    First of all thanks for the replay, i'm going to check "interest management" :D sounds interesting.