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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

MMO Login Server Question

Discussion in 'Multiplayer' started by moynzy, Jan 27, 2016.

  1. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    Hi,

    My background on MMO is that I have only played a few.

    Network programming skills are of a novice.

    I have implemented a basic Login Server where the Login Server listens for clients, if clients disconnects then no problem. If client sends correct user name and password then the login server is happy. If not then the login server says "Wrong credentials".

    Now I'm not looking for a technical answer with real world safety practices. What I want to know is what happens when the client sends the correct credentials. (This is a dirty prototype)

    On the client front end, will the client join the master server? Or does the login server take the clients IP address and port number, and send it to the master server.

    In the client front end, when the client logs in, would you open up the lobby where you can chat and join games?
     
  2. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    The credentials should be one way encrypted before sending to the login server, but on success, you would pass address and port number of the lobby server, and move to a lobby scene in your project. Whereupon the client connects to the lobby server, and you move on from there. This enables you to move the lobby server, or have multiple lobby servers without patching the game.
     
  3. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Your clients should receive a unique token associated with their IP+port from the login server for authentication with the rest of the backend, as IP+port alone should never be enough.
     
    Whippets likes this.
  4. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    Thanks for the reply.

    From my undertstanding from reading your post, does the login server pass the port and ip to the client? or is the IP and port for the lobby server hard coded into the client application.

    So the client logs in, the login server passes the lobby server ip and port, then then client connects and opens up the new scene regarding lobby stuff. The client also disconnects from the login server.

    P.S I have made sure the login server is a separate application .EXE. Would you make the lobby server a separate application .EXE or would you say the lobby server, chat server is a child of the master server in the same .EXE?
     
  5. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Best bet is for the login server to return ip, addr, and token for the game server. I have chat as part of the game server, as it's not a heavy load. Movement is by far the worst culprit of server load and bandwidth use.
     
  6. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Yeah, even a desktop-class i7 can handle over a quarter million chat clients. Adding 3D movement you're down to a few hundred clients in many cases.
     
    Whippets likes this.