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

Is anyone interested in having their own Server application? FOR FREE

Discussion in 'Multiplayer' started by limjq44, Jul 14, 2017.

  1. limjq44

    limjq44

    Joined:
    Sep 16, 2016
    Posts:
    10
    Sorry if I am spoiling the market of those paid assets but I am pretty sure that those paid ones are better, but if you are looking for one that is FREE(You can use photon too), then I might write one up if there are many request for it.

    Sorry for my noob english btw..

    How it works :

    Basically I have written a Server application using Java(netty.io) and hosting that application on amazon ec2, then I will write the client code on the unity c# side to connect to the Server and do whatever you want to. Amazon EC2 will only be free for 1 year and after that you'll have to pay, you can use other virtual pc too if you want to

    Communication wise, we will be using Socket(TCP) between Java and C#, you might not want to do something that is very real time because you have limited bandwidth available and if you exceed, you need to pay amazon.

    **if you want to have database, only the Server application can connect to the database, which prevent people from unpacking your unity app to search for your database connection username and password. (I've exploit some programs which does that and able to dump the whole database,which is very UNSAFE)

    Example of room create and what is going on between server and client :
    ** Of course all the commands will be encrypted



    You can request whatever functions you want here and I'll try to write it out / other people can contribute it too / other people can correct my codes if I am wrong about anything..

    E.g

    - Simple small scale key exchange(because I am doing it on mobile that's why small scale but I am sure if you're developing on PC you can do it)
    - Encryption of all data sent to and fro server
    - Login/Create Acc
    - Room Lobby
    - Individual chat rooms
    - Messaging system
    - Automatic timeout for players whose connection suddenly disconnect
    - IP ADDRESS Ban function

    Currently I have all these functions only because my Unity app only need all these, but I can write up more such as matchmaking etc

    I am not sure how others are really doing it [by dragging prefabs (?)] but I am doing this with my own approach of using Java server instead, you'll be in control of everything and will write your own algorithms to fit your needs

    So let me know if you are interested and I'll write a tutorial up and provide the files and code needed.

    ==================================================================
     
    Last edited: Jul 20, 2017
    Rotary-Heart and Gametyme like this.
  2. fvde

    fvde

    Joined:
    May 15, 2014
    Posts:
    19
    Interested, yes definitely! To be honest more from a knowledge exchange perspective as I'm writing my own (more RESTful) server currently. Do you plan on making the code open source and let others selfhost with their own AWS accounts or what's your approach?
     
  3. limjq44

    limjq44

    Joined:
    Sep 16, 2016
    Posts:
    10
    Yes the codes will be posted here, well I would love to know more about your restful approach too!
    And yes they must open their own amazon accounts and host it themselves.

    The tutorial will be full of codes and not sure if some people will understand or not but it's really all about the syntax barrier imo.
     
    fvde likes this.
  4. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Definitely interested, I have been thinking about building one so having a base code for the server will definitely allow me to keep working on the game
     
  5. limjq44

    limjq44

    Joined:
    Sep 16, 2016
    Posts:
    10
    Well, you guys really make me wanna start writing straight away but I'll need something to get me started, like maybe for example, when you create a room, what is needed inside a room object? E.g room_id, room_title, players_name[ ], player_level[ ]

    Etc etc

    And u guys have to tell me if you need login function.. If there's a login, there must be a database