Search Unity

uMMORPG Official Thread

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

  1. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    @vis2k - Here's an analogy ... if I'm understanding the situation correctly.

    If we accept that we need to be located near the origin, with a radius of 1500m, 2000m, or whatever, placement of instances on the map becomes similar to creating a texture atlas. If I'm making all of my instances at edit time, it's like making my texture atlas at edit time. The tiles are fixed / static in size and location. If I'm going with a resolution of 1500m for my map / atlas, I can fit 9 square 1000m (0.6 mi) instances within it. The instances are set at edit time, and all run concurrently (they may have no activity, but they are allocated on the map / atlas).

    If I want to expand my options and become more dynamic, it's like building an atlas at runtime using a rendertexture. I just need to be sure the server can dynamically load the navmesh and whatever for the dynamic instance. With this I need to do some management to make sure I'm keeping track of which instance spots are available, and be able to handle situations where I cannot create another instance.

    That's not bad, but still potentially limiting. What seems like a better approach, to continue with the analogy, is using a texture array, with one instance per cell. This way I can allocate out the whole 1500m map / texture for a single instance, but I can have multiple map / textures referenced by an array index. The server just needs to keep track of which array goes for which player / instance.

    In theory, I can keep adding new instances to the array, so long as my CCU is acceptable and other server resources can handle it.
     
  2. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    You can put a limit on instanced dungeons per dungeon type. Which you should, since server resources are finite no matter what you do. So if you allow 10 instances of dungeon type A at any given time (which is probably reasonable for an indie MMO), you will know how far off the z axis you will go. Even a limit of 100 should still be fine with single precision floating point numbers.
     
  3. Ebonheimer

    Ebonheimer

    Joined:
    Jul 18, 2017
    Posts:
    1
  4. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
  5. reefcrazed

    reefcrazed

    Joined:
    Oct 29, 2016
    Posts:
    12
    Question vis2k, if you have a minute. So your approach in uMMORPG is a single scene for an entire mmorpg? I am still a novice at Unity3d so ignore my ignorance here. I know that you have done massive testing on having more clients than most people would ever have in their game. What about non-player entities though. Lets say other objects in the game such as npc, npc movement. Then adding npc entities in the game I would think that all clients have to track these and would the traffic not pick up exponentially? In other client / server engines I have worked on in the past I could handle this by ignoring entity updates for things not in a visual range to the client. The way uMMORPG stands now how large of a scene could one develop without running into issues?

    $20 seems like a great deal, after tax around $21.20 If nothing else I can use bits and pieces. I doubt I ever make a game in completion, but it will keep me entertained and that seems worth it to me. Purchased!!
     
    Last edited: Feb 19, 2019
    hopeful likes this.
  6. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Yes, single scene is the best solution right now. It's definitely the most simple one. And if your server has to handle 1000 CCU, then it will still have to handle that amount after players return from their instance. I could be wrong, but I do think the current solution is a decent approach for indie MMOs. Indie MMOs don't fail because of CCU - they fail because they get so complex that people don't finish them. We can still put zones on other server machines if needed, but I believe this is a better approach. In fact, the load balancer that I plan to release will have a way more significant impact than outsourcing scenes.

    Clients only track the entities around them because of the proximity checker.

    You can make the scene as large as you want, basically until you run into floating point precision issues. I doubt that many indie games would be able to produce that much art though.
     
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    I'm trying to think of how to implement some version of my game within the uMMORPG system. @vis2k, does the following sound more like intended usage?

    First, I need to drop the idea of using real world city scale and instead go with "toon town" city scale. With no parking lots, and only narrow buildings, narrow streets, and small bodies of water, a lot more features can fit into a small area. I think I can shrink a city zone down to 500m and still contain many points of interest. On the client, I would only render the city the player is in. I could use the Horizon[ON] plugin on the client with a horizon map unique to each city. Its views of 50,000m or so out to a natural horizon should give players a greater sense of being in a large city on a vast plain, even though each city's playable area is only 500m, and each city is literally right next to the other.

    If I create 4 city zones, that uses the center 1000m of the 1500m radius I'm allotting for the game. I still have 1000m of usable space in each direction.

    These would be parceled out for individual "dungeon" instances. If I can keep it small, then maybe I can go for 100m squares. That would allow up to 800 concurrent "dungeon" instances. This sounds like a lot, but if the server can support 800 CCU, then that would permit each player to solo a dungeon simultaneously. Or it could be configured for 400 100m dungeons (1-4 players) and 100 200m dungeons, maybe with the idea that the 200m dungeons can only be run by teams of 4 or more.

    I imagine I could set up an array with an element for each dungeon instance, and thus keep track of which dungeon spaces are in use or available. When the server wants to start a new instance, it finds an empty cell in the array, which tells it which position to use on the global map, and it initializes the dungeon, loading whatever the player has selected and moving it to that area.
     
  8. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Makes sense. Although I wouldn't shrink cities unless you actually run into floating point issues. Try it with your big cities first, see what happens :)
     
    hopeful likes this.
  9. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    463
    All of your stuff in 20 bucks?
     
  10. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Most of it, yes. Testing a new price.
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    I may not be very good at spotting animation jitter. And maybe small differences caused by jitter are highlighted when you are using VR ... which I am not. In a quick test I did with a character in idle, it seemed that I could go 6000m or more from origin and it was rock solid. By 9000m it was a little wavery, with maybe the tiniest bit at 8000m ... and you really had to be looking for it, up close. So ... nothing like a little experimentation to test / verify things!

    This would suggest that a zone map can go out to 8000m from origin, which is quite a bit more ground to cover. (Unless, of course, there are other floating point precision issues that could come into play.)

    Recalculating using a 8000m radius, I could get 4 4000m sized city zones (2.5 sq. mi. ea.), plus 800 400m dungeons, and maybe 64 1000m special feature dungeons. Or something like that. Which is a decent amount of stomping ground for a micro MMO. :)
     
    vis2k likes this.
  12. Fhiz

    Fhiz

    Joined:
    Feb 28, 2018
    Posts:
    69
    Please excuse my shameless plug.

    I create AddOns for uMMORPG3d since almost 2 years now. If you want to seriously increase the features found in uMMORPG3d within the blink of an eye and without any custom code, you should check them out.

    Just take a look at my website (you can expand the category drawers by clicking on them) or join my Discord server that you can find linked in the official uMMORPG discord under the "AddOns" section.

    https://www.indie-mmo.net

    There are about 60 smaller, free AddOns available. And in case you are interested: By becoming one of my Patrons, you gain access to another 60, bigger ones as well. This is enough content to create a whole game without any code.

    thanks
    -Fhiz
     
    Weblox likes this.
  13. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    463
    @Fhiz Create some of uRPG and I might be interested!
     
  14. Fhiz

    Fhiz

    Joined:
    Feb 28, 2018
    Posts:
    69
    @SickaGamer Im sorry, but I only do uMMORPG3d (MMO) stuff.

    Also, the other Assets by Vis2k do not feature a "AddOn" system that is required for more complex AddOns.
     
    Weblox likes this.
  15. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    V1.159 pending review:
    • Update Mirror to latest version (lots of fixes and improvements)
    • PlayerChat.CmdMsgWhisper: use TryGetValue for maximum performance
    • Utils: remove unused functions, improve syntax
    • NetworkManagerMMO: forgot to remove tick rate setting. Mirror handles that now.
    • Utils.IsNullOrWhiteSpace removed, NET 4.5 has string.IsNullOrWhiteSpace now.
    • Net 4.X syntax for getters
    • Upgraded to Unity 2018.3.6 to prepare for LTS, and to avoid 2018.2 memory leak bug (https://github.com/vis2k/Mirror/issues/427)
    • Deleted old terrain_trees file
    • NetworkManager.OnClientReceivePopup renamed to OnClientError
    • NetworkManager.ClientSendPopup renamed to ServerSendError
    • Remove MessageIds everywhere (latest Mirror version assigns them automatically)
    • CharacterSelect/Delete messages inherit from IntegerMessage to simplify code
     
    runningbird and Weblox like this.
  16. setauz

    setauz

    Joined:
    Jan 19, 2017
    Posts:
    3
    Hello vis2k, it has been long time since i checked this forum and assetsore last time and i sadly see 80$ paid UMMORPG is 20 $ now and you have another asset uRPG which may be way better than ummorpg for me, but i do not have any budget for any other asset cause i cant produce anything, so i cannot buy it now.

    Anyway here is my story and question; i bought UMMORPG when it was first released, i had an ambition about making a simple MMO but i never be able to use your asset on a project because i have 0 knowledge about server building and did not want to deal with it. i later changed my goal about making a simple oflline rpg but i could not make it either. 6 months ago i go back to my old project (offline rpg) and almost finished it, it was a simple rpg game for android.

    Here is my problem, my android build crashes on real devices, after i click server and play. Before the character selection screen game exits automatically. I tried a pc build on a pc and it works perfectly. So do you have any clue why this is happening on an android device? I am using an older version of ummorpg and unity 2017.
     
  17. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Any error message?
     
  18. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    V1.160 pending review. Another important bugfix release.
    • Mirror updated to latest version (sceneID fix). Please open and resave each of scene once.
    • Use nameof(function) for Invoke/InvokeRepeating
    • NetworkManagerMMO.Start calls base.Start
    • NavMeshComponents updated to 2018.3 to fix warnings
     
  19. Nyc0las

    Nyc0las

    Joined:
    Oct 5, 2015
    Posts:
    3
    Hello visk2k,

    First of all thanks a lot for this amazing tool, it is really helpfull.
    I have a question: I am trying to get a main character which can switch weapons (sword, dagger, bow etc...).
    I looked at the code and I do some modification: when we equip a weapon, I force the player.skillTemplates[0] to be the skill attached to the weapon. I also forced the current skill to look at the first skill in the skillTemplates array. Here is my code while equiping a weapon:

    Code (CSharp):
    1.             if (player.equipment[slot].item.data is WeaponItem)
    2.             {
    3.                 player.skillTemplates[0] = (player.equipment[slot].item.data as WeaponItem).skillUsed;
    4.                 player.currentSkill = 0;
    5.             }
    In my example I used the Archer template and try to put her a sword.
    I also added one more state in the animator (one state for bow animation and one state for sword animation, both using the skill's name as parameter).


    The thing is: in the inspector, the player' skill is modified using the skill in the choosen weapon. When I use a skill from the shorcut bar, it works well (she attacks with the sword or with the bow). But when it switch to auto-attack or try to auto-attack at first, it will not use this first skill (in my case it will use the bow animation instead of the sword, launching arrow to the ennemy far away). Did I miss something?

    Thanks a lot for your answer.
     
  20. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Maybe it would be easier to only allow certain skills for certain weapons? For example, the archers shoot skill shouldn't even be usable by the Warrior.
     
  21. Nyc0las

    Nyc0las

    Joined:
    Oct 5, 2015
    Posts:
    3
    The thing is I will not have class. And each player will be able to get any skill/weapon they wants depending on the stats choosen (old mmo style).

    We can talk in discord if it's better for you :)
     
    Last edited: Mar 13, 2019
  22. Nyc0las

    Nyc0las

    Joined:
    Oct 5, 2015
    Posts:
    3
    I got a sight to an add-on which will surely help me (UCE CombatRemastered), thanks to ObscuredCrow. I will try it right away thanks!
     
  23. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    V1.162 Pending Review! Another important bug fix release.
    • Monster.UpdateCASTING EventSkillFinished: fix NullReferenceException if target disappeared before checking target.health
    • NetworkNavMeshAgent: add agent.ResetPath detection. it only worked before because agent.velocity is != 0 after resetting the path for some reason
    • Mirror updated to latest version
      • fixed sceneID mismatch if disabled scenes are in build settings
      • fixed sceneID mismatch if no scene is in build settings
      • source based weaver
     
  24. MrSomoNozes

    MrSomoNozes

    Joined:
    Nov 9, 2016
    Posts:
    2
    I have a little problem. I am running the server on a linux hosted. But when I try to connect to the server through the game it crashes.

    Client Recv: failed to connect to ip=13.68.176.39 port=7777 reason=System.Net.Sockets.SocketException (0x80004005):
    A connection attempt failed because the connected component did not respond
    correctly after a period of time or the established connection failed
    because the connected host did not respond.

    at System.Net.Sockets.TcpClient.Connect (System.String hostname, System.Int32 port) [0x0019d] in <3845a180c26b4889bc2d47593a665814>:0
    at Telepathy.Client.ReceiveThreadFunction (System.String ip, System.Int32 port) [0x00000] in <98c4bf796e5846ae8bb8baa6476d35eb>:0
    UnityEngine.Debug:Log(Object)
    Telepathy.Client:ReceiveThreadFunction(String, Int32)
    Telepathy.<>c__DisplayClass11_0:<Connect>b__0()
    System.Threading.ThreadHelper:ThreadStart()
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    @vis2k - I'm trying to figure out how to drop the Warrior and Archer and instead have six different classes. It's not clear to me where to change the list of available classes.

    Also, where do the initial lines of chat come from? I'd like to delete those, and maybe add something different.
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,000
    I just updated the Dialogue System and Quest Machine addons for uMMORPG 1.162 and still have the projects open, so I thought I'd jump in with some info. (The addons will be in the next release of DS and QM, btw.)

    The easiest way to add a new class is to copy the Warrior or Archer prefab. They're in Assets / uMMORPG / Prefabs / Entities / Players. Then add them to your World scene's Network Manager > Registered Spawnable Prefabs. You can remove the Warrior and Archer prefabs once you're sure your new prefabs are working. (documentation)

    They're test lines hard-coded in PlayerChat.cs. Remove them from OnStartLocalPlayer() around line 79.
     
    RonnyDance and hopeful like this.
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    Thank you very much! You know, I tried to add a player class that way early on, and it didn't work, so I set it aside and then came back to it and was trying to figure it out. But now I try it again and it works, so ... beats me what I did wrong the first time, but I'm happy now!

    I find there can be a certain magic about eventually asking for help, in that somehow it can unlock things that seemed locked before. I have no explanation for how things get locked and then unlocked, other than to point to Murphy's Law, which also seems to work as expected. ;)

    Thanks as well for pointing out the PlayerChat script. I don't know how I failed to find it. (shrug)
     
  28. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    2,965
    Open the port in your server's firewall.

    PlayerChat.cs adds those lines.
    Just duplicate and modify the player prefabs and drag them into NetworkManager for additional classes.
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,638
    Yup - thanks! - got it working. I don't know how I missed on those, as it was how I expected it to be on both. (shrug)
     
    vis2k likes this.