Search Unity

uMMORPG Official Thread

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

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Good morning. To avoid confusion about this setup guide, I may have picked the wrong name in the first place. This is not supposed to be a 'how to setup ummorpg.exe server' guide. It's about Indie MMORPG monetization / infrastructure in general. Kind of like an ebook.

    Did you read the explanation in my last post?

    As other mentioned, you have to enter your ip+port in the server list. I actually added a warning to the next version that notifies you that you are supposed to use the server list when editing the default ip/port. Also see the other posts here about the headless server port, this could be the problem too and will work by default in the version after the next version.

    Thanks for letting me know. This is an interesting problem. If we have a list of servers, the headless server has to know which server he is, so that he uses the correct port. I'll probably use the same port for all the servers in the server list, so the headless server only has one choice. This wouldn't allow for more than one server on the same computer, but that probably wouldn't happen anyway.

    I did that already. I used the cheapest VPS from namecheap.com with 1000 monsters on it. Worked fine.

    Yes, I spawned them all around the player so they actually do move.
     
    Last edited: Feb 2, 2017
    camta005 likes this.
  2. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    For a closed testing group a budget VPS is going to be fine. Yes dedicated severs would be a viable choice for a public release, but cloud based VPS are also. They differ from traditional VPS in that they are dynamically elastic and scalable. For example Amazon Cloud offers compute optimized VPS which lists MMOs as one of the use cases: https://aws.amazon.com/ec2/instance-types/

    I think the point is that dedicated isn't the only way to go now for public release, cloud VPS are a definite option.
     
  3. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi,

    Is possible for someone to open a game on the vps (or more) with demo scene ?

    ( i try the demo webgl but we are alone in each party :/ , maybe we make something wrong ).

    we can try a lite stress test with us ( subscribers thread).

    ++
     
  4. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    Can I recommend Drupal?

    For what it is worth a stand alone server for Android is:

    https://github.com/koush/AndroidAsync

    and a database server could be:

    https://github.com/nhachicha/SnappyDB

    Though the issue of knowing the ip/port of the server ahead of time does remain an issue. Feel you man I have tried explaining this to another person about a different project.

    Though I do find Mesh Networking interesting.
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update:
    V1.57 [released 2017-02-02]
    • 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.

    I will submit the next version with the headless server port fix in a few minutes!

    If you start a server in WebGL, others won't be able to connect to it because of how your WebGL and your browser work. You can only use WebGL as a client.

    Someone else actually PMed me about a stress test with 50 people yesterday. Server CPU usage was at 7% for him.

    Drupal is definitely capable for an MMORPG website.

    It's not my first choice personally because I used drupal for my previous software project and it ended up being a big mess because of all the updates and at some point incompatible modules. Also while powerful, Drupal is not that simple. My CMS of choice would be less maintenance so I can spend more time with the actual game development.

    But if you already know Drupal, that would probably work fine for you.
     
    camta005 likes this.
  6. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Concerning CMS, I suggest, if i can, an API view for your asset and like that, everyone will choose what he wants.
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Of course, everyone can already choose what they want. You can connect to the SQL database with just about any CMS if needed.
     
  8. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    V1.58 with the headless port fix was submitted for review. All servers in the server list will share the same port that can be configured in the NetworkManager. This is by far the easiest solution for now, so that the headless server always knows which port to bind to.
     
    camta005 likes this.
  9. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    hello,

    i have a question: how is managed the dungeons instances ? all scenes are on same server ?

    ++
     
  10. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    UNET's master simulation server will take care of that (Phase3).
     
  11. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    Question:

    I'm playing around with a simple "resource gathering" routine and it works so far.
    while gathering i want to play an animation called "gathering" and the animation shows up while gathering but the idle state overrides the gather-animation after a second.

    i'm using animator.Play("gathering");

    is there an easy way to play the simple animation in my script?
     
  12. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Use the animation state machine (aka Animator). Pass a boolean GATHERING parameter while gathering, let the state machine take care of the rest.
     
    CrandellWS likes this.
  13. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Good morning everyone how are all today? Is any one using Mounting points? to add many armors,helmet.,etc? Im start using and woks good, but my problem is how I take off all the equipment. if any one share something to help, Thank you
     
  14. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    can you explain it with a little more details, please? or anyone else?
    how i set the state in my code then?
     
  15. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    @vis2k having SQLite issue on Android... any suggestion?

     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Take a look at Player/Monster LateUpdate. Also read through Unity's mecanim manual.

    It should work fine if you just use it as a client with the login button. I should probably disable the server hosting buttons when on iOS/Android/WebGL. Or do you want to host a server on your phone?
     
  17. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178

    I was thinking local server for offline networking (may be better for kid orientated games) ... If it helps I found this GitHub Repo https://github.com/codecoding/SQLite4Unity3d and got the sqlite functioning but not working. Just added the Android folder to your plugins folder https://github.com/codecoding/SQLite4Unity3d/tree/master/Example/Assets/Plugins ...


    Out the box if I try and login says "connecting..." until it says "Disconnected"

    On Ubuntu 16.04 with Unity version 5.5.1xf1

    am I missing something like do I need to insert `localhost` somewhere?
     
    Last edited: Feb 2, 2017
  18. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
  19. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    Problem solved. I use this to my pickup items as more convenient. I think
    for example Npc can display UI also automatically instead of clicking twice ;)

    Code (CSharp):
    1. GameObject targetItem;
    put that before Input.GetMouseButton
    Code (CSharp):
    1.         if (targetItem != null)
    2.         {
    3.            if (Vector3.Distance(transform.position, targetItem.transform.position) <= 2)
    4.            {            
    5.                   "Code"
    6.            }              
    7.         }
    and when CmdNavigate, targetItem will be _item
    Code (CSharp):
    1. if (Input.GetMouseButton(2) && !Utils.IsCursorOverUserInterface()) {
    2.             var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    3.             RaycastHit hit;
    4.          
    5.             if (Physics.Raycast(ray, out hit) && hit.collider.gameObject.tag == "Item")
    6.             {
    7.                 var _item = hit.collider.gameObject;
    8.  
    9.                 if (Utils.ClosestDistance(collider, hit.collider) <= 2)
    10.                 {
    11.                  
    12.                     if (_item != null)
    13.                     {
    14.                         "Code"
    15.                     }
    16.                  
    17.                 }
    18.                 else
    19.                 {
    20.                     targetItem = _item;
    21.                     CmdNavigateTo(hit.collider.ClosestPointOnBounds(transform.position), 1);
    22.                 }
    23.             }
     
    Last edited: Feb 2, 2017
    mischa2k likes this.
  20. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    Can you give a line number for what you are talking about in the quoted text?
     
  21. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69


    Just a small Update. I should trigger the doors smoother :)
    The ResourceGathering prototype is almost finished.I will show you when I have solved the challenge with the animation issue.
     
    mischa2k and luis29vm like this.
  22. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    Last edited: Feb 3, 2017
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I will try android again on the weekend. Will have to reinstall Unity first and download all the requirements. I will post here when I know more!
     
    CrandellWS likes this.
  24. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165


    Just a quick update with my project showing Woodcutting and Mining with uMMORPG crafting, also thought id show a quick snip of my mount system riding a horse LOL. **Im not an artist so my assets are horrible LOL!

    @vis2k thank you once again for such a great project!

    -J
     
    Ronith, mischa2k, GOLDY00 and 5 others like this.
  25. GOLDY00

    GOLDY00

    Joined:
    Mar 16, 2013
    Posts:
    139
    Ok this is the coolest thing ever how the hell you get the mount and gather please show us lol
     
  26. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Good morning everyone!
    To keep you up to date, I am currently trying to decide between several hero model ideas that I have. This is important because the current ones don't look that great, and because the new hero(s) will allow me to look into skinned mesh equipping later.

    That looks neat. Keep us updated ;)
     
  27. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    Awesome! Take my money for the resource gathering script! Will you share it?
     
    GOLDY00 likes this.
  28. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    Question:
    All npc are shown in the scene regardless of the range. So you can see the names from high distance.
    The VIS RANGE of each npc ist set to 30 and this works only if i run in their range and run away.

    Network Proximity Checker Custom - Script settings:
    Vis Range: 30
    Vis Update Interval: 1
    Check Method: Physics 3D
    Force Hidden: none

    any suggestions? perhaps a bug?
     
    Last edited: Feb 3, 2017
  29. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Doesn't happen in the default uMMORPG project, at least not for me. So something probably went wrong when modifying?
     
  30. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    It doesnt work with a fresh installed uMMORPG project.
    as you can see on the picture, the green marked skeletons are not in vis range and faded out correctly after leaving the start-spawn.

    the red marked skeletons are still visible as long as they have not been "initialized".
    Therefore in the world all ncp are visible also in large distance

    • running on windows 10
    • Unityversion 5.5.1f1
     

    Attached Files:

  31. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What exactly do I have to do, step by step, to reproduce it?
     
  32. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    • Login
    • after spawning ingame, run away from place where you spawn
    • the nearest skeletons will be disappear
    • the skeletons near the temple doesnt disappear
    in this case you can see their nameoverlay trough gameobjects.

    meanwhile i figured out a quick solution:
    i made a new prefab from a initialized npc, that noticed me ingame.
    after replacing this new npc it works correctly. but this is not the right way, isnt it? :)
     
  33. Torbjorn_Falk

    Torbjorn_Falk

    Joined:
    Jan 25, 2017
    Posts:
    3
    Do you have a number or estimate of how many concurrent players on average that this can handle?
     
  34. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    I can't seem to replicate it. Logging in with a new character the furthest skeletons and the Alchemist NPC are not visible unless I move forward.

    Maybe it's a Unity bug in a particular version? Or perhaps you changed something in project settings?
     
  35. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    it happens with a fresh uMMORPG import, nothing changed.
     
  36. gigz09

    gigz09

    Joined:
    Jun 6, 2016
    Posts:
    14
    This one?
    upload_2017-2-3_22-55-27.png

    Tried it by creating a new player then walked until on the spot on the screenshot.

    untouched newly import uMMORPG v1.57
    Unity 5.5.1f1
     
  37. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    visrange2.jpg
    exactly the same issue :)
     
    Last edited: Feb 3, 2017
  38. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please be more detailed. Login where? Do you run a dedicated server on the same computer? In the editor? Or in a build?

    Yes, the name overlays are visible through walls because of how TextMeshes work. There might be a shader somewhere that uses depth testing. The alternative is to use the new UI system for it, but there were memory leaks last time I used that for name overlays.

    This also depends on what exactly you did. If you press Server & Play then you will see them all the time, because the server can see them all the time.

    Someone mentioned 7% CPU usage with 50 players the other day. So it can handle a lot more than 50. I have no exact number because it depends on your server, your world size, your Unity version (e.g. 5.6 will UNET transport layer threads). It's also difficult to test with just one computer. I did however test it with 1000 monsters on the cheapest VPS from namecheap.com, which worked fine.
     
    gigz09 and Ronith like this.
  39. Ronith

    Ronith

    Joined:
    Feb 20, 2014
    Posts:
    69
    that explains everything. it works properly with a dedicated server/client build.
    sorry for the inconvenience, i'm still learning
     
  40. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    I have the asset mounting points and want to know where I can put code to equip/unequip items, any one know to better understand the logic for this? any help, helps.
     
  41. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    How to instantiate indicatorPrefab on client connected instead of manually set and change it dynamically after click something? I have a problem with it, always "Null Reference Exception".
     
    Last edited: Feb 3, 2017
  42. Stroved

    Stroved

    Joined:
    Jan 3, 2014
    Posts:
    16
    Do you use any version control in house when developing uMMORPG? I'd like to have the password encrypting from v1.57 but I do not want to start my project again and move everything over.

    It would be awesome if we could have access to what has changed from release to release so we could implement what ever we want ourselves (such as the password encrypting). I know this would be more work for you, but its less work for me ;)

    Amazing project by the way, keep up the amazing updates!
     
  43. gigz09

    gigz09

    Joined:
    Jun 6, 2016
    Posts:
    14
    Please see my post here:
    https://forum.unity3d.com/threads/ummorpg-official-thread.376636/page-48#post-2938580

    also there's a guide in the documentation on how to keep track on the changes:
    https://noobtuts.com/unity/MMORPG#how-to-keep-track-of-changes
     
    mischa2k likes this.
  44. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    camta005 and Ronith like this.
  45. Stroved

    Stroved

    Joined:
    Jan 3, 2014
    Posts:
    16
    So in this case, we would need to create a new branch, commit the new version and then diff ourselves? With Bolt (before Photon bought it out), they had a private Github which allowed us to view exactly what was changed without any work for us. I was thinking something along those lines, rather than the extra work we'd have to go through :p
     
  46. Natalynn

    Natalynn

    Joined:
    Apr 21, 2013
    Posts:
    197
    Stuff like that shouldn't show if behind an building or a big object that covers the entire NPC. I've spoke to vis about it, awhile back.
     
  47. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    About 25 or so pages back we recommended a private git repo that asset owners could use to import the project with. Our method is to create a second project, import the asset there, then do a diff against our real project to see what has changed.
     
    mischa2k likes this.
  48. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    No problem!

    GameObject.Instantiate?

    Thank you. The password stuff is very simple, you only need the NetworkManager login packet sending part, where it's hashed, and you need the hashing function from Utils.

    About the repository: I know that this would make your life easier. It's on my list of ideas to think about. It's been on that list for a while, because I'd rather work on the code to be honest. So maybe at some point yes.
     
    CrandellWS likes this.
  49. PapitoMyKing

    PapitoMyKing

    Joined:
    Apr 25, 2016
    Posts:
    12
    Hi!,

    Noob question: I have read that UNET doesn't work in webgl. ummorpg is based on UNET. So, my project can't be browser based?

    Thanks!
     
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It works fine in WebGL. The only limitation is that if you decide to host a server in a WebGL tab, others can't connect to it because that just can't work with WebGL (it's not a UNET thing). Other than that, UNET works just fine via websockets.