Search Unity

Multiplayer Servers

Discussion in 'Multiplayer' started by Twisttid, Sep 25, 2014.

  1. Twisttid

    Twisttid

    Joined:
    Jun 9, 2014
    Posts:
    5
    I'm not currently doing anything with this right now, but I really wanted to see how ti worked.

    So, I was wondering how exactly do you make a login screen and realms linked to a server or servers, like in an MMORPG? What is the process? What types of things are required? etc.
     
    noahgamedesigner16 likes this.
  2. cjkupers

    cjkupers

    Joined:
    Oct 9, 2014
    Posts:
    2
    There are quite a few things you have to do to code your own backend API that supports Client-Server data access which you can pull from in your Unity based game.

    Here are some of the things you may want to learn before tackling your own Client-Server API.
    1) SQL Server - the database that will store your information
    --SQL (Language)
    2) XML, INI, HTML, or similar text file which can describe types of data - for configuring connection information to your server, to be packaged with your client. (This is for mobile standalone packaging sake)
    3) A C# Method of accessing databases securely (i.e LINQ to entities, ADO/~.NET, etc.)
    4) Remote SSL skills (to manage your server remotely, if you use a cheap off-site unix based server to host SQL Server)

    The above topics may take lots of time for one person to sink their efforts into learning, especially if you have a day job. This is why there are development sub-groups in this community that are focused solely on creating and maintaining portable, reusable code in the form of their own marketable APIs which can be sold or licensed for the sake of covering costs of development.

    I would highly recommend taking a look at currently existing projects like Photon in C# and then modifying the code after reading and learning from it to trim down what you may or may not need for you application.
     
  3. cjkupers

    cjkupers

    Joined:
    Oct 9, 2014
    Posts:
    2
    Just a pre-emptive tip-- if you learn ADO, i highly recommend creating a local loopback server application that handles the secure connection between client and server. Coding direct access calls into your clients means they establish connections directly to your SQL Server, which in practice is NOT secure. Having a front-end for your back-end that handles logging in, information exchange and encryption which commits information to its own local database is better, and allows for better port control.

    It also lets you choose between SQL Express and SQL Compact, which means you can make "Server Repacks" that dont require a SQL Server service running and lets you access an inactive type database in the form of a file rather than an active schema.

    Edit: And I forgot, but if you are adept in C#, you would have an easier time using LINQ, allowing you to not have to learn the whole of SQL Query language.
     
    Last edited: Oct 9, 2014