Search Unity

uMMORPG Official Thread

Discussion in 'Assets and Asset Store' started by vis2k, 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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    11
    @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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    11
    https://github.com/vis2k/Mirror/pull/2858
    Done. But I ask you to doublecheck that :D
    Looks like it just works.
     
  13. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
  14. PrincessLuna

    PrincessLuna

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

    vis2k

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

    PrincessLuna

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

    iSleepzZz

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

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    728
    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.
     
    vis2k likes this.
  19. SickaGamer

    SickaGamer

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

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    11
    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:
    728
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    57
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    57
    Thanks for your reply. Btw, are there any plans to expand with the possibility of more than just one scene?
     
  27. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    Mirror supports additively loaded scenes.
    Check out the Mirror examples.
     
  28. SijoKenzo

    SijoKenzo

    Joined:
    Sep 30, 2021
    Posts:
    17
    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:
    229
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    229
    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. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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:
    229
    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:
    229
  37. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
  38. gearedgeek

    gearedgeek

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

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,971
    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.
     
unityunity