Search Unity

uMOBA - Create your own Dota/League of Legends Game

Discussion in 'Assets and Asset Store' started by mischa2k, May 15, 2016.

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Well that's a lot of features :)
    We have lots of ideas too, things take a lot of time when making multiplayer games though. Everything has to be tested very carefully.

    Did you get FPS drops in the WebGL demo or where? Did you try lower quality settings?
     
  2. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    I got the fps drops in WebGL
    The Demo
     
  3. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    And how many FPS do you have after 30 seconds or so? What kind of computer do you have?

    There are a lot of computations happening and the whole thing runs in your browser, so we can't expect native speed.
     
  4. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    Im running on a custom built Desktop

    Windows 7 64-bit
    Google Chrome

    8gb Ram
    AMD A10-7700K Radeon R7 3.40 GHz

    The lag cleared up after 30 seconds but it still seemed laggy not sure.
    You should add an fps counter on the demo.
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It's definitely not 60 frames per second, that's expected. Do you have FPS drops in a Windows/Mac/Linux build as well? If you don't own uMOBA yet, I can send you a build for testing if you want.
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress Info: working on V1.24. Will have some minor maintenance improvements again.
     
    Last edited: Dec 17, 2016
  7. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    I havent been able to test it outside WebGL
    I dont mind trying on another build.
     
  8. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Which operating system do you use? I will create a build and send it to you then.
     
  9. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
     
  10. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Check your PMs.
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMOBA V1.24 is now on the Asset Store:
    • Make sure to adjust all the animation controllers to the latest version and import all attack animations with 'loop time' enabled.
    • States are now passed directly to the Animator to fix several animation glitches.
    • UIChat.AutoScroll is much faster now
    • UIChat.keepHistory to only keep a maximum amount of messages
    • 'var' is not used for simple types like int, string, float anymore to prepare for bandwidth improvements
    • Improved Monster and Tower OnAggro distance comparison
    • UIChat.AddMessage GameObject 'g' renamed to 'go' for consistency
    • Skill.buffsHp/MpPerSecond is now consistently a value like 0.1 = 10% instead of 10 = 10%
    • Removed Utils.Clamp because it's not needed anymore
    • System.Math.Min/Max is now used instead of Utils.MinLong/MaxLong
    • Entity.Update clears hidden targets
    • Entity now uses a SyncVar for the target. EntityTargetSync script removed.
    • Entity.state, target, hp, mp are not explicitly 'private' anymore since the default accessibility is fine
     
  12. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    Well it's also what's required for a MOBA sadly (and this is UMOBA), though skill shots is planned already and a few of the other features he's listed are already possible with the kit (Spawn more than one minion, jungle creeps (though no perks), Camera lock and map camera)

    Also I am getting an error with my build with 1.24

    Assets/uMOBA/Scripts/TextMeshHealthBar.cs(13,35): error CS1929: Type `UnityEngine.Color' does not contain a member `ToHexString' and the best extension method overload `Extensions.ToHexString(this UnityEngine.Color32)' requires an instance of type `UnityEngine.Color32'

    Fresh install of the kit
     
  13. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Which Unity version do you use? 5.5.0p1?
     
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Small update: someone else reported that issue to us. It seems like the Unity updater didn't catch this one in some circumstances, which is weird since it works fine for us.

    Here is the new GenerateHealthString function that we will use in the next version:
    Code (CSharp):
    1.     string GenerateHealthString(int n, Color color) {
    2.         return "<color=#" + ColorUtility.ToHtmlStringRGBA(color) + ">" +
    3.                new string('_', n) +
    4.                "</color>" +
    5.                "<color=#" + ColorUtility.ToHtmlStringRGBA(backgroundColor) + ">" +
    6.                new string('_', 10-n) +
    7.                "</color>";
    8.     }
     
    Last edited: Dec 21, 2016
  15. kxia1234

    kxia1234

    Joined:
    Oct 4, 2016
    Posts:
    2
    Hey, I was wondering how I would be able to implement a "skillshot" with this package.
     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    We are not 100% sure about that ourselves yet, it's still a bit of a research topic. There are too many different ways, it's hard to say what works best with UNET without doing more tests.

    In it's simplest form you'd cast some kind of ray or box towards a direction and deal damage on anything that it hit.
     
  17. kxia1234

    kxia1234

    Joined:
    Oct 4, 2016
    Posts:
    2
    I tried this and I was wondering how I can access the hp and damaging. I was looking in the entity scripts and I just can't figure it out. Can you maybe give me a rough idea how I would make a collision damage a character or minion with the already health system that is in place?

    Basically, how can I test for a collision and then send the damage to the minions and the characters over UNET.
     
    Last edited: Dec 22, 2016
  18. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can use the Player.DealDamageAt function.
     
  19. JGalt

    JGalt

    Joined:
    Nov 19, 2015
    Posts:
    3
    This is an amazing package, though I am facing a small issue.
    I tried running a headless server using -batchmode -nographics on Windows with Unity v5.5.0f3. The client is able to connect but after that the server crashes.

    Attaching a crashlog for this problem. I would appreciate if you can have a look at it.
     

    Attached Files:

  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    That's definitely a Unity bug. Could you use the Unity bug reporter to report it and then post the case number here so we can keep track of it? Also make sure to use the latest Unity version to report it.

    In the mean time I suggest using the Linux headless mode, that works.
     
  21. JGalt

    JGalt

    Joined:
    Nov 19, 2015
    Posts:
    3
    I'm not able to replicate the bug in a minimal test project.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Networking;
    5. using UnityEngine.Rendering;
    6.  
    7. public class CustomNetworkManager : NetworkLobbyManager
    8. {
    9.     void Start()
    10.     {
    11.         if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Null)
    12.         {
    13.             networkAddress = "127.0.0.1";
    14.             StartClient();
    15.         }
    16.         else
    17.         {
    18.             StartServer();
    19.         }
    20.     }
    21.  
    22.     public override void OnLobbyStartServer()
    23.     {
    24.         Debug.Log("Server started");
    25.     }
    26.  
    27.     public override void OnLobbyStartClient(NetworkClient lobbyClient)
    28.     {
    29.         base.OnLobbyStartClient(lobbyClient);
    30.         Debug.Log("Client connected");
    31.     }
    32.  
    33.     public override void OnLobbyServerPlayersReady()
    34.     {
    35.         bool allready = true;
    36.         for (int i = 0; i < lobbySlots.Length; ++i)
    37.         {
    38.             if (lobbySlots[i] != null)
    39.                 allready &= lobbySlots[i].readyToBegin;
    40.         }
    41.  
    42.         if (allready)
    43.             ServerChangeScene(playScene);
    44.     }
    45. }
    46.  
    However, this does not lead to a crash like uMoba does. The crash happens as soon as a lobby player connects to a headless dedicated server. Can you check on your end for this bug too?
     
  22. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It should be fine if you just submit the whole uMOBA project with the stack trace (your log file). This is pretty obvious to reproduce.
     
  23. Maxbrundev

    Maxbrundev

    Joined:
    Oct 21, 2016
    Posts:
    3
    Hello vis2k!

    Really great work!
    What is your plan for the futur?
    Are you going add a new menu with heros selection or mod selection like "vs AI" "multiplayer" it would be awsome!

    Thank you for your work. :)
     
  24. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    When trying to edit the Player.cs script (I added a simple line to increase the death timer at each each death)
    I saved the script and now get this error
    Assets/uMOBA/Scripts/Player.cs(754,30): error CS1525: Unexpected symbol `string'

    754 string msg = "You died and lost " + loseExp + " experience and " + loseGold + " gold.";

    Scratches head...
     
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Thanks. Working on network optimizations right now, lots of them. Also talking to a UNET developer about a bug that prevents us from sending more than 200KB/s to one client. It's more than enough, but still.

    Sounds like a missing semicolon or curly bracket somewhere. The compiler expects something like } or ; but since your forgot it, it only gets an unexpected 'string'.
     
    BryanO likes this.
  26. ArtsyChen

    ArtsyChen

    Joined:
    May 14, 2016
    Posts:
    23
    Happy Holidays everyone! Hope you're all having a great time!! :)
     
    mischa2k likes this.
  27. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    Alright so my fps is fine on a windows build
    Also, i have a request
    it is a great feature

    Hold down move to constantly move towards mouse
    This should be really easy just instead of calling the move once call it in the update function
    And make the moving icon appear when mouse is pressed and when its released
     
  28. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Try modifying GetMouseButtonDown to GetMouseButton in Player.SelectionHandling, that should get pretty close.
     
    BryanO likes this.
  29. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Happy Holidays!

    Im getting an intermittent lag in the movement of the player. I click on the point to move
    most of the time the character moves there but every five clicks or so the character lags
    for several random seconds then moves - I can see the indicator and even click in a different spot
    and set the movement indicator there - but for some reason the character doesn't move. The minions all move and attack as expected. I've tried messing with iterations of nav mesh agent setting. But I have no clue where to look in the code to address this player movement lag issue.

    To be fair it doesn't do this in a clean project and I've made these alterations to game engine load
    1) Enabling nav-mesh obstacle avoidance (to stop minions from occupying the same space)
    2) Increasing the number of minions per spawn by 4x (to represent current MOBA game play trends)
    3) Increasing the variety of minion units to add a ranged unit.
    4) mild alterations of the terrain and nav mesh to create customized variety
     
  30. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    What dependent code is required on a camera to allow the player movement functionality? I'd like to mod the camera to create a smooth follow camera that can rotate and also pop out of player lock and function as as your camera does by scrolling away from the hero.

    I've tried switching between cameras and adding your scripts to the second camera but your scroll script seems to be required to make the indicator and it fights with any other camera move script. This is not an error report its just easier to ask you after digging around in your scripts for several hours looking for the function and coming up empty.
     
  31. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Im getting a yellow exclamation point notice in a new project for every instantiated entity:

    Observer is not ready for Player1 (UnityEngine.GameObject) hostId: -1 connectionId: 0 isReady: False channel count: 0
    UnityEngine.Networking.NetworkProximityChecker:Update()

    What is this notice concerning?
     
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Happy Holidays!

    Unity only does a fixed amount of navmesh path calculations per frame. If it takes your character a while to start moving, you can select the Main Camera in the world scene and increase the Iterations property of the SetNavMeshIterationsPerFrame script.

    You should be able to completely remove the camera scripts and develop your own, that's all client sided and no networking involved. You may get an error that "FocusOn" isn't found anymore because the player uses that function to center on it after respawning, but you can just comment that out for now.

    Just a UNET warning, nothing to worry about. Probably happens because UNET tries to build observers while some of them aren't initialized yet. It rebuilds them all the time anyway, and everything still works fine.

    Might be worth investigating at some point though, yes.
     
  33. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Thanks for your kind responses. Currently modding your Monster.cs in an effort to create NPCHeros. However if the scripted is duplicated and renamed to create additional functionality Specific to NPCHeros. The NPCHero cant be targeted by the opposing player and is ignored by the opposing team. How to solve this? - Any suggestions on what to do for NPC Hero AI? How far into this are you?
     
  34. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Each entity has a CanAttackType function. So if players should be able to attack it, open Player.cs and add that type to CanAttackType. That should work.

    And you are welcome, we are really happy to see people work with uMOBA!
     
  35. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMOBA V1.25 is now on the Asset Store:
    • Upgraded to Unity 5.5.0p1 for important bug fixes.
    • Color.ToHexString replaced with ColorUtility.ToHtmlStringRGBA
    • 123Skill script renamed to Skill because SyncList name bug was finally fixed by Unity
    • UIDragAndDropable small syntax improvement
    • NetworkName, NetworkNavmeshAgents use Channels.DefaultUnreliable instead of '1' now
    • Network configuration improved for MOBAs
    • UINpcTrading sell slot tooltip is now hidden by default
    • Player Drag And Drop OnDragAndClear for NpcSellSlot added
     
  36. gydronik

    gydronik

    Joined:
    Oct 20, 2012
    Posts:
    8
    Hi. Please add reconnect player.
     
  37. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    The addition worked with the towers and monsters they all attack this New NPC Class after adding the type- but not with the player - is there an additional line of code for allowing player targeting? Ive done the exact same addition to each script - but I notice an additional citation referencing CanAttackType in the non-player classes - that doesn't appear in your player.cs
     
  38. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    I am not seeing the mouse over highlight appear in the new update to 5.5 when targeting - anyone else experiencing this?
     
  39. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    So the new type can't target a player, or the player can't target the new type?

    Works fine in 5.5.0p3 for me. Did you test it with a fresh uMOBA version?
     
  40. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    We use Unity's NetworkLobby asset, I am not sure when they are planning to add that feature.
     
  41. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Player cant target new type - new type interacts as expected (and attacks all other entity types ) from its copied script (Monster.cs)


    I just did- and the mouseover doesnt work - however
    I'm in the default newest default version (downloaded from the main link on Unitys get Unity page) which is 5.50f3 personal. arrg... I wonder what they changed in that update. I wonder what else they broke in your scripts. :/ So I guess this is a heads up - can you let me know if u can fix it?
     
  42. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Okay so at which point does it fail with the player? Can you target the new type? Can you cast a skill on it? Does the player walk towards it?

    There might be a bug in 5.5.0f3. I don't recommend using it anyway, since I vaguely remember some other critical bug for uMMORPG in there, so it probably affects uMOBA too. You can get 5.5.0p3 here: https://unity3d.com/unity/qa/patch-releases . This definitely works for me. 5.5.0p3 is newer by the way, it's the third patch.
     
    BryanO likes this.
  43. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Before I upgraded to 5.5.0f3 the mouseover worked for the player but they dont interact with the new type at all. Clicking on the new type of unit applys the selector cursor but nothing else happens.

    I dunno why but the line thickness was weird and had something to do with the order of the materials- I solved it though for now. Thanks for your help.
     
    Last edited: Jan 1, 2017
  44. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    When I click on a unit to attack it from a distance and another unit kills it before reaching that spot my player unit changes to the idle animation and slides to the location of the dead unit. Is this a bug others are seeing?
     
  45. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Interesting, I will check it out!

    Could you perhaps send me your project so I can check out the new entity type problem myself?
     
  46. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    A fix will be in the next version. Great find!
     
  47. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: uMOBA V1.26 is now on the Asset Store:
    • Player.SkillPointsSpendable now includes the skill level in the calculation
    • Base death animation is played now
    • RpcShowGoldPopup moved from Entity to Player because it's only ever needed by Players
    • ShowGoldPopup is now a TargetRPC and only shown for the player that gained the gold
    • All commands (except CmdSetTarget) now use the unreliable channel for better networking performance
    • PlayerChat TargetRPCs use the unreliable channel now
    • Entity and Player RPCs use the unreliable channel now
    • Lobby Network Manager OnValidate channel check added
    • Removed some UI Chat comments
    • '#ifdef 5.5 or newer' used for 'using UnityEngine.AI' for downwards compatibility
    • All textures use normal compression instead of uncompressed mode now. Reduces WebGL size from 48 to 30MB and OSX build size from 223 to 141 MB.
    • Player moving state casting cancel return "IDLE" changed to "MOVING" to fix a bug where the player would slide to a dead monster
     
    BryanO likes this.
  48. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    we need player selection!
     
  49. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I know :)
     
  50. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    What does pressing create game and naming the game do? All I get is a panel that sez connecting. So far ive only created local games for testing. Please explain - I dont see the matchmaking functions described in the manual.