Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

uMMORPG Official Thread

Discussion in 'Assets and Asset Store' started by vis2k, Dec 29, 2015.

  1. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Good morning everyone! Here is a quick screenshot of the item mall in progress:
    Screenshot at Jan 29 10-56-39.png

    The whole thing will be really easy to use. Items will have a 'itemMallPrice' property and if we set it to >0 then the item will appear in the item mall automatically. The categories on the left are automatically parsed from all the items with itemMallPrice > 0.

    What's the name of the project?
     
    CrandellWS, jagatai33, cioa00 and 2 others like this.
  2. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    My new project is called Solum Fable
    The old one is in the signature.
    The item mall looks amazing! Love all new features! :)
     
    vis2k likes this.
  3. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Sorry for double post but what I try to accomplish is the following:

    <i>(Armor not equiped)* </i>
    When I equip a Chest I don't want a 3d model, I just want to replace the None Material with a transparent image suited for my UV map!

    Simply like that, I would be amazing if I could get guidance or a whole explanation, I think it would make a great feature!
    I was thinking simple so I've started out with:
    Code (CSharp):
    1. //Added if no Valid Model just debug
    2. void RefreshLocation(Transform loc, Item item) {
    3.         // clear previous one in any case (when overwriting or clearing)
    4.         if (loc.childCount > 0) Destroy(loc.GetChild(0).gameObject);
    5.  
    6.         // valid item? and has a model? then set it
    7.         if (item.valid && item.model != null) {                  
    8.             // load the resource
    9.             var go = (GameObject)Instantiate(item.model);
    10.             go.transform.SetParent(loc, false);
    11.         }
    12.         else if (item.valid && item.model == null)
    13.         {
    14.             Debug.Log("Armorswap");
    15.         }
    16.     }
    Code (CSharp):
    1. //in items.cs
    2. public Material ArmorTexture
    3.     {
    4.         get { return template.ArmorTexture; }
    5.     }
    6. //in ItemTemplate.cs
    7.     public Material ArmorTexture;
    Now I just need to figure out how to swap materials should I look at the old swap for 3d model and modify?
     
    Last edited: Jan 29, 2017
  4. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    You can just set renderer.materials[0] to your material of choice, if that's what you are asking.
     
    MHolmstrom likes this.
  5. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I'll try then, but first I need to get the Child component, guess I can use a normal public game object, define per class where it's located.
    But last time I tried there was a lot of compile errors it didn't want to find it for me.
    Something like
    Code (CSharp):
    1. public MeshRenderer meshRenderer = gameObject.GetComponent <MeshRenderer>();
    2. meshRenderer.materials[0] = item.armorTexture;
    Could work.
    But the valid.item && item.model == null sorta destoryed tho actuall equipping such as shoulders, head etc.

    Edit:Nothing Happens, My code is:
    Code (CSharp):
    1.  
    2. //itemTemplate,cs added
    3.     public Material ArmorTexture;
    4. //item.cs added
    5.     public Material ArmorTexture
    6.     {
    7.         get { return template.ArmorTexture; }
    8.     }
    9.  
    10. //This is what I added around header section
    11. [Header("TextureEquipment")]
    12.     public SkinnedMeshRenderer ArmorRender;
    13.  
    14. //modified RefreshLocation
    15. void RefreshLocation(Transform loc, Item item) {
    16.         //playerchild = GetComponentInChildren<GameObject>();
    17.         // clear previous one in any case (when overwriting or clearing)
    18.         if (loc.childCount > 0) Destroy(loc.GetChild(0).gameObject);
    19.  
    20.         // valid item? and has a model? then set it
    21.         if (item.valid && item.model != null && item.ArmorTexture == null) {              
    22.             // load the resource
    23.             var go = (GameObject)Instantiate(item.model);
    24.             go.transform.SetParent(loc, false);
    25.         }
    26. //Testing Texture from item
    27.         else if (item.valid && item.ArmorTexture !=null && item.model == null)
    28.         {
    29.             ArmorRender = GameObject.Find("HumanMale_Mesh_LOD0").GetComponent<SkinnedMeshRenderer>();
    30.             //ArmorRender = gameObject.GetComponent<SkinnedMeshRenderer>();
    31.             ArmorRender.materials[0] = item.ArmorTexture;
    32.  
    33.  
    34.  
    35.         }
    36.  
    37.     }
    It does indeed find the Skinned Mesh render but it will not set the material for some reason, not sure if I have to make an array function to get the material or where to go from here..
    Added a Debug.Log("apply texture"); as well and it's printed out so guess my problem is
    Code (CSharp):
    1. ArmorRender.materials[0] = item.ArmorTexture;
     
    Last edited: Jan 30, 2017
  6. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
  7. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I got it working now but I have to make sure it get's taken away when equipped now!
    Here is the solution for anyone who wants to try it out!!

    How it works, just make a new item from the template, make sure to not set a 3d model and just set the Armor Texture, it will not work because the RefreshLocation now checks if there is no 3d model apply texture.
    Code (CSharp):
    1. //Open up itemTemplate and add after public Sprite image;
    2.     public Material ArmorTexture;
    3.  
    4. //Open up item.cs after any public variable add
    5.  
    6.     public Material ArmorTexture
    7.     {
    8.         get { return template.ArmorTexture; }
    9.     }
    Code (CSharp):
    1. // Start off with adding a new Header somewhere around the others or add to existing one.
    2.     [Header("TextureEquipment")]
    3.     public SkinnedMeshRenderer ArmorRender;
    4.  
    5. //Replace the whole RefreshLocation in Player.cs
    6.  
    7.    void RefreshLocation(Transform loc, Item item) {
    8.         //playerchild = GetComponentInChildren<GameObject>();
    9.         // clear previous one in any case (when overwriting or clearing)
    10.         if (loc.childCount > 0) Destroy(loc.GetChild(0).gameObject);
    11.  
    12.         // valid item? and has a model? then set it
    13.         if (item.valid && item.model != null && item.ArmorTexture == null) {              
    14.             // load the resource
    15.             var go = (GameObject)Instantiate(item.model);
    16.             go.transform.SetParent(loc, false);
    17.         }
    18.         //Testing Texture from item
    19.         else if (item.valid && item.ArmorTexture != null && item.model == null)
    20.         {
    21.             var mats = ArmorRender.materials;
    22.             mats[1] = item.ArmorTexture;
    23.  
    24.             ArmorRender.materials = mats;
    25.             ArmorRender = GameObject.Find("INSERTYOUCHILDWITHMATERIALHERE").GetComponent<SkinnedMeshRenderer>();
    26.             //ArmorRender = gameObject.GetComponent<SkinnedMeshRenderer>();
    27.             ArmorRender.materials[0] = item.ArmorTexture;
    28.  
    29.  
    30.  
    31.         }
    32.  
    33.     }
    34.  
    35.  
    OBS EDIT THE INSERTYOUCHILDWITHMATERIALHERE to the gameobject carrying the materials you want to apply also make sure the Skinned Mesh Render have more then 1 Material slot.


    Sorry for asking but ArmorRender.materials[0] = null; will not work so any ideas how to set the material to null if you use a 3d object? :)

    RESULTS:
    3D Object no Texture

    RESULTS:
    Texture no 3D Object

     
    Last edited: Jan 30, 2017
    cioa00, bartuq, Zhenite and 3 others like this.
  8. Zhenite

    Zhenite

    Joined:
    Dec 6, 2016
    Posts:
    58
    Is there an event when I select a mob, or something that indicates when I select a mob?
     
  9. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    94
    Three commands if someone needs:
    /add item name
    adds an item by name to the backpack

    /teleport player name
    teleport to another player by name

    /summon
    player name
    summons a player by name

    I don't know how to use chat command written with int in form "/add string itemname, int amount" :( I tried with int.Parse but not working. If anyone knows, please reply.

    Player.cs
    Code (CSharp):
    1.     // Commands
    2.     [Command(channel = Channels.DefaultUnreliable)] // unimportant => unreliable
    3.     public void CmdMsgAdd(string message) {
    4.         ItemTemplate _item = ItemTemplate.dict[message];
    5.         if (_item != null) {
    6.             InventoryAddAmount(_item, 1);
    7.         }
    8.     }
    9.  
    10.     [Command(channel = Channels.DefaultUnreliable)] // unimportant => unreliable
    11.     public void CmdMsgTeleport(string message) {
    12.         // find the player with that name
    13.         foreach (var entry in NetworkServer.objects) {
    14.             var _player = entry.Value.GetComponent<Player>();
    15.             if (entry.Value.name == message && _player != null) {
    16.                 agent.Warp(_player.transform.position);
    17.                 return;
    18.             }
    19.         }
    20.     }
    21.  
    22.     [Command(channel = Channels.DefaultUnreliable)] // unimportant => unreliable
    23.     public void CmdMsgSummon(string message) {
    24.         // find the player with that name
    25.         foreach (var entry in NetworkServer.objects) {
    26.             var _player = entry.Value.GetComponent<Player>();
    27.             if (entry.Value.name == message && _player != null) {
    28.                 _player.agent.Warp(transform.position);
    29.                 return;
    30.             }
    31.         }
    32.     }
    PlayerChat.cs

    public class PlayerChat : NetworkBehaviour
    Code (CSharp):
    1.     [SerializeField] ChannelInfo chanAdd = new ChannelInfo("/add", "", "", Color.cyan);
    2.     [SerializeField] ChannelInfo chanTeleport = new ChannelInfo("/teleport", "", "", Color.cyan);
    3.     [SerializeField] ChannelInfo chanSummon = new ChannelInfo("/summon", "", "", Color.cyan);
    public string OnSubmit(string s)
    Code (CSharp):
    1. else if (s.StartsWith(chanAdd.command)) {
    2.                 // add
    3.                 var msg = ParseGeneral(chanAdd.command, s);
    4.                 if (!Utils.IsNullOrWhiteSpace(msg)) {
    5.                     if (ItemTemplate.dict.ContainsKey(msg)) {
    6.                         lastcommand = chanAdd.command + " ";
    7.                         Add(msg);
    8.                     } else print("invalid item name");
    9.                 } else print("invalid add format: /add" + msg);
    10.             } else if (s.StartsWith(chanTeleport.command)) {
    11.                 // teleport
    12.                 var user = ParseGeneral(chanTeleport.command, s);
    13.                 if (!Utils.IsNullOrWhiteSpace(user)) {
    14.                     if (user != name) {
    15.                         lastcommand = chanTeleport.command + " " + user;
    16.                         Teleport(user);
    17.                     } else print("cant teleport to self");
    18.                 } else print("invalid teleport format: " + user);
    19.             } else if (s.StartsWith(chanSummon.command)) {
    20.                 // summon
    21.                 var user = ParseGeneral(chanSummon.command, s);
    22.                 if (!Utils.IsNullOrWhiteSpace(user)) {
    23.                     if (user != name) {
    24.                         lastcommand = chanSummon.command + " " + user;
    25.                         Summon(user);
    26.                     } else print("cant summon self");
    27.                 } else print("invalid summon format: " + user);
    28.             }
    Code (CSharp):
    1.     [Client]
    2.     void Add(string message) {
    3.         // adds an item by name to the backpack
    4.         ItemTemplate _item = ItemTemplate.dict[message];
    5.         var player = GetComponent<Player>();
    6.         if (_item != null && player != null) {
    7.             var freeIdx = player.inventory.FindIndex(item => !item.valid);
    8.             if (freeIdx != -1) {
    9.                 player.CmdMsgAdd(message);
    10.             }
    11.         }      
    12.     }
    13.  
    14.     [Client]
    15.     void Teleport(string message) {
    16.         var player = GetComponent<Player>();
    17.         if (player != null) {
    18.             player.CmdMsgTeleport(message);
    19.         }
    20.     }
    21.  
    22.     [Client]
    23.     void Summon(string message) {
    24.         var player = GetComponent<Player>();
    25.         if (player != null) {
    26.             player.CmdMsgSummon(message);
    27.         }
    28.     }
     
    Last edited: Jan 30, 2017
    MHolmstrom likes this.
  10. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    hello after build a headless server how is the correct configuration to test the server because In the documentation only say :
    Connecting with a Game Client
    Finally we can open our Unity Project, select the NetworkManager component and insert our server's IP address under Network Info->Network Address in the Inspector. If we press Play then we can now connect to our remote server! but nothing is connect just in localhost.

    1. screen shoot from my server runing )on internet in a vps)
    https://gyazo.com/0332ba56ee6afec564d3f7e6c94b43ae
    2.- here is the screen for the manager in the editor it shows the ip address from my vps and I dont know if is the correct port but I change it. or should i leave in blank? and I dont know if I need erase the other fields.
    https://gyazo.com/34b16a74a1f089b3240126444249c62a
    3 here is the screen went I hit the button Play, change the ip address to localhost,
    so Im confuse maybe thats why not connect
    to my server or how I can properly setup this?
    https://gyazo.com/3c09da814082814ecf2828e7490c00a8
    if some one point me in the right direcction hot to test the server and the client. Thank you guys
     
  11. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Selectionhandling uses cmdselection I believe then if target entity monster etc etc.
     
    vis2k and Zhenite like this.
  12. Zhenite

    Zhenite

    Joined:
    Dec 6, 2016
    Posts:
    58
    I was able to do what I wanted.
    Thanks for the help.
     
    MHolmstrom likes this.
  13. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Progress: the Item Mall is almost done. It will be almost fully functional, except for buying coins of course. The Buy button currently opens a website of your choice. It will be up to you to setup a payment service and a callback that increases the player's 'coins' field in the database after purchasing.

    2017-01-30_itemmall_b.png

    Great to see that you are making progress!

    If you want the client to connect to the server then you have to enter the server's ip and port in the NetworkManager. Otherwise it connects to 'localhost', which is your own computer.
     
    Last edited: Jan 30, 2017
    wahyuway and jagatai33 like this.
  14. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Ok, thank you but what is the port number ? 7777?
     
  15. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    You can replace that port with any other ports you want (its default port for this case), but don't forget to open on server side that port too then (i assume you are using firewall).
     
    vis2k likes this.
  16. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    94
    Item Mall menu would be good as NPC vendor menu or craft menu with options. Anyway nice addon :)
     
  17. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    In the NetworkManager you have changed the IP address in the Network Info section. Since Vis2k added the server selection option you now need to change it in NetworkManager - Server List.
     
    vis2k likes this.
  18. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    ok thank you, im going try port 22 because 7777 not work for me
     
  19. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Port 22 is for SSH service (at least for default case)
     
  20. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Port 0..1023 are system ports, you'd need special priviliges to run an application on those ports. Try something big enough like 7777.
     
    tequyla likes this.
  21. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I get the setup correctly, and now the server and the client can connect. Thank you guys for the support
     
    vis2k likes this.
  22. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Progress: finished item mall orders. Your payment callback will be able to increase the player's item mall coins and he will be notified (see the chat). This was a challenge because simply increasing 'character.coins' in the database wouldn't work if the player is currently ingame.
    2017-01-31_itemmall_orders.png
     
    CrandellWS, jagatai33 and camta005 like this.
  23. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    What was the problem? How did you fix it?
     
  24. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I talk with the company of the vps and they open the ports, :)
     
  25. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    94
    I use mouse button with raycast. When I click on specific object, player will follow to it. How I can do something (destroy etc.) after the player will stop? Not before this action. Right now I must click two times, one for follow, and next for action with that object.

    I use this:
    CmdNavigateTo(hit.collider.ClosestPointOnBounds(transform.position), 1);
     
  26. Wansyth

    Wansyth

    Joined:
    Aug 14, 2013
    Posts:
    12
    Can you add to the documentation your recommended process of making a small changes and validating that it doesn't break items?

    What validation steps do you take to insure nothing is breaking?

    I'd like to be confident that each change I've made goes through the same extensive testing process.
     
  27. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Update: V1.56 with the sqlite3.dll fix is now on the Asset Store!
    I am not sure what you mean.

    What do you mean with breaking items?

    There is no special testing process, I simply test every single line of code that I write. For example, when I started programming I usually wrote a whole function or two before I even bothered to run the program. This resulted in a lot of bugs and maintenance later on. Now I use Debug.Log to test every single line of code, which leads to far less bugs and maintenance.

    Using breakpoints works just as good if you develop with an IDE.
     
    Last edited: Feb 1, 2017
  28. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Progress: the next version was submitted for review:

    V1.57
    • NetworkManagerMMO: PBKDF2 Password hashing
    • Database.SaveMany: removed the Debug.Log message
    • Monster UpdateServer_IDLE: randomly generated 3D point uses y=0 again because it's added to start.y. Avoids issues where monsters wouldn't walk on some terrain.
    • NetworkManagerMMO: Database header comment removed
    • NetworkManagerMMO.OnValidate now shows a warning if someone tries to modify the IP and port directly instead of using the server list.
     
    camta005 and jagatai33 like this.
  29. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    When you gonna start doing gather resources just asking
     
  30. Wansyth

    Wansyth

    Joined:
    Aug 14, 2013
    Posts:
    12
    Thanks vis2k. I've never worked with client/server environment and wasn't sure if there was anything additional besides running the game from within unity while coding.
     
    vis2k likes this.
  31. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    90
    You the Man of the Hour! I was just thinking about doing this, thanks for the time saver! :)

     
  32. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    We need a mountsystem ... and a pet system ... and so much more :D

    Did anybody got a CMS running for there mmo project and is willing to share the code? Or sell it? We need a CMS for user administration, registration etc.
     
  33. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    90

    Nobody is stopping you feel free.
     
  34. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    94
    I mean when I click on the object placed in the world, player will come to it automatically and when player stops, object for example will be destroyed.
    With that line which I showed when I click on the object, player will come to it but object will be destroyed before he come (or I must click second time on it. First for come, second for destroy).
     
  35. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    The item mall was the last puzzle piece, I have a solution for the whole MMO setup now. CMS + item mall + payments + support + forum + ...
    This is big, people could just throw some 3D models at it and launch their game now. Or use it for a kickstarter. I am not 100% sure yet what I'll do with that information. Perhaps a 'MMO complete setup' guide.

    Not yet, sorry. One step after another.

    You could use the player's state machine to check when the MOVING state ended.
     
    jagatai33 likes this.
  36. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    oh Cool! Do you release it as a additional asset ?!? And most imporatent when you do release it???
     
  37. AxelOz

    AxelOz

    Joined:
    Dec 8, 2016
    Posts:
    11
    Yes but here the thing with
    Wow your plans are charge us more for the GUIDE? thats not cool, All here are helping each other to develop the asset and help you to test and make this better and what you try to do is just not cool. Im not agree with charge us for the MMO complete setup' guide.
     
  38. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327
    Hello,

    Concerning MMO things you forward, could you please precise the MMO types, in your mind, are compliants with your nice asset ?

    +++
     
  39. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,297
    Haven't decided yet. See below.

    I may have caused some confusion here. There's already a setup guide that I shared with everyone for free: https://noobtuts.com/unity/unet-server-hosting. And there are no limitations whatsoever, you can do anything with uMMORPG and I definitely don't want to have some kind of required component that people have to pay extra for. uMMORPG wouldn't be where it is today without the trust of this community, and I don't plan to lose that trust.

    What I was talking about is this: I want to make my own MMORPG. uMMORPG is the actual game, but I will need a website, item mall and payment solution too. Some others here might make their MMO subscription based and not need any of it. I was trying to explain that I am at the point where I have all of this figured out. I found the perfect payment provider and the perfect website (cms) solution. I also figured out how to integrate all of it together with uMMORPG's database.

    Now this is my own solution for my own project, based on a year of researching everything that's out there. I could just keep it to myself, never mention it here again and make thousands of dollars with it and my own MMO. You'd never know and nobody would complain. Instead of not mentioning it, I decided that I may want to share my solution, if it's fair. Fair as in: if you make thousands of dollars with it, buy your ferrari and all I get from you is a 'thanks', that's not fair for me. If I sell it under the condition that I get 30% of your income, that's probably not fair for you. Although Unity does that with the Asset Store, so maybe it is fair? Or maybe a flat price like $1000 is fair. Or maybe it's fair to increase uMMORPG's price to $500 and put the guide in there for free. But what about the people that don't need it, they'd rather pay $80 for uMMORPG.

    So don't worry about a hypothetical guide that doesn't even exist yet. I don't want there to be any hard feelings. I just want to talk about what's fair.

    It's designed for the most common type. WoW, all those china grinders, etc.
    You could make the next guild wars with it too if you modify a few things here and there.
    Someone is developing a SciFi MMO with it, so that works too.
    Someone else is developing a ship based MMO with it.
     
    Last edited: Feb 1, 2017
    SunLeaf and luis29vm like this.
  40. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    Ok if this is like a typical mmo like wow and that the crafting system is a blueprint style not nocking this one it's better then nothing just saying also I don't under stand about the cms thing about making it part of it making us pay more all that I don't understand
     
  41. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    What I understand is that he want to charge us for the documentation complete not for the CMS.
     
    GOLDY00 likes this.
  42. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    138
    What is cms sorry noob question
     
  43. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    CMS + item mall + payments + support + forum. Im going say this way all can manage all features for your game in the web page(cms)
     
    vis2k likes this.
  44. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Please look at the just edited script, Changed Layer Collision :)
     
  45. Zaladur

    Zaladur

    Joined:
    Oct 20, 2012
    Posts:
    391
    Tried following your tutorial on hosting a server, with a fresh version of uMMORPG

    https://noobtuts.com/unity/unet-server-hosting

    With the exception that I've spun up my own Ubuntu VM with VirtualBox. I successfully transferred the headless linux build to the VM via SSH and started the server just fine, but am having issues connecting from the Unity Editor, which is running on my Windows 10 box.

    I know you are supposed to change the IP in the Network manager, which I have done to match the IP of my VM, though I had to add it as a server in the server list instead of directly in the Network info. I've tried using both port 22 and port 7777.

    I've verified that the server is definitely running on the VM, the IP is correct, and that I can successfully connect when I run both locally. I can ping the VM from my Windows machine just fine, and I am selecting the appropriate server in the UI, which is setting the correct IP in the Network Manager. Any ideas on how I might troubleshoot further, or if there is anything else I might be missing?
     
  46. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    224
    I have just finished setting up my testing VPS with Amazon Cloud (EC2). There is a free tier option for 1 year which I am using with Ubuntu 16.04 (14.04 is also available). https://aws.amazon.com/free/

    I encountered a couple of issues that could help anyone who is trying to set up a VPS with Linux and having connection problems.

    Since the recent server list update, the IP address and port numbers are added to the Server List rather than Network Info in the NetworkManager through the Inspector :

    serverlist.jpg

    My VPS had problems assigning an appropriate IP address for the uMMORPG server unless I used the Server Bind to IP option in NetworkManager (see below). The Server Bind Address can either be 0.0.0.0 which points to all local IPv4 addresses on the VPS, or a specific local IP address on the VPS (not the public IP address in the Server List). It would not work with localhost, as it would not listen for public connections, only private/local. The server IP address seems to default to localhost unless the Server Bind to IP option is used.

    networkinfo.jpg

    Also when starting a headless server the Network Port was not being assigned from the Server List. You have to make sure it is also entered in Network Info (see above). My VPS was just assigning a random port until I did this. Looking at the code, it seems that when starting the server manually it assigns the port number correctly from Server List, but when headless mode is detected and the server is automatically started it does not.
     
    Last edited: Feb 2, 2017
    SkyLimitStudio and vis2k like this.
  47. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    I just learned that too. Got random port numbers too.
     
    camta005 likes this.
  48. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327
    Hello,

    Could you please spawn 500 monsters on the world with roaming set on 10 meters for each and perform a try with 10 players run and fighting on your server and share the uptime and top stats during this simple test ?

    update: and share the VPS specs too.
    It should be interesting to share the VPS specs for find the best config. (cpu, memory and disk. I guess your VPs runs with SSD or IOFusion storage ?).

    +++
     
    Last edited: Feb 2, 2017
    Tiny-Tree and CrandellWS like this.
  49. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,283
    if i remembe the code monsters are not running if there is no player in proximity so having 500 monster should not be a huge impact if they are spaced enough
     
  50. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    I doubt that a VPS is capable of running a mmorpg with many npc and player. Better you go the dedicated server way.
     
    CrandellWS likes this.