Search Unity

[RELEASED] TopDown Engine by More Mountains [new v3.0 : damage types, damage resistance, and more!]

Discussion in 'Assets and Asset Store' started by reuno, Oct 9, 2018.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @khrysller > If you think you've found bugs, please use the support form to report them, thanks!
    And I'll also need a bit more info :
    What version of the asset? What version of Unity? "If you use the ability" > what ability exactly? What teleporter? What else did you do?

    And no, there is no script to pick objects with the mouse, but there is an open and documentated API to interact with inventories, that will let you implement that easily.
     
    khrysller likes this.
  2. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    46
    I wasn't sure where to look for this in the documentation. I'm not sure how to use textmesh pro as it seems that any TMP world object I make gets obscured by the level no matter what I seem to fiddle with. All the example text world objects seem to user the standard text and when I try to use those as a basis and replace the basic text component with TMP, the text becomes obscured again. I'm using the Minimal2D as a basis btw.
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nichjaim > How weapon aim works is described in the Weapons section of the documentation.
    As for your TMP issue, I don't know why that would be, I'd recommend contact Unity if you run into bugs with their components. I don't use TMP myself, it's super buggy.
     
  4. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    46
    Does the topdown engine include damage popup text indicators (like the text that pops up when something takes a hit to denote exactly how much damage was just done). Not a big deal if it doesn't just thought I'd ask if it was built in before I tried making my own.
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nichjaim > No, it doesn't at the moment, but it's high on my todo list, it's been heavily requested.
     
    nichjaim likes this.
  6. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    23
    Hi, just bought the asset. Does the asset support picking up items and throwing them? (Like picking up and throwing pots as in Zelda LttP?)
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @shanemt > No, right now it doesn't.
    When wondering if something is or isn't in the engine, a good way to know is to check the list of features at https://topdown-engine.moremountains.com/
    If it's not listed, it's not in the engine. Feel free to submit requests via the support form though!
     
  8. M0ti

    M0ti

    Joined:
    May 4, 2019
    Posts:
    14
    Hey everyone, any tip on how to make a shop system with harmony with the existing inventory classes in the engine?
    I figured out how to do Sell.
    You get to a shopkeeper and it opens the player's inventory. But now the use button does sell instead.
    (I've added SellItem in the "Inventory" class, which removes the item and sent MMInventoryEvent ItemSold)
    Then I've added next to the "Inventory Input Manager" new class "Inventory Context Input Manager" which changes the key mapping based on the context.
    So the shopkeeper only switches the mapping and opens player's inventory.

    But I have no idea how to create Buy section.
    In the best-case scenario it would be non-player inventory, which would pause the game, opens and could be navigated by the same input manager as the players one. From there I could just once again change the mapping and do buy instead of use.
    But so far I have no idea how to implement separated inventory in such a manner. And because the inventory is part of the camera prefab, that would also mean to at the end have who knows how many inventories for different vendors and storage chests throughout the game.
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @M0ti > You might want to ask on the discord channel, I think some people already did that there.
     
  10. M0ti

    M0ti

    Joined:
    May 4, 2019
    Posts:
    14
    @reuno We have a discord channel? I will run there right now!
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @M0ti > Sure, link is on the asset's page.
     
    farazk86 likes this.
  12. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    23
    I can't reference the Cinemachine namespace within any of the scripts from the asset, but I can access the namespace fine from my own scripts. Any idea why this is happening?
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @shanemt > Yes, that's normal.

    You can actually access them from the scripts that are within an assembly definition that contains Cinemachine. That's the case of all the engine's scripts that need to interact with that API. They're all under the aptly named MoreMountains.TopDownEngine.Cinemachine assembly definition. But you can't indeed access them from any other assembly, that's by design.

    In any case, I'd recommend following good practices and extending classes instead of modifying them, that'll also help with that, as you'll be in control of your own assemblies (or lack thereof) and will be able to pick the dependencies you want.
    Alternatively, you can simply modify the engine's assemblies, but it's as unsafe as editing the core classes when it comes to updating.
     
  14. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    23
    @reuno
    Thanks for the quick reply.

    In the case of extending a class, if the thing I want to modify is smack in the middle of a method, and I need access to the base class's private variables, then I can't easily modify the function to accomplish what I want without duplicating the code... For instance, I'm adjusting the behavior of the CharacterMovement script so that 'A' and 'S' circles the target, and 'W' and 'S' moves towards and away from the target.

    Code (CSharp):
    1.             //----------------------------------------------------------------------------------------------------------------------
    2.             // Begin Commented Out
    3.             //_movementVector.x = _lerpedInput.x;
    4.             //_movementVector.y = 0f;
    5.             //_movementVector.z = _lerpedInput.y;
    6.             //----------------------------------------------------------------------------------------------------------------------
    7.             // End Commented Out
    8.  
    9.             //----------------------------------------------------------------------------------------------------------------------
    10.             // Begin Adjustments
    11.             if (string.Equals("Player", this.gameObject.tag))
    12.             {
    13.                 Vector2 mousePos = cam.ScreenToWorldPoint(Input.mousePosition);
    14.                 Vector2 lookDir = (mousePos - new Vector2 { x = transform.position.x, y = transform.position.y }).normalized;
    15.                 Vector2 lookDirOrthogonal = Vector2.Perpendicular(lookDir).normalized * -1;
    16.                 Vector2 movementVector2D = lookDir * _lerpedInput.y + lookDirOrthogonal * _lerpedInput.x;
    17.                 _movementVector.x = movementVector2D.x;
    18.                 _movementVector.y = 0f;
    19.                 _movementVector.z = movementVector2D.y;
    20.             }
    21.             else
    22.             {
    23.                 _movementVector.x = _lerpedInput.x;
    24.                 _movementVector.y = 0f;
    25.                 _movementVector.z = _lerpedInput.y;
    26.             }
    27.  
    28.             //----------------------------------------------------------------------------------------------------------------------
    29.             // End Adjustments
    Any ideas on how I can implement this without essentially duping the code within CharacterMovement?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @shanemt > No, in that case you'd have to duplicate the code indeed.
    Alternatively, you can drop me a line via the support form and I'll be happy to make changes to make your life easier by refactoring on my side or splitting stuff into more easier to extend methods :)
     
  16. shanemt

    shanemt

    Joined:
    Mar 5, 2014
    Posts:
    23
    @reuno Thanks for the offer, I might take you up on that once I figure out what I want to do.
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @shanemt > Please do, I'm always happy to help.
    The only cases where I refuse requests like that are when they really don't make sense for anybody else but the person making the request. But aside from that, it's always great to improve extensibility!
     
  18. khrysller

    khrysller

    Joined:
    Mar 14, 2019
    Posts:
    125
    I am having a hard time trying to get the most FPS as possible. I build only the Minimal3D scene and with only the ground and the character it goes around 30 fps with the fastest quality option



    But I was building the game without the engine and got 60 fps with all the environment placed. If I place all the environment it goes between 18 and 21.

    I tried to disable all the things I could do to speed up but no matter what I do I am not able to get more FPS.

    I just wanna know if there is something that I could do to, for example, get the 60fps on the example above.

    Thanks
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @khrysller > If you look at the profiler, you'll see that your bottleneck is (very likely) rendering.
    Any regular Unity optimization for mobile tips would apply, there's nothing specific to the engine there really (the engine doesn't do any rendering). My first recommendation would be to unlock FPS, disable post processing (they're the most expensive thing in that scene).
     
    khrysller likes this.
  20. Zetazed

    Zetazed

    Joined:
    May 16, 2019
    Posts:
    6
    hi. in 3d will it be possible to have an npc aim down or up if the player is below or above them? right now i think it is not possible to activate slope aim when in script mode, so while the enemy model is aiming correctly at the player the weapon still shoots straightforward. thx
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Zetazed > That's already doable, aim takes a 3D position as input.
     
  22. Zetazed

    Zetazed

    Joined:
    May 16, 2019
    Posts:
    6
    thanks for the quick reply. is there a specific way i have to setup my enemy first? for example in the loft scene in the first room on the right if i jump on the cupboard the model of the enemy (patrolandshootai) rotates to face me, but the rifle remains straight and that way he cannot hit me. Heres a screenshot: https://imgur.com/a/IAeekm3
    Shouldnt it be the other way around?
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Zetazed > You'd need a custom action to have them shoot vertically, but what I meant is there's nothing preventing that at the moment.
     
  24. Zetazed

    Zetazed

    Joined:
    May 16, 2019
    Posts:
    6
    only my coding skills are in the way :(. any any chance you could implement this in the future?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Zetazed > Sure, I can add that to the todo list :)
     
    MudPuppet likes this.
  26. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    46
    I want to have the animations always play the one associated with the direction the character is aiming (ex. aiming north so always play the north idle and north walk). I used HorizontalDirection and VerticalDirection to get the aim direction and set it up similar to the grasslands demo animations but whenever the character moves it seems to only play the first animation frame, I think it's repeatedly restarting the animation rather than letting it play out and looping it or something. It's cool if you can't really diagnosis with just this info just thought I'd ask as you might have some insight. Also sorry for long question.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nichjaim > I'd recommend reading on how to setup transitions in Unity, if your animation keeps "restarting", then you have a bad animator setup, and your transition is interrupting itself. Hard to tell without more info but I'd guess your "transition to self" settings are wrong. Very likely nothing to do with the engine though, so any generic Unity doc on how to setup animations will likely help :)
     
  28. 3CHO12

    3CHO12

    Joined:
    Apr 4, 2015
    Posts:
    18
    Hi there....is there something I am doing wrong for twin stick....when moving alone/not shooting...character won't default to face/look at move direction.



    Here are my settings on Character and on Weapon...
     

    Attached Files:

  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @3CHO12 > It's very hard to tell what you may be doing wrong from just that video and screenshots.
    I'd suggest comparing with the demo characters (the one in the loft demo for example) for differences.
    If the issue persists please use the support form.
     
    3CHO12 likes this.
  30. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    Is there some easy way to test the mobile controls (or even override them for testing) in the editor? It's hard to use the mouse for mobile testing, unless I'm missing something.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @alanmthomas > You can force one mode or the other via the input manager, as explained in the documentation.
     
  32. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    Thanks. Sorry about that. I'll go through documentation more thoroughly in the future.
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @alanmthomas > Oh don't worry, it's all good :) There's quite a lot to read, it's easy to miss stuff.
     
  34. waxman63

    waxman63

    Joined:
    May 4, 2020
    Posts:
    1
    Both this and Corgi engine seem like a terrific tool for beginner developers like me. I'm a new game art student with limited Unity experience. I think the ability to sort through your demos and source folders provides a tremendous introduction into exactly how an artist new to game dev could go about making a compelling game, so thank you. As an initial exercise I might just limit myself to re-skinning a 2D level and tweak some parameters to suit. But I wasn't completely sure what the appropriate procedure was. Should I maintain existing naming conventions and modify the prefabs within the existing demos frame structure and just save my scene variant alongside the existing scene? Or should I be importing the assets I want from any number of demos into the hierarchy of a 'Minimal2D' scene of my own making, maybe? Any help you can offer to help me get going would be really appreciated.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @waxman63 > Naming conventions have no impact on anything in Unity, they're entirely up to you.
    I wouldn't recommend modifying the prefabs, or the code. It's usually better to make your own, and if you want to modify something, just make a prefab variant. But there are no rules really, and whatever works for you is ok.
    You can learn more about all that in the documentation (this section and others) : https://topdown-engine-docs.moremountains.com/creating-your-own-game.html
     
  36. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    46
    I'm trying to have the player character start with some weapons and ammo but anything I place into the main or weapon inventory's content list gets removed when the scene actually starts. I looked a bit at the inventory documentation but I likely missed something important. I'm using minimal2D as a basis if that matters.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nichjaim > That's normal, you can't just add stuff to the main inventory's content list, it gets built at runtime.
    Instead, you can either create a save file that you load, or a more robust and simple solution would be to create a script that populates your inventory with your settings (that's usually how it's done).
     
    nichjaim likes this.
  38. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    46
    I made a custom health script that inherits your health script and overrides your damage function. I placed it on the object and disabled the original health script that was attached but for some reason the new damage function isn't being called. Is there something I'm doing wrong?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nichjaim > Remove the old one, don't disable it.
     
    nichjaim likes this.
  40. RadTT

    RadTT

    Joined:
    Nov 9, 2016
    Posts:
    7
    Hello!

    I'm trying to get some things working with the CharacterGridMovement class and was hoping you could provide some guidance.

    1. Programmatically move a character 1 block in any direction without any user input. This needs to work for both a Player Character and for an AI Character.
    2. Create a script to cause an AI character to follow the player, one step at a time.

    I was hoping these would be built in features but it doesn't appear to be the case. If that's true, that's ok, I can build it, but could use some guidance.

    I extended CharacterGridMovement and found if I directly alter _horizontalMovement or _verticalMovement during a frame, it'll work for a Player Character who also has an InputManager assigned to it. The problem here is, it doesn't appear to be working for the AI Character. If I switch that AI Character to Player and assign the InputManager to match that player ID, suddenly it just works with no other changes.

    Any thoughts on solving this? Or am I taking the wrong approach to begin with?
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @RadTT > I've added methods to do that to the next release. Don't hesitate to use the support form if you need that urgently.
     
  42. MrMartinlll

    MrMartinlll

    Joined:
    Nov 19, 2016
    Posts:
    3
    Hi Reuno,

    Thanks for an interesting and inspiring engine! A few initial questions/ suggestions:

    1. Maybe you should add an orthographic camera 3D example scene it is a very used perpective. For example I find it a bit tricky to properly set the camera confines; guess I will need a collider2d but can't really get one produced.

    2. Healthbars in 3D have poor orientation. They don't face the camera but just seems to follow the targets rotation. That is almost never what you want in a top down game. Also in game mode the healthbars are spawned at the root of the scene and really clutters the view. Could they be somewhere else? See attached image that illustrates these 2 issues.
     

    Attached Files:

  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @MrMartinlll >
    1. I wouldn't recommend using a confiner2D for a 3D camera. It's technically possible with a weird 2 camera setup, but a regular 3D confiner will work just fine and is probably what you're after. And you can do 3D isometric out of the box, like in the Lof3D scene for example, set camera to isometric, select the whole world, rotate 45°.
    2. The orientation is by design, you can change it, it's purely cosmetic. Healthbars come with quite a lot of options. And they're at the root for performance reasons (ideally all your moving objects should always be at the root to avoid updating all their neighbours when moving). Feel free to change that if you want to prioritize readability over performance. In prefab mode that'll be the default behaviour.
     
  44. Mechanical-Paladin

    Mechanical-Paladin

    Joined:
    Aug 24, 2014
    Posts:
    7
    This issue is still in 1.7.
    Open MiminalGrid3D
    Create a 3D cube and place it to position 0.5, 0.5, 0.5.
    Play in editor, walk into the newly created cube and watch the character get stuck.

    edit: referenced a wrong scene
     
    Last edited: May 17, 2020
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Mechanical-Paladin > I don't believe both issues are related, that person was referring to a grid issue, and there's no grid in MinimalScene3D.
    I tried reproducing the issue you described and couldn't. There are tons of obstacles in the demo scenes, I'd recommend looking at how they're setup for reference. I'm not sure what you could have done for this not to work, maybe a wrong layer? In any case, if the issue persists, don't hesitate to drop me a line via the support form, I'll be happy to help :)
     
  46. Mechanical-Paladin

    Mechanical-Paladin

    Joined:
    Aug 24, 2014
    Posts:
    7
    I'm sorry, I meant MinimalGrid3D. And it was indeed a layer issue. Sorry I wasted your time.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Mechanical-Paladin > This has also been fixed, along with other fixes and improvements to the grid manager. In general if you think you've found bugs, don't hesitate to use the support form to report them, it's easier to deliver fixes if needed that way.
     
  48. MrMartinlll

    MrMartinlll

    Joined:
    Nov 19, 2016
    Posts:
    3
    Hi Reuno,

    Just out of curiosity: Is there any reason you tile the floor in your demos (for example Loft3D) Instead of just having it be one large cube. Does it improve performance to have several small cubes instead?

    Cheers,

    Martin
     
  49. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    i used the support form for this issue but I never received a response. i sent my email around April 5
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ItachiTGM > I answer each and ever request I get from the support form. I tried looking for your message but I can't seem to find one that has wording similar to your message, I'd recommend sending it again.
    @MrMartinlll > No, it doesn't, it's just more modular that way.