Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Moving from one server to another via edge of map.

Discussion in 'Multiplayer' started by BongMcPuffin, Nov 15, 2017.

  1. BongMcPuffin

    BongMcPuffin

    Joined:
    Oct 16, 2017
    Posts:
    26
    Hi there, I'm not sure this belongs here or in the scripting forum, but since this applies to an idea I have for an online multiplayer game, I figured I'd ask here.

    In most games like say Ark or Rust, you have a single big map and every server is basically a stand-alone instance of the game, and you can't interact with the people on a different server unless you log off the server you're on and join the new server, which in effect is starting all over again.

    In the game Everquest, the game was broken into a bunch of different zones, and once you hit the zone boundary you'd leave the zone you were in and just pop out of existence, and then load into whatever zone you were going into and magically pop into existence on the other side of the zone-line. This is getting closer to the behavior I'm looking for, but in Everquest, loading a new zone doesn't load you into a different server. You could still talk to other people elsewhere on the server.

    There is only one game that I know of that has the desired behavior I'm looking for called Wurmonline, which is what Notch made before he made Minecraft, and it basically looks like Everquest and Minecraft had a baby. In Wurmonline, if you were able to make it to lets says the eastern the edge of the map and not drown before you got there you'd hit an invisible wall and you'd load into a totally different server in the ocean on its western side. In this way, you could hop between servers.

    What I'm wondering is if its possible to recreate this server hopping behavior in Unity so I could effectively make an official server-cluster and let other server admins make their own little cluster of islands that can all be accessed from each other by traveling to the maps edge. In theory, if someone was so inclined, they could create an entire island nation like Indonesia or the Philippines.

    In the image below it looks like you can only travel one direction, but I didn't want to draw twice as many arrows and double the text, just assume that if you can travel one way, you can travel the other way. Also, I realize I missed an arrow going to Server 6. I'm just lazy like that I guess.



    I'm not looking for any specific code here, I'm just wondering if this can be done with Unity.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    This is what I'm doing in my game I'm making basically, though without the 3rd party admins adding new islands.

    I take the entire world, chop it up into zones, and when the player hits the border of a zone the zone server asks the master server what the IP address and port number is of that adjacent zone (if that adjacent zone isn't running currently then the master server launches it). Then the zone server the player is on tells the client to disconnect and connect to that adjacent zone. At that time the zone server updates the database with the player's current location so when they connect to the new zone server the zone server will know where to place them. I store the player's location in the database as latitude / longitude which the zone server then converts to a Unity X / Z position.
     
  3. BongMcPuffin

    BongMcPuffin

    Joined:
    Oct 16, 2017
    Posts:
    26
    Thats cool, its good to know I'm not the only one thinking along these lines.

    In my example, the 3rd party admins wouldn't add new islands to the "Official (Vanilla)" cluster, but would instead be able to set up their own private clusters so they can create their own worlds and add custom scripts/mods/etc.