Search Unity

uMMORPG Official Thread

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

  1. haohaorena

    haohaorena

    Joined:
    Apr 12, 2021
    Posts:
    15
    how can i add this? or dungeons instance runs in another progress or the same progress as main scenes?just like,i run a long exist dungeons instance. is it easy to make main scenes more lags?
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    uMMORPG already has instances in the same scene built in. Just walk into the blue portal.
    Check out the Mirror documentation to learn how to do additive scenes and scene changes too.

    Personally I find it too cumbersome for my own game. Because you have to do guilds, chat, etc. across server instances too.
     
  3. haohaorena

    haohaorena

    Joined:
    Apr 12, 2021
    Posts:
    15
    is there have any way to keep information just on client?like material attribute,
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Depends on what you mean.
    Unity's server-only builds are supposed to strip out some things that you don't need.
    I don't know if they do, since Unity is closed source and we can't check what exactly it does :/
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    V2.34 pending review: bug fix release!
    2021-07-10_20-29-49@2x.png
     
  6. haohaorena

    haohaorena

    Joined:
    Apr 12, 2021
    Posts:
    15
    i dont understand what mirror send between client and server. for example, a entity have a target entity ,so ,the mirror send a whole entity information or just target entity id? i am not sure how large of my package in one entity.
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please check out the Mirror documentation and examples :)
     
  8. haohaorena

    haohaorena

    Joined:
    Apr 12, 2021
    Posts:
    15
    i try additive scenes. it seems client auto load all the subscenes. it maybe works well(maybe make client too lags). but in example ,a zonehandler control subscenes in client. why now no needs this ?
     
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    When I made uMMORPG, scene changing was broken in UNET.
    Never looked at it since.
    MrGadget worked on it a lot in Mirror.
    Probably better now, still didn't have time to try it myself :)
     
  10. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    @vis2k SpatialHashingInterestManagement script states that player sees in a radius around him. NOT around his pet too.
    In my game player can leave his pet at any spot.
    How do I make that all entities near the pet are added to spatial grid and made IsWorthUpdating()?
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Spatial Hashing uses NetworkConnection.identity - which is the connection's main player.
    You would have to change it to consider all NetworkConnection.clientOwnedObjects.
    If you get it to work, consider a pull request on Mirror github :)
     
  12. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    https://github.com/vis2k/Mirror/pull/2858
    Done. But I ask you to doublecheck that :D
    Looks like it just works.
     
  13. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  14. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    @vis2k What is the best way to reorder SyncList? For example, to order SyncListSkill by skill level.
     
  15. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Any sorting algorithm would do I guess :)
     
  16. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    If I use linq, how do I convert it back to SyncList? :p
     
  17. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Probably extremely nit-picky but I would avoid linq for performance reasons.
    Would use traditional loops.
     
  18. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    769
    I would suggest using a SyncSortedSet instead of a SyncList. That way every time you insert something it is automatically sorted and only a tiny message goes across the network.

    If you just insert and insert in a synclist and then sort them, it will cause a lot of updates in the list and every single one of those updates will go on the network.
     
    mischa2k likes this.
  19. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    What is the difference between the Remaster and the non Remaster versions?
     
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Remastered has code split into components like PlayerInventory, Health, etc. instead of god classes.
    It's a lot easier to work with.
    Nobody should use classic anymore, it's only still on the Asset Store so that people can get updates.

    uMMORPG Remastered is on the Humble Bundle right now!
     
  21. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    But if I need to access elements at certain index, I end up using ElementAt() or calling ToArray(). Both are heavy operations. Is it still better than just reordering them with loop every time player upgrades skill?
     
  22. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    769
    There is one problem with reordering. The sync list will record every operation, send them over the network and replay the operations in the clients. Suppose you add a skill to the list and sort it. How many operations would that take? well, there is one operation for inserting the element, in addition, a typical sort algorithm performs O(n log(n)) operations on the list. Suppose you have 10 skills in the list, then on average, when you sort you will do say 10-30 operations, each one will be serialized and sent over the network.

    With a SyncSortedSet, there will be only one operation: the insertion of the element. The set will serialize the insertion, send it to the client and the client will insert the same element in the sorted set.

    You are right ElementAt won't be as cheap, but you will have an entire order of magnitude more network traffic. You definitely want to avoid calling ToArray(). It will generate a lot of garbage. Inserting and sorting the list has O(n log(n)) performance, but inserting in a sorted set has O(log(n)) performance, so it is a lot faster inserting in a sorted set.

    Note that if instead of ElementAt, you simply do a foreach on the set, it will be almost as cheap as a list, it uses an allocation-free Enumerator.

    If the performance of elementAt is your bottleneck, and you want the network efficiency of SyncSortedSet, what you can do is add a callback on the set and update a shadow list every time the set changes and only use the list. You can also make your own synclist, and serialize a "sort" operation, so you don't serialize each individual operation that the sort does.

    You can measure how much impact this has on your network traffic with wireshark.
    The bottom line comes down to how many times you update the list, and how many times you read the list. If you only update it every blue moon, then sure, insert and sort.
     
    Last edited: Sep 7, 2021
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    btw we are researching & optimizing some standalone delta compression algorithms atm.
    would make sync list manual change tracking unnecessary.
    dry computer science, sounds like it would be right up your alley if you wanna collab..
     
  24. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    Is there a document somewhere showing how to change controller for both player and ai. In particular I would like to use Opsive and Emerald ai instead of the build, I like Opsive since I am leaning towards a more sci-fi environment and emerald ai has very easy animation controller setup feature and the ai seem more alive with different behaviour settings etc.
     
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Any controller you want to use needs to be networked with Mirror.
    As far as I am aware, the one from my assets is the only one.
     
  26. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    Thanks for your reply. Btw, are there any plans to expand with the possibility of more than just one scene?
     
  27. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Mirror supports additively loaded scenes.
    Check out the Mirror examples.
     
  28. One_Learning_Man

    One_Learning_Man

    Joined:
    Sep 30, 2021
    Posts:
    81
    Can you talk a little bit about your thoughts on UMMORPG, DOTSNET, and Mirror?

    1) If UMMORPG is meant to have the capability of MMORPGS, wouldn't that strongly push for the scalability and performance of DOTSNET?

    2) How would you compare performance of Mirror to MLAPI? Are you concerned at all?

    3) Would you consider an easy upgrade process of UMMORPG using Mirror to a version of UMMORPG using DOTSNET if you ever considered it?

    4) I know you are hard at work on Mirror, but what are your plans for UMMORPG? What areas of UMMORPG do you think could be focused and improved?

    5) What are your thoughts on the future of Mirror?
     
    Last edited: Sep 30, 2021
  29. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    Quick question about the Cursor. I created a fresh build after importing uMMORPG Remastered. I noticed that when I right click the mouse to move around everything works besides the cursor is still visible when the character is moving. Any ideas why the cursor is still visible when the player has right click pressed and moving?
     
  30. satre

    satre

    Joined:
    Feb 10, 2013
    Posts:
    12
    Once I started playing main scene, I can not move my character. WASD or arrows controll dont work at all. How to fix it? :/ everything is working, inventory, attack, but I can not move my character.
     
  31. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Hey, sorry for the late reply.

    1) Yes. That's the only reason why I am interested in DOTS/ECS and made DOTSNET. Unity has been dead silent on ECS for a long time though. All questions are ignored, with no reason why they can't talk about it. So I wouldn't recommend it for now.

    2) I don't use any other networking libraries. Feel free to yourself. We've put all our trust in Unity once with UNET. Not gonna happen again :)

    3) Would be a from scratch rewrite. If Unity shows believable commitment to DOTS/ECS again, then I'll keep investing more time into DOTSNET. If I decide to make my MMO with DOTS instead of GameObjects, then I'll probably make 'uMMORPG DOTS' since I need it anyway. Only one asset this time though. Way too much on my plate as is.

    4) Mirror has highest priority. uMMORPG gets automatically improved with every Mirror update. Biggest challenge right now is scale for the next uMMORPG CCU test. That's 90% Mirror. The goal is still to finish Mirror features this year, then do the final CCU test.

    5) See roadmap on trello: https://trello.com/b/fgAE7Tud/mirror-networking
     
    hopeful likes this.
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Which Unity version / OS?
    Cursor locking in Unity isn't ideal, because locking it force resets it to center.
    This really sucks, I hope they improve it in the future.

    Try a fresh import from asset store with Unity 2020 LTS please.
     
  33. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    Sorry to not have mentioned that. I'm using Unity 2019.4.28f1 LTS with uMMORPG 2.34. Is there any form a work around or fix for this?
     
    Last edited: Oct 2, 2021
  34. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Just tried to build on mac with Unity 2021.
    Right clicking hides the cursor when using the Warrior which has WASD character controller movement.

    Maybe try a fresh uMMORPG download - I remember that in one of the older versions the cursor was shown.
    Maybe your script didn't update.

    Try Unity 2020 or 2021 too.
     
  35. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I purchased Remastered a few days ago. Would I still need to refresh the download?

    EDIT: I don't believe I need to redownload the asset. I decided to upgrade Unity from 2019.4.28f1 LTS to 2019.4.31f1 LTS. After doing that it seems the Cursor lock is working now.
     
    Last edited: Oct 3, 2021
  36. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
  37. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  38. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I'm not sure what do to with the synced state.
     
  39. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Look how uMMORPG feeds state/velocity/skillIndex to animator.
    that's all there is to it, it's the same in single player and multi player games.
     
  40. Menatombo

    Menatombo

    Joined:
    Feb 6, 2014
    Posts:
    26
    I really want to use this with Mysql instead of SQLite. Is there an addon that can do that? I've been trying to figure it out myself but I keep running in circles for the past week. Feels like I'm too close to the problem. I found a github but it hasn't been updated in 3 years and throws errors. So, I'm guessing it's not going to work.

    Anyone out there get this to work with MYSQL that could maybe help me, please?
     
  41. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, there's a community addon but not sure if it still works.
    Either way, SQLite and Mysql are similar enough. Should be easy to adjust :)
     
  42. Menatombo

    Menatombo

    Joined:
    Feb 6, 2014
    Posts:
    26
    Thanks. I got it. I have another question. I don't know if the documentation is old or not. But I cannot find where to update the server list. I have my server online and it starts up and runs, but I can't find a place to let the client either be able to type in the IP of the server or just have it in the dropdown.

    Can you let me know where this part is and what to update (if it's hard coded...)
     
  43. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It's in the NetworkManager component's settings:
    2021-10-22_18-23-53@2x.png
     
  44. Menatombo

    Menatombo

    Joined:
    Feb 6, 2014
    Posts:
    26
    Thank you so much. It was collapsed. This is a great kit. So glad I got it (remastered). Speaking of... Is there a difference between remastered and the other in the Unity store? Just wondering if one is better than the other or if one has more than the other. I have the remastered version, but then saw that there is another version as well.
     
    mischa2k likes this.
  45. Menatombo

    Menatombo

    Joined:
    Feb 6, 2014
    Posts:
    26
    Got everything up, and the server claims it is running, but it will not connect. Is there a certain port that needs open and can it be changed. Thanks for all your help this kit is the best thing I've bought so far!
     
  46. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Use remastered, the other will be removed soon :)
     
  47. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, the port in your transport component. If you use kcp then it’s an UDP port.
     
  48. Menatombo

    Menatombo

    Joined:
    Feb 6, 2014
    Posts:
    26
    Thank you. I bought a VPS and set up a LAMP server on it. Although, it just will not connect to 7777. Ports are open on my computer, but when I try to connect to the VPS with the server running on it... The client times out. I still love the kit and I have no problems if it is running local I can connect to it with no problem. The problem is only running online. I'm running Ubuntu 20.04 and checked server on Unity when I built it. I'm still playing around with it. But just cannot get it connected. I used the tutorial from https://noobtuts.com/unity/unet-server-hosting Although, I'm afraid it's a bit old.
     
  49. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please try the one from our mirror documentation.
    Also check out the mirror discord for mirror related issues / help.
    Lots of people there online all the time :)
     
  50. PrincessLuna

    PrincessLuna

    Joined:
    Sep 30, 2018
    Posts:
    17
    @vis2k Trying to create bot players in my game and they use Player component. These bots are created via Instantiate and NetworkServer.Spawn functions.

    But since Player component uses commands and RPCs, how can I make them work and avoid "RPC was given to a null connection" and " Trying to send command for object without authority" errors? I do not want to rewrite all commands or rpcs for server-side use.