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

Need help on creating server only

Discussion in 'Multiplayer' started by Static_Max, Oct 19, 2015.

  1. Static_Max

    Static_Max

    Joined:
    Sep 28, 2015
    Posts:
    3
    Hello.
    I want to know, how i can create MMO server. (like ULTIMA or WOW )
    1) I need create simple server console app.
    2) Unity game client (it i can do)

    I cant wind any documentation about it.

    Thanks!
     
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Take a look at this video, if you haven't already:



    -Rasmus
     
  3. Static_Max

    Static_Max

    Joined:
    Sep 28, 2015
    Posts:
    3
    I saw it. But there server and client is one project.
    I want to create server ( where will be physics calc, movement, mobs, etc all other logic )
    Client should not contain server logic.
    Thanks!
     
  4. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Moving this thread to Multiplayer forum. Hope you'll be able to get some feedback there
     
  5. kernon

    kernon

    Joined:
    Jul 10, 2012
    Posts:
    2
    While I wouldn't call this a perfect solution, you could consider running the client in batch mode. While seemingly a little odd, the standalone player does have support for it.

    http://docs.unity3d.com/Manual/CommandLineArguments.html

    Take a look at the -batchmode command line arg under the Unity Standalone Player command line arguments heading.
     
  6. jaybdemented

    jaybdemented

    Joined:
    Sep 2, 2013
    Posts:
    112
    I'm a complete noob when it's comes to networking so take what i say with a gran of salt. but I do believe you can build a headless linux standalone and it should work as a server.
     
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I don't use Unity's built in networking but I run unity instances headless as servers all the time. Just a tip whip up an editor script that automates building your headless player, so you don't have to constantly be changing build settings. Multiplayer means you are constantly doing builds.

    http://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html
     
    danrayson likes this.
  8. kernon

    kernon

    Joined:
    Jul 10, 2012
    Posts:
    2
    Looks like the option that would enable this then is EnableHeadlessMode.
    @snacktime does that work for Windows and Linux standalone instances?
     
  9. Noob4Sale

    Noob4Sale

    Joined:
    Mar 10, 2015
    Posts:
    11
    You can use pre-processor directives to separate the server and client logic from each other.
     
  10. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Yes works for both.

    Once you build in headless mode the following command line options are what I use for both windows/linux

    -batchmode -nographcis -logFile ./logfile