Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

uMMORPG Official Thread

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

  1. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Hi @vis2k,

    Running a dedicated headless ubuntu server 14.04.4 with roughly 103 Monsters the CPU utilization was hovering at 54% with no players, per player added roughly 2-4% CPU utilization.

    After running Profiler with Deep Profile set, the noted highest usage was coming from BehaviourUpdate --> Entity.Update() --> SendMessage() after changing Entity.Update() to the following:
    Code (csharp):
    1.  
    2.     void Update() {
    3.        if (!isClient) { // no need to check if its player
    4.             var obs = GetComponent<NetworkIdentity>(); // return component from monster
    5.             if (obs == null || obs.observers.Count < 1) return; // return if component returned null or monster dont have players around them
    6.             SendMessage("Update" + state, SendMessageOptions.RequireReceiver); // send msg to update since monster has players around them
    7.         } else SendMessage("Update" + state, SendMessageOptions.RequireReceiver); // send msg for players
    8.     }
    9.  
    The CPU usage dropped enough to make it noticeable, my server went from the above 54% to roughly 19-20%!!

    My server specs are REALLY low, i do this purposefully to squeeze as much performance before going live on a higher end dedicated server. In my case the above was tested on a Core Duo Intel E6550 @ 2.3Ghz with 2 Gig RAM.

    Let me know your thoughts or if others would like to chime in on their own experiences.

    Thanks,
    -J
     
    Last edited: Mar 22, 2016
  2. Tristanl0gd

    Tristanl0gd

    Joined:
    Nov 11, 2013
    Posts:
    3
    Sort of a question related to jagatai33s post, does size of the games world scene cause slowdowns on the server or client the bigger the scene gets? What is the max scene size someone has tested with? I would think a very large scene with a lot of monsters, npcs, and objects would certainly cause slowdowns and eat a lot of processing/memory power even without players doing anything. Especially if the enemies are always moving and being tracked by the server.

    I know we can only use one scene at the moment, but how much does that limit creating large worlds with lots of enemies?
     
  3. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: the patcher is finished, moving to Java solved so many issues. Will create some documentation and send it to testers afterwards. If you want to test it too, please private message me and let me know what OS you use.
    Interesting. I put that observers thing on my ToDo list now. I'll think really hard about which things should and which don't have to get updated and then probably add it to uMMORPG too. Note that the server still works up to some point even with 100% CPU. I tried 1000 monsters on the cheapest VPS that I could find, and while it did have 100% cpu, everything still worked fine in the clients. There are no race conditions and no concurrency, which means that at 100% cpu everything just slows down, but it should never completely stop working. 100.000 monsters should in theory not crash the server either, they should just get really slow updates. This is actually really neat, considering that concurrent MMO servers run into trouble as soon as we reach 100% cpu. For example, things get weird if players aren't updated anymore, while monsters still are updated in another thread.

    Note that the SendMessage part is really slow too. For your custom MMO you could use abstract void UpdateIdle, UpdateMoving etc. functions and just use those depending on the state. I use SendMessage because people should be able to use their own new states like 'STUNNED' and add their own 'UpdateSTUNNED' functions without modifying the Entity class.

    The headless server doesn't render anything, so scene size is not that important. RAM usage is also really low (200ish MB), it will take forever before we run into 'real' limits like 32 or 64GB. Entities need almost no physics on the server, because movement works via Navmeshs, so that's a good thing too.

    About the always moving part: see above reply.
     
  4. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    I noted that as well, i did add roughly 437 monsters (a lot for my server LOL) just to see what would happen and was extremely surprised to see that although the CPU was at 112% usage the game was still responsive!! and what really surprised me the most is that we did not experience any rubber-banding! (most mmo platforms when the server is taxed or very "laggy" a player tends to go from point A to point B as if being pushed forward, thats has not happend yet, as a matter of fact my server started to overheat due to constant high CPU usage before i experienced any "lag" per say on the clients!! << thats actually amazing to be really honest!.

    The more i dig into UNET the more im starting to appreciate it (admittedly i was a little skeptic at first, but its certainly made a believer out of me) and the more i completely respect your decision to use it!!! Its a little odd at first trying to get used to the Server/Client concept being on the same code, but once you do its actually really nice!

    PS. Thanks for the tip on the shoulder mount points, all my items and a few custom ones now all equip perfectly and replicated on the network correctly!

    Thanks again for such an amazing project! please keep at it not to mention i believe your project is (if not the only) one that is using UNET as an MMO platform!

    -J
     
  5. Azthetik

    Azthetik

    Joined:
    Mar 20, 2013
    Posts:
    16
    Have you considered starting a freeforum so that you can keep this more organized and people can share their own little mods/plugins?
     
  6. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Yes, I think that's amazing too. At first I was also a bit skeptic about the single threaded nature of UNET, but it really does spare us from an endless list of problems and headaches.

    UNET's core concept is absolutely amazing, I agree. It will be even more amazing when someone actually starts working on it again, but that's another topic.

    I sure will keep at it until I made my own MMO from it :)

    I did consider it, there would be several benefits. For now the Unity forum is the easiest solution though, because everyone who purchases uMMORPG already has an account here and can post questions easily. Also it helps to have one big thread right here for people who are looking for Unity MMO solutions. And the UNET forum is just around the corner, that's helpful too.
     
  7. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Good news: the http://softcouch.net/patcher is now available and a demo can be tried for free!
    patcher_mac.png

    It works for all Linux/Mac/Windows (Unity) games, uses binary diffs and is as simple and easy to use as it gets.
    It's a Java program (developed in Clojure), so it's just one .jar file that works everywhere.
    It uses Git to transfer the files, which means that we don't have to host or develop our own server solutions. We can just use one of the free git repositories or rent one and never worry about it again.
    This also means that we never manually have to create patches!

    If you have questions / problems with the patcher, please private message me or email info[at]softcouch.net in order to respect the moderators and not get too much off topic about something that is not related to the Asset Store.

    I am really excited about this release and I am sure this will get all of us one step closer to our MMORPG goal.

    Now back to uMMORPG! I am working on V1.13 now, which will be another maintenance release with a few fixes/improvements that were reported lately.
     
    Last edited: Mar 24, 2016
    Cyance likes this.
  8. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    im not sure i ever saw v1.12 on the asset store :(

    -J
     
  9. Azthetik

    Azthetik

    Joined:
    Mar 20, 2013
    Posts:
    16
    Whenever I add a helmet to my character, it doesnt appear on them in the 3D space. It doesnt appear in the scene at all to be specific. It is equped, and i do get the bonuses from it, but I cant see the helmet on my head.
     
  10. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    V1.12 is still being reviewed and should be on the Asset Store soon.

    Did you put a 'EquipmentLocation' component with acceptedCategory='EquipmentHelmet' somewhere on the head in 3D?
     
  11. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Question: I am working on a progress bar im using a slider having setup in Canvas and have the values/text assigned to UIRefresh.cs, i have an updatecastbar() that sits inside UIRefresh.Update().

    The bar seems to work when i play as server&play from editor, however when i build the client / server the bar never updates so i see the bar show on screen but the progress doesnt show up.

    Any suggestions or better way to implement a cast bar? Am i missing something where perhaps im supposed to use client message to notify server so then server notify's client back to start/stop progress?

    any help is appreciated.

    PS. i can also confirm from a previous post the player death respawn, when you click on respawn the player walks back to the startpos rather then "teleporting" this only happens on a server / client build but not "server&play".

    Also found another bug with looting items from dead monsters, but once i gather more information ill post it.

    Thanks,
    -J
     
  12. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Hey,
    it sounds like your values aren't synchronized to the client. You can use SyncVars to do that.
    If you want to make a cast bar, then you can use the Skills's CastTimeRemaining function for that. Also make sure to not rename the skill class, because renaming it to 'Skill.cs' causes a really weird UNET bug that still hasn't been fixed.
     
  13. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Thank you! major /facepalm moment, that did the trick. hope you had a great weekend.

    -J
     
  14. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    @vis2k

    another (hopefully) quick question:

    I now have my proper combat states i.e. Combat Idle, Idle, 1H 2H and so on ... Would you be able to give me a pointer so i can have my players weapons go on their backs? So for example when a player is in Idle state then their weapons will be displayed on their backs as opposed to their hands.

    Im good on the state transitions and setting my different states, what im not sure about is how to get the weapons equipped to move from their weaponMount to their backs for example.

    any help is appreciated.

    Thanks,
    -J
     
  15. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: working on V1.13 today. So far I fixed two issues and improved performance.

    Hey,
    I think the easiest way is to not use any code for that. You could modify your 3D model so that the WeaponMount position is on the character's back in the IDLE animation. (You should be able to do that in Blender, 3DS Max etc.)
     
    jazz75 likes this.
  16. jimmy_doodle

    jimmy_doodle

    Joined:
    Nov 8, 2015
    Posts:
    22
    Looks very promising! Can the server also be running on an azure grid?
     
  17. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Update: V1.12 is now on the Asset Store! Changes can be seen in the first post. Working on Mobile Support now, I have got it working pretty decently already!

    I haven't tried that. If you can your Unity projects on it, then uMMORPG will probably work too.
     
    Last edited: Mar 28, 2016
  18. LrxG

    LrxG

    Joined:
    Jan 26, 2016
    Posts:
    4
    Hi vis2k, did you made any performance profiling with client number scaling up? If yes, how many CCUs did you accomplish with your current test server setup?
     
  19. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    707
    Hey @vis2k - Got a few questions about uMMORPG I want to make sure that I am making the right purchase.

    1. Does uMMORPG allow for 2D MMO Games or is it strictly a 3D API?
    2. With Unet can we host our own servers?
    3. Expanding on Question 2 - Would I be able to allow players of my game to host their own servers?

    Thank you for your time,

    HeadClot
     
  20. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: mobile support almost done. A few more smaller texture issues that are probably related to the Unity Editor for Linux, so I'll test it on Mac or Windows again tomorrow.

    Not yet. That's kinda hard to do, because I would need a lot of computers.

    Hey,
    1. 2D shouldn't be a problem.
    2. Yes: http://noobtuts.com/unity/unet-server-hosting
    3. Yes. The server and the client are one. It's exactly the same executable file.

    Hope that helps.
     
  21. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    707
    This helps tremendously - :)

    Thank you,

    HeadClot
     
    vis2k likes this.
  22. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: V1.13 was submitted for review, changes can be seen in the first post (Mobile Support & Fixes).
     
  23. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Very nice, thank you!

    -J
     
  24. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Greetings,

    Quick Question: i now have my armors tied into the ItemTemplate.cs except i added (for testing) two new fields that use SkinnedMeshRenderer so i can swap around meshes on my character, i have it so locally when i (example) put on pants the proper pants show and so on.

    My question then becomes, how do i replicate that to the reset of the connected clients?

    Also ment to ask, since i am now changing the state (hiding meshes) via the Components SetActive() does that mean i have to find a way to save that so its persistent, kinda like when i logout holding a weapon its there next time i log in?

    ***Actually i see how your updating equipment via RefreshLocations(), any suggestions how to update Mesh's by setting a component active/inactive?

    Thanks in advance,
    -J
     
    Last edited: Mar 31, 2016
  25. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Also, forgot to ask. Are we allowed to use UMMORPG's included Art assets in our projects?

    Thanks,
    -J
     
  26. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: working on Buffs today. The Unity Q&A team also confirmed the weird SyncListStruct bug (http://forum.unity3d.com/threads/bug-syncliststruct-only-works-with-some-file-names.384582/), which is really good news.

    You can replicate it with the RefreshLocation function in the Player Script. This is called for all clients on all clients.
    The only thing that you need to save is the equipment list (which uMMORPG does already). RefreshLocation is automatically called on start and on each change. Or to be exact, right now it's called in each Update call because of that other Unity bug.

    That depends on Unity's Asset Store licensing model. You probably received some info about that when purchasing the Asset.
    For a real world MMORPG, you should probably use your own 3D models so it does look unique and so on.
     
  27. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Yeah this is what i ended up using, unfortunately since its called on each UpdateLate() aside from instantiating repeatedly, in my case since im hiding/showing meshes on the character it gives it a lame blinking effect :(

    any news on said bug, or at least do you suggest a work around so we can have it only update on changes vice consistently drawing it?

    Thanks again for all your help and quick replies!
    -J
     
  28. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Don't worry, they said it will be fixed in 5.3.5: https://issuetracker.unity3d.com/is...-still-has-old-value-inside-callback-function
     
    jagatai33 likes this.
  29. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    @vis2k ,

    Would it be possible to request on your next update if you have time for the following :

    Would it be possible to arrange inside the script folder 3 subfolders in the following manner,

    ummorpg
    |
    |--------scripts
    |
    |-----server
    |-----shared
    |-----client

    The server folder would contain all server side only code, shared would be code shared by both client and sever, and finally client side only code.

    This would help i think keep things tidy and makes updates a little easier to integrate with our existing projects.

    Thanks,
    -J
     
  30. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: Buffs are finished. Will submit them to the Asset Store after V1.13 was accepted.

    Hey,
    UNET uses the same Scripts for Server & Client, separating that would be difficult.
     
    Cyance likes this.
  31. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    @vis2k Purchased the asset as promised :) looking forward to creating a mobile mmorpg with this! Keep up the great work.
     
    vis2k likes this.
  32. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Update: V1.13 is now on the Asset Store! Changes can be seen in the first post. Now with mobile support:
    2016-03-30_devicegenerated_1024.png

    Progress Info:
    been tracking down this annoying 'ReadString out of range' UNET bug for the last few days. I encountered it first when working on uMMORPG last year in August, and it randomly disappeared after a while. I finally know what causes it, and will report it today. This bug is an absolute nightmare to deal with because it randomly appears after code or scene changes and the error message happens in random places because a sent packet was messed up, which is pretty much the worst type of Networking bug that could happen.
    Let's hope for a quick fix.

    Edit: reported the bug. More infos here: http://forum.unity3d.com/threads/bu...ease-show-the-variable-that-caused-it.395692/

    Thanks, good luck!
     
    Last edited: Apr 6, 2016
    Cyance likes this.
  33. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    @vis2k

    Are you going to expand on the way ummorpg currently adds Items to players, i.e. currently helmets, shields, weapons or any item thats a static mesh which mounts to a bone then associated to PlayerEquipmentLocation is nicely rendered.

    Have you given thought or plan on adding the ability to provide players skinnedmesh, i.e. pants, torsos, hands, feet (boots), basically the ability to equip pants or shirts etc....

    Thanks,
    -J
     
  34. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Progress Info: V1.14 was submitted to the Asset Store. Changes can be seen in the first post (mainly buffs). I also refreshed the Unity bug list in the first post and reported a few more. Thanks to Jeffrey for pointing out the WebGL bug!

    I will add this to the Roadmap. Priority depends on how many people need it :)
    By the way, you can probably equip something like arm protectors, leg protectors etc. already with the current system as static meshes, for some basic visual feedback.
     
  35. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    yep got it in place, i actually like the approach you took with ummorpg with regards to static items which works fantastic!

    -J
     
  36. VValdus

    VValdus

    Joined:
    Mar 15, 2016
    Posts:
    6
    "Progress Info: V1.14..... "

    Great!!!

    Thx!!
     
    vis2k likes this.
  37. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    Hey @vis2k will you be adding documentation for setting up mobile? Whenever I build, my screen is purple, looking to be a problem with textures, I'm guessing the mobile textures are conflicting with originals. Any ideas? I feel like Im missing a step.
     
  38. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Hey,
    which operating system and Unity editor version do you use? I also had issues building it for mobile when I used the Unity Linux Editor, but that is expected because it's still in development. It did work fine when using a Mac with El Capitan.
     
  39. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    I'm using the latest windows stable release (5.3.4f1)
     
  40. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
  41. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    Without those the Android apk wouldnt even be built, I mentioned I have a completed build of the apk, and tested on my device, but screen is purple, so yes, I have all the SDK JDK and NDK set up.

    Have you got ummorpg working on a mobile device? I'd like to know if I'm missing any other steps, thanks! :)
     
  42. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    My apologies didnt reread your original post. yes i have ummorpg running on Samsung Note IV, Samsung Tab S and the Samsung Galaxy S6.

    I only have a simple default size terrain with Unity standard assets for textures/mats as im still working on core/framework components of my game, eventually ill end up using Gaia to generate my terrains so ill test that eventually in hopes that they arent too large for Mobile platforms.

    -J
     
  43. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Does building the original uMMORPG project without any modifications work?
     
  44. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    If you mean simply importing the asset, building, and running in PC mode, yes, game works fine. It's only giving me the pink textures when switching to android player and building.
     
  45. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    I meant importing the asset in a fresh project and then building for android, without adding your own textures etc.? Also can you post a screenshot of the problem?
     
    Last edited: Apr 11, 2016
  46. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,368
    Hello, any chance for video tutorials how to change the player, NPC etc?
     
  47. MoMoGames360

    MoMoGames360

    Joined:
    Feb 26, 2014
    Posts:
    8
    That was the initial problem I described, I never added anything, the first thing I wanted to test was if it was able to build to android, didn't touch anything.

    As for the screenshot, no point really, just imagine the whole screen being pink, nothing distinguishable.
     
  48. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,368
    Could you please add a close click function? When i click on the INVENTORY icon, it opens. Another click on the icon should close the open inventory. It would be more userfriendly instead force the user to close the open inventory manually.
     
  49. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,536
    Update: V1.14 is now on the Asset Store! Changes can be seen in the first post (mainly buffs).
    Working on V1.15 now. It will be a maintenance release where I implement a new distance calculation mechanic that is important for big entities. Right now, entities have a attack range, for example '1'. If however a boss monster is really big and actually has a radius of '1', then no one would be able to attack it, because the distance between boss.position and player.position is always at least '1'. I will change the distance calculation so that it always uses a point on the entity boundary, so that it doesn't matter how big a monster is, because players will attack a point on the outside of the boundary instead.

    I explained that in the documentation. Which part didn't work? I can always try to explain it better there.

    Okay, could be several reasons. Are you able to build other projects for your phone? Could you try to select all textures and then use another compression? Or another mobile shader for all materials?

    Yes, will do.
     
    Last edited: Apr 12, 2016
    Cyance likes this.
  50. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    164
    Thanks for v1.14 btw!

    Would you mind taking a peek at looting, if you run around and kill a few monsters then circle back and loot youll note after that initial wave of kills artifacts will remain on the loot window i.e. doops of the items given as a drop. In otherwords, if you kill a few mobs circle back to loot, the loot window will then start to contain additional drop items instead of the single sword you would expect to get.

    Let me know if im not making sense and ill make a video.

    -J
     
unityunity