Search Unity

uMMORPG Official Thread

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

  1. cioa00

    cioa00

    Joined:
    May 31, 2016
    Posts:
    203
    Here is something i pulled out during my night time (i guess ill go and try get some sleep now :p), which allows you add repeated daily quests.
    There is probably better way to achive what i tried in here, but here is my solution at the moment, so enjoy it or hate it :D

    Code (CSharp):
    1. // open file Scripts\Database.cs
    2. // add additional columns to character_quests table definition
    3. // so it looks like
    4.         ExecuteNonQuery(@"CREATE TABLE IF NOT EXISTS character_quests (
    5.                            character TEXT NOT NULL,
    6.                            name TEXT NOT NULL,
    7.                            killed INTEGER NOT NULL,
    8.                            completed INTEGER NOT NULL,
    9.                            daily INTEGER TEXT NOT NULL,
    10.                            quest_date TEXT NOT NULL)");
    11.  
    12.  
    13. // find method CharacterLoad
    14. // replace quest loading code block
    15.                 // load quests
    16.                 table = ExecuteReader("SELECT name, killed, completed, daily, quest_date FROM character_quests WHERE character=@character", new SqliteParameter("@character", player.name));
    17.                 foreach (var row in table) {
    18.                     var daily = ((long)row[3]) != 0;
    19.                     var questDate = (string)row[4];
    20.  
    21.                     var condi = false;
    22.                     if (daily) {
    23.                         if (questDate != "" && Convert.ToDateTime(questDate) > DateTime.Today) condi = true;
    24.                     } else condi = true;
    25.  
    26.                     if (condi) {
    27.                         var quest = new Quest();
    28.                         quest.name = (string)row[0];
    29.                         quest.killed = Convert.ToInt32((long)row[1]);
    30.                         quest.completed = ((long)row[2]) != 0; // sqlite has no bool
    31.                         player.quests.Add(quest.TemplateExists() ? quest : new Quest());                  
    32.                     }
    33.                 }
    34.  
    35.  
    36. // find method CharacterSave
    37. // from there find comment "// quests: remove old entries first, then add all new ones"
    38. // replace sql query inside foreach cycle, so overall block should look like
    39.         foreach (var quest in quests)
    40.             ExecuteNonQuery("INSERT INTO character_quests VALUES (@character, @name, @killed, @completed, @daily, @quest_date)",
    41.                             new SqliteParameter("@character", name),
    42.                             new SqliteParameter("@name", quest.name),
    43.                             new SqliteParameter("@killed", quest.killed),
    44.                             new SqliteParameter("@completed", Convert.ToInt32(quest.completed)),
    45.                             new SqliteParameter("@daily", Convert.ToInt32(quest.daily)),
    46.                             new SqliteParameter("@quest_date", quest.quest_date));
    Code (CSharp):
    1. // open file Scripts\Player.cs
    2. // before method CanStartQuest add new method
    3.     public bool IsValidDailyQuest(string questName) {
    4.         return quests.Any(q => q.name == questName && (Convert.ToDateTime(q.quest_date) > DateTime.Today));
    5.     }
    6.  
    7. // and add additional condition to method CanStartQuest so overall method would look like
    8.     public bool CanStartQuest(QuestTemplate quest) {
    9.         // not too many quests yet?
    10.         // has required level?
    11.         // not accepted yet?
    12.         // has finished predecessor quest (if any)?
    13.         return quests.Count < questLimit &&
    14.                level >= quest.level &&                  // has required level?
    15.                GetQuestIndexByName(quest.name) == -1 && // not accepted yet?
    16.                (quest.predecessor == null || HasCompletedQuest(quest.predecessor.name)
    17.                 && (quest.daily ? IsValidDailyQuest(quest.name) : true));
    18.     }
    19.  
    20.  
    21. // find method CmdAcceptQuest and replace it (only change in here is just giving value to quest.quest_date)
    22.     public void CmdAcceptQuest(int npcQuestIndex) {
    23.         // validate
    24.         // use collider point(s) to also work with big entities
    25.         if (state == "IDLE" &&
    26.             target != null &&
    27.             target.hp > 0 &&
    28.             target is Npc &&
    29.             0 <= npcQuestIndex && npcQuestIndex < ((Npc)target).quests.Length &&
    30.             Utils.ClosestDistance(collider, target.collider) <= talkRange &&
    31.             CanStartQuest(((Npc)target).quests[npcQuestIndex]))
    32.         {
    33.             var npcQuest = ((Npc)target).quests[npcQuestIndex];
    34.             npcQuest.quest_date = DateTime.Today.ToString("d");
    35.             quests.Add(new Quest(npcQuest));
    36.         }
    37.     }
    Code (CSharp):
    1. // open file Scripts\Quest.cs
    2. // add
    3.     public bool daily {
    4.         get { return template.daily; }
    5.     }
    6.  
    7.     public string quest_date {
    8.         get { return template.quest_date; }
    9.     }
    Code (CSharp):
    1. // open file Scripts\QuestTemplate.cs
    2. // for example add before header "Rewards"
    3.     public bool daily;
    4.     [HideInInspector] public string quest_date;

    Date will be saved to database as string and the format should be MM/DD/YYYY. If you prefer to get other date formats or even save the time (hours, minutes, seconds) then you need make some changes to get it work as you would like it.
    Since at the moment quests will be deleted every time when character data is saved, then quest date is not so useful for normal quests. In other case we could use it for example to show somekind history log for player.
     
    Last edited: Feb 18, 2017
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Good morning everyone!

    Just go to Build Settings and build for android, that's all.
    If it doesn't run on your phone, try a fresh Unity project and see if that works.

    Aren't they good enough? You can run around, use the chat, kill monsters, use skills, move around items, it all works.

    Thanks for the effort, I already have a forum set up though. Just waiting for SSL and a few minor adjustments.
     
    jria likes this.
  3. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Thank you sir vis2k for your fast response. Now, the next problem we encounter is on how to have a server so that many players/users can connect to our game.
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Take a look at the included documentation
     
    jria likes this.
  5. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Hi @vis2k, I am finally finding a little free time to play with uMMORPG again. Now I run across a small issue with setting the attack range. I understand we can set a Cast Range on each skill... but for some odd reason when I set the Cast Range to say 1 trying to achieve a very close attack, nothing happens. If I try to set the cast range to a little further up to say 1.5, I find that this range remains equal 2.0. So I continue seeing my player and mobs attack from this further range as shown in screenshot. Is there anything else that would effect the attack range? I'm trying to close the distance for close range combat.

    upload_2017-2-18_17-42-21.png
     
    CrandellWS likes this.
  6. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello, any one can help me? I try to make a pick up things from the ground and put it back to my backpack, and i don't have a clue how to do that, any tip or help is welcome. Thank you guys
     
  7. leomoyses

    leomoyses

    Joined:
    Feb 2, 2017
    Posts:
    14
    Go lower... try 0.*
     
    jria and mischa2k like this.
  8. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Check the monster prefab, the pelvis collider has to be over the "AggroArea[Last in Hierarchy so that pelvis Collider is found first]"

     
    Last edited: Feb 19, 2017
    jria and mischa2k like this.
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You should know that this is much more computationally expensive for the server when there are thousands of NetworkIdentities more on the ground.
    But if you still want to do it, you could have some kind of ItemDrop prefab, instantiate+spawn that when the monster dies, then onclick call CmdPickUpItemDrop and add the ItemDrop.item (of type ItemTemplate) to the player's inventory.
     
  10. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Nice character. How to create character like that?
     
  11. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello, I just want decorate the house with items that you can purchase from the NPC, this way many player if they have a house they can spend gold on decorating his house. I plain to have 50 houses in the beginning and each with Max's of 10 items that can drop like bed,table,chair,etc do you think is too much? Or is better if I made a prefab house whit almost every interior complete, and only decorate with items that drop bosses? This way do you think reduce the usage of the server? Or just simply don't add nothing? What u think, thank you have a good Sunday
     
  12. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I found something called "Easy Build System" it works with UNET check it out, I can't promise you that it will work with uMMORPG but if you have basic knowledge of Unity you should be just fine!
    It should be just fine on the server, the Build system also have save over the network so I really hope it works, I'm going to check t out in a few days so if you mind waiting I can give you a reply!
    https://www.assetstore.unity3d.com/en/#!/content/45394
     
    Ronith likes this.
  13. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38

    the controllers are good. but the camara movement is not good. you have to use 2 fingers and when you do it the camera move crazy.
     
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: cleaning up code again today. Found a few unecessary 'var's in the PlayerChat script, which will be 'string' and 'int' again in the next version. I am also continuing to rename variables like 'idx' to something more literal like 'index' all over the place. This is really a great coding convention, considering how good humans are with reading literal names. If we read the word 'characterIndex' we know exactly what this variables is. If we read 'charIdx' there are a few more steps involved for our brain. Simple code should be simple for the brain.

    Yes that was the old version. Try the latest one, camera controls were improved for mobile. You can do two finger pinching and there is no more accidental rotation anymore.
     
  15. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Thank you :)
     
  16. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Ah that might be the problem then... thanks so much!! I will give it a try now...
     
    MHolmstrom likes this.
  17. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Running into another small issue... this time with the Camera! Notice in the first screenshot the default Camera Zoom I set it to when I start the game. Now the minute I press Right Click to begin Rotating the Camera, by default for some odd reason the first time I press Right Click upon entering the game it snaps the Camera to a Top Down View. Is there some kind of setting I am missing to toggle off or something? Very odd... any tips for this one?

    cam1.jpg
    cam2.jpg
     
  18. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    It might be that the rotation limits are tweeked? On Y limit did you set 180, -180?
     
  19. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    @Kuroato - you can change rot in CameraMMO (use your x, y, z)
    Code (CSharp):
    1. void Awake () {
    2.         //rot = transform.eulerAngles;
    3.  
    4.         rot = new Vector3(50, 0, 0);
    5.     }
    also in Player.cs
    public override void OnStartLocalPlayer()
    Code (CSharp):
    1. Vector3 topView = new Vector3(6.28f, 17.34892f, -8.235751f);
    2.         Camera.main.transform.position = topView;
    3.         Camera.main.transform.rotation = Quaternion.Euler(new Vector3(50, 0, 0));
    My question:
    How to change tooltip position to display under the cursor? I tried in UIShowTooltip but not always working right.
    void CreateToolTip()
    Code (CSharp):
    1. // instantiate
    2.         var tooltipPos = new Vector3(transform.position.x, transform.position.y - 32, transform.position.z);
    3.         current = (GameObject)Instantiate(tooltipPrefab, tooltipPos, Quaternion.identity);
     
    Last edited: Feb 20, 2017
    jonkuze likes this.
  20. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    I actually have it set to default 40 -80
     
  21. setauz

    setauz

    Joined:
    Jan 19, 2017
    Posts:
    8
    Hi to all and thank you vis2k for this asset, bought it 5 days ago and helped me alot already.
    i have 3 questions for you all and hope you can help me:

    1. i made a basic, playable, small rpg and now i want to test it with my 4 brothers (all of them in different cities). i am really new about this server things, so i need to know can i play with my brothers over the internet? do i need anything more than unity and uMMORPG? do i need a dedicated server or VPS for just 5 of us playing? What about Unets free capacity?
    i am pretty sure that i read during development process 20 CCU is free until you publish your game, isnt that mean we can use Unet Cloud system for 20 players to test our game?

    2. Is it too hard to add success possibility to crafting? Can i make it myown or vis2k can you add it to next update?
    Some of you may know,some oldschool mmos had adding plus to weapon/armor, adding it +1, +2 .. with decreasing probability. i want this and is there anyother way than crafting about this?

    3. How can i change npc dialogues bacground colors or text types? Is there a simple way for this? If not what is the hard one? And if i buy one of dialogue systems on asset store can i adapt it my game easily?
     
  22. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello good morning, is any one that add effects, to the attacks or spells? I try hard to do it, but not success, any one can help? Thank you guys
     
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yea like the other said, try playing around with the settings.
    Also try using the default camera values first, then tweak them to your needed on step by step and see when it fails / what fails.

    I will add them soon.

    1. You need a VPS. Check out my guide: https://noobtuts.com/unity/unet-server-hosting . I recommend using the same hoster too, simply because it works fine with that one.

    2. It's not hard, it's on my roadmap. Crafting is still new and I didn't want to add probabilities yet, because I wanted to wait for bug reports first. There were none, so probabilities will come eventually.

    3. Check out Unity's UI manual. It's very easy, you don't have to write code to change colors. I wouldn't recommend to buy one from the store, since it would have to work with UNET - most (all?) of them don't.
     
    luis29vm likes this.
  24. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I forgot that the new mobile camera controls aren't released yet when I mentioned that before. So please wait until V1.63 and try again.
     
  25. N2KMaster

    N2KMaster

    Joined:
    Jul 15, 2013
    Posts:
    64
    New question......Navmesh baking....I see jump as an option but it doesn't seem to do anything (ie WOW falling off the edge of a mountain even) and there is no jump option. I'm a player who does the hop, and another question arose from the person who bought the asset. There a way to allow for the jump and a brandishing of the weapon? And could i see an example of this? Still haven't gotten a monster to work yet, so I'm still paying for those and for anyone that can do it.
     
  26. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: V1.63 submitted for review
    • Upgrade Info: delete the old database file. Adjust item, quest, skill tooltips where necessary because {HEALSHP} changed to {HEALSHEALTH} etc. Rename Player/Monster/Npc animation controller 'skillCur' parameter to 'currentSkill'
    • CameraMMO mobile controls improved: two finger pinching, 45 degree fixed angle
    • Utils.IsPointerOverGameObject now works on mobile too. Mobile can't click through UI anymore
    • NetworkManagerMMO.OnValidate: 'use server list' message is now shown directly in the NetworkManager ip field to make it more obvious
    • Utils.PrettyTime renamed to PrettySeconds for clarity
    • CameraMMO syntax simplified
    • Database simplified: more literal variable names; some database fields renamed (hp to health etc.)
    • Extensions.NearestValidDestination syntax improved
    • NetworkNavMeshAgent variables renamed to something more literal (last => lastDestination etc.)
    • NetworkManagerMMO variables renamed to something more literal
    • Quest, QuestTemplate: variables renamed to something more literal
    • PlayerChat: using 'string' instead of 'var' for some variables
    • PlayerChat uses variables renamed to something more literal and other smaller improvements
    • Skill, SkillTemplate, UISkills variables renamed to something more literal
    • Item, ItemTemplate, UIItem variables renamed to something more literal
    • Entity, Player, Monster, Npc variables renamed to something more literal
    • Player.PlayerLevel struct is now a class; renamed unnecessary constructor
    A lot of variable names were renamed in this update. Might take a few minutes to upgrade your custom projects again, but it's definitely worth it. Variable names like 'exp' were just too ambigious: is it experience, is it exponent? Now it's all plain and simple, exactly what it says.

    You can implement jumping but then you probably won't use the built in Navigation system at all, since you'd have to be able to jump over unwalkable areas without a Navmesh. This would require a few modifications (e.g. NetworkTransform instead of NetworkNavMeshAgent) and it will greatly complicate your whole server physics calculations.

    If you are looking for an artist, me and my 3D art friend might be able to help if you PM me your budget.
     
    Ronith likes this.
  27. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    When will you released the party system? hohohoho
     
  28. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    @vis2k Casting projectile shouldnt be to hard to add right?
    All jumping does with navmesh is let you leap with a curve over your set distance down or up when trigged, so no real jumping just.. edge jumping.
    About changing UI on the previous question I might do a tutorial for the docs? A more serious one. Its easy, go to canvas find npcdialog and just check the childs and you will find sprite slot and just replace it :)
     
  29. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    93
    @vis2k hello
    Would not it be better to put the update of the ui in fixedupdate instead of update for to consume less cpu or in
    events
     
  30. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Is that it for the variable renaming, or is there more coming?
     
  31. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Is any way that player can attack player if the lvl is 20+ this way if Im lvl 5 any player can't attack me until I reach lvl 20, is something like lvl protection.
    and other question is any one know how to make a protection zone? like temple or something like that, in this place no one cant attack, please let me know , I really want this feature for my project. Thank you
     
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Didn't start on it yet. Can't give you an exact date, sorry.

    You mean like a fireball for a mage? That would be the exact same like the arrow. Fireballs are meant to be projectiles too.

    That depends on a lot of things. You can do so and it won't break anything. I'll stick to Unity best practices and only do physics stuff in FixedUpdate. Also People would start asking why the hell there is FixedUpdate all over the place instead of Update, so for simplicity's sake I'll probably leave it like that.

    Good question, I was already wondering why no one complained yet :)

    So I started uMMORPG as my own project for my own MMORPG, that's why I used my own coding style preference. This wasn't consistent with the Unity C# coding convention and it also wasn't perfect for other people. There is a good book 'Clean Code' that talks about the importance of using literal variable and function names. 'cancelButton' is 100% more easier to understand for humans than 'btnCancel'. That's why it made sense to rename a lot of variables.

    For the future, I want to stick with the Unity C# coding convention. Doing so is a much better engineering practice, because even though my personal preferences may change again, Unity's won't. Unity isn't very clear about variable names though, so I'll stick with the 'most literal name that doesn't require a comment' approach. Unity is also not very clear on curly brackets like those:
    Code (CSharp):
    1. if (1 < 2) {
    2.     ...
    3. }
    vs. those:
    Code (CSharp):
    1. if (1 < 2)
    2. {
    3.     ...
    4. }
    Unity uses the first style for newly created Scripts and for several projects on their bitbucket account. Unity uses the second style for other bitbucket projects and for their documentation a lot too. So that's just weird and creates a decision that still has to be made for uMMORPG. The C# language itself suggests the second approach, so that might be the best decision here.
     
    Last edited: Feb 20, 2017
  33. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    @vis2k so as mentioned I am using the default camera setting which is 40 -80, and I still get the same results using just the default settings. I didn't modify it, so that's what doesn't make sense why it's snapping into top down view on right click. But note it only happens once when I first login to the game.... besides that it's fine there after...

    I have a different issue now, I am able to host my game on my Linux Server, I was able to load the WebGL client and Login no problem. Although upon Login I get the following Error: IndexOutOfRangeException: ReadString() too long: 38269. It seems Click to Move and WASD Movement becomes disabled due to this error. Any ideas? It's happing in the WebGL Build, not in my Unity Editor. Oddly enough I can rotate the camera around, and open all other UI windows, just can't move... totally stuck... :(
     
  34. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, I reported that bug an enternity ago: https://issuetracker.unity3d.com/is...lash-readbytes-out-of-range-errors-in-clients
    Follow the link from the top comment there to see my in depth explanation. In short, there's an error in your OnSerialize/OnDeserialize code but UNET doesn't want to tell you that.

    Maybe also tell the UNET devs to fix that bug, but don't get your hopes up.
     
  35. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    @vis2k i mean a particle fx while casting so you can see that you are charging up something :)
    I believe the combat needs some love as well, or I just look into a way for when the damage apply because when you play an attack animation it looks kinda strange that you deal damage when you return to idle after the whole attack animation have been played :)
     
  36. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    i knew it. but thank you waiting for the update on the Asset store.
     
    mischa2k likes this.
  37. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    So is there no work around for this bug? It just appears and disappears at random... o_O
     
  38. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    @vis2k Could you reply for my previous question? How to change tooltip position to display under the cursor? I tried in UIShowTooltip but not always working right.
    void CreateToolTip()
    Code (CSharp):
    1. // instantiate
    2.         var tooltipPos = new Vector3(transform.position.x, transform.position.y - 32, transform.position.z);
    3.         current = (GameObject)Instantiate(tooltipPrefab, tooltipPos, Quaternion.identity);
     
  39. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I think something like
    Code (CSharp):
    1. var screenPoint = Vector3(Input.mousePosition);
    2. screenPoint.z = 1.0f; //distance of the panel from the camera
    3. transform.position = Camera.main.ScreenToWorldPoint(screenPoint);
    I have not tested it, im on my phone!
     
    mischa2k likes this.
  40. barbugamer

    barbugamer

    Joined:
    Nov 26, 2016
    Posts:
    38
    can i add bots to this game? i want bot players that can be moving in the map and killling each other.
     
  41. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    I can't figure out how to put a dpad on the game because I can't play it smoothly on my device.
     
  42. johnny9511

    johnny9511

    Joined:
    Dec 7, 2016
    Posts:
    3
    Am I understanding this right If we want to implement a jump function it will break navigation
     
  43. jria

    jria

    Joined:
    Feb 15, 2017
    Posts:
    59
    Can you give me some hints on how can I implement party system? I really need it for my project. Thank you.
     
  44. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    I have noticed it occurs more often when there is a linux build for the server and a windows client. If you encounter the bug, just rebuild it until it works.
     
  45. Queen_Harley

    Queen_Harley

    Joined:
    Feb 10, 2017
    Posts:
    12
    How to enable Camera Zoom in and Zoom out in mobile?
     
  46. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Use the thread search tool, way back someone made a party button Not sure if it works but I think so.
     
  47. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Good morning everyone! I got my SSL certificate for the forum, so it will be ready to launch any time soon.

    I am still playing around with that damage popup time idea. There are several ways to do it, I couldn't decide yet.

    Read the forum link that I posted in the bug report's comments to understand why it happens. You won't see that bug in a clean uMMORPG download ever, so it can be avoided if you are really careful with OnSerialize/OnDeserialize.

    There are already monsters, so you could create a Bot class and start with the same code from the monsters, go from there.

    You might also want to wait until the next version, mobile controls are much better there.

    You can add a jump animation without worrying. But if you want to jump down from a mountain then you need real physics, since you can't move somewhere where there is no NavMesh.

    I don't know the perfect solution yet, otherwise I would have added it to uMMORPG already. Still researching.

    Wait for the next version, it will have two finger pinching to zoom, which works pretty nice.
     
    Ronith likes this.
  48. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    127
    @MHolmstrom your solution "destroys" item icons. My solution is working but only when text is short. I think text is a problem when automatically changes tooltip size at the same time changes position (cursor in the middle center). I need display tooltip clear like for example in Morrowind [LINK] under icon/cursor. In uMMORPG doesn't look like it right when tooltip cover item icon :/ So I'm still waiting to hint how to change it.
     
  49. honig

    honig

    Joined:
    Jan 26, 2017
    Posts:
    3
    Whether you use the first or the second example is completely uninteresting both for the compiler and for Unity; Unity does not work with the cs files, but with the resulting dll files. And the compiler is not really interested in your formatting, he's doing his own thing.

    The different formatting at Pascal times (in the year 1971) was created, when the monitors could only represent 25 lines to 80 characters. It was then a matter of whether your methods were 20 or 30 lines long, because at 30 lines you had to scroll -> uncomfortable.
    There was actually no dispute about the legibility, see example picture.
    Pascal.png
    Today it is just a matter of taste

    ---------------------

    Readability and the monster class ;-)

    If you are already making your asset more readable, I would like to return to your giant file. I do not quite understand why you do not want to make them more readable.
    You are using a file, Player.cs, 2000 lines. Chaotic, imho.
    I use six files, the names should speak for themselves:
    Player.cs, 700 lines.
    Player_Client.cs, 300 lines.
    Player_Command.cs, 800 lines.
    Player_Server.cs, 500 lines.
    Player_Snippets.cs, 300 lines.
    Player_OwnParts.cs, 900 lines.
    Player.cs.png
    For this I use a word, which seems to be unknown in Unity circles, which we had already introduced for Delphi and which we then adopted for C #: partial.
    That's all, but that's clearer.
    If we program in C #, why do not we use C #?

    And, by the way, it's also a very hot tip for anyone to publish additions to your asset; insert here and insert there ... sorry, scrap; just a little logic and partial is better. :)

    Let me say again: it is not about your class player, which is mostly ok, but only around the file.
    And: not a single GetComponent in addition. ;-)

    Best regards.
     
    bartuq likes this.
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress: ran into an issue with the forum name and Unity's terms and conditions. I might need another domain and a new SSL certificate again, so that will push it back a bit further. Murphy's law!

    Yes, my curly brackets problem is 100% about taste.

    Didn't know that C# has partial, thanks for letting me know. Will try and see how it looks, this might be the solution.
     
    Last edited: Feb 21, 2017