Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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,915
    @uberwiggett > There's no silver bullet when it comes to animation, and no generic answer. I strongly believe that each animator should be different, and tailored for your character. It's all explained at https://topdown-engine-docs.moremountains.com/animations.html
    The engine's documentation only covers the specifics of the engine, it isn't meant to teach you how to use Unity's animator, as Unity already has excellent tutorials about it. I assure you the engine is working as intended, and your video proves it. There is absolutely nothing to change in any script, you just have to fine tune your animator. As I said, your transitions aren't set properly. For example, I'm gonna assume you haven't changed the Walking state's transition condition, so it's gonna transition to that if you don't prevent it. Again, if you're not comfortable with an any state pattern (which really is only good for demos), stick to something more traditional :)
     
  2. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    105
    Ok, rather condescending response. You are correct that it wants to go back to the walk animation straight away, so I guess the prevent movement option doesn't work. I also guess that the documentation provided is incorrect. I'll sort out my own solution, thanks.
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @uberwiggett > I'm not sure what is condescending about it. I pointed you at the solution. You just want different transitions, from what I can tell from your video, the current ones are transitioning to Walking (or, I suppose, Idle if you're Idle). If you want your weapon animation to play, you need to change these transitions. It's as simple as that, and I don't know of any other solution. Please let me know what's incorrect in the provided documentation, I'd be happy to update it, but I just checked and it seems to cover all you need to know as far as the engine is concerned.
    And please don't hesitate to use the support email if you still have issues with this!
     
    KeithBrown likes this.
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    Oh and the "prevent movement" option has nothing to do with animation. It just prevents movement, your character won't move while attacking, and that works as intended. Animation is a different thing :)
     
  5. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    105
    so why does it still move and trigger walking state if the prevent movement is selected? The documentation I linked gives explicit instruction on how to add a new animation, but following it doesn't work as the bool gets triggered and instantly overridden by the other triggers. I fiddled with the transition settings and nothing prevented them from overriding the melee attack. So instead I just created a new layer with an avatar mask that now allows me to move and attack whilst doing other allowable activities, because I don't need your template to "teach me unity animation", I just need to not to override the bools.
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @uberwiggett > I'm not sure why you're reacting like this, I'm just trying to help. I'm also not sure what else to add here, the engine works as intended, it updates the boolean, and that's actually all it does. It's normal that Walking remains true. You may want your character to be able to move and shoot, and you're technically still in the Walking state, you're not Idle, but you also get the speed info to specifically test for that if needed by your character.
    And yes, the documentation explains what's specific to the engine when adding an animation, but doesn't indeed explain how to set it up, as that depends on your character, is standard really, and I can't know how you want it set up.
    If you have more questions about this, again, please use the support email, thanks!
     
  7. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @uberwiggett You might want to add more than just "Melee weapon" as a criteria for your animator transition

    I quickly made some tests (and it's not to be taken as reference as it is just a test for a specific animation - a clean controller would involve substates and way more transitions and parameters)

    upload_2018-11-12_9-42-26.png

    Also you can look at the use delay in the melee (and ranged) weapon script. You can add some more animator parameters that will check if the melee can be used again and can be also used as criteria to tell the animator "hey the animation isn't over)

    Also you have to play with the exit times and so on. It's not plug and play but it's honestly easy

    @reuno One thing that could be useful as a feature for a future update is to handle animation events. The manual delays are nice but sometime it might be easier to listen to an animation event to know when whatever setting is finished

    Like animation for Kick1: I'd manually create an animation event that says "KickEnd" at the end of my animation and in TDE I could check a box that listen for that animation event.

    Just an idea :)
     
    uberwiggett and reuno like this.
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Thanks for the extra explanations!
    And you're right about animation events, some people might find them useful. I usually don't use them because they're a huge pain to debug :) I'll see if there's a way to make it work for everyone as an option.
     
    Necka_ likes this.
  9. ZayLong

    ZayLong

    Joined:
    Jun 2, 2013
    Posts:
    33
    @reuno

    Another great asset! Thanks for making it!

    Had two questions. they may have already been answered but I couldn't readily find them in the thread, so apologies in advance.

    1) Can the animator for a weapon be on the character and not the weapon? (i.e. the character has the animation for swinging a sword, or thrusting a spear)
    2) does the movement ability account for Up and down animation ala 2D zelda? or will I have to add this myself?

    Thanks
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @ZayLong > 1. The animator for a weapon is always the character. Then you can also add others (usually the weapon, but it can also be whatever else you want). There's an option for that in the Weapon's inspector.
    2. I don't know what you mean. If you mean the orientation of the character's sprite, this should be handled in the animator.
     
  11. ZayLong

    ZayLong

    Joined:
    Jun 2, 2013
    Posts:
    33

    1) Gotcha, I was initially thrown off because the koala characters sword is animated separately from the character itself
    2) Ok thanks for the clarification, If there was an out of the box solution for this already i didnt want to waste any time.
     
    reuno likes this.
  12. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Hi, is it easy to implement grenades in the 3D version?

    I've searched the documentation but can only find:

    "Collider2D MoreMountains.TopDownEngine.Bomb.DamageAreaCollider
    the collider of the damage area"

    Does this mean its a 2D only feature?

    Generally, are there any major features differences we should know about between 2D and 3D?

    How many 3D AI characters do you think we could handle at any one time? Have you run any testing on that? (Disregarding the resources required to render our specific characters, of course - just speaking from a toolset POV)
     
    Last edited: Nov 14, 2018
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Rich_A > There is no class for grenades right now, but it'd be very easy to do. Basically what you'd need is a new type of projectile, probably physics based, that waits for a while and then activates a DamageArea. You can indeed look at the Bomb class for inspiration.
    There's almost no difference between 2D and 3D, apart from the obvious ones (jump actually moves you higher in 3D, character orientation doesn't work the same, etc). Apart from these I try to keep features 1 to 1.
    As for 3D AIs it's hard to answer that question without more details. It all depends on your target device specs and what your AIs are doing. Chances are visuals will become a bottleneck way before the AI themselves.
     
  14. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Well there's your problem right there - the triggers. The engine is firing too many at the same time. You need to tell it not to.

    I had the same issues with animations when I first started - I'd recommend mapping out your animations and all their transitions on paper FIRST and then building them into the animator. Make sure they are finite...if there's any overlap, then they may not work properly.

    Oh, and don't use the example animators for anything other than a very basic mob - they're really not practical for a player character with complex transitions (no offense reuno! :D)

    EDIT: sorry, one more thing: a lot of the built-in parameters like "walking" or "dashing" are based on the engine's finite state machine. You're either "walking" or you're "dashing" but never both at the same time.

    Custom weapon parameters are independent of the finite state machine -- you can be "walking" or "dashing" and using your "Melee Weapon" at the same time. The animator will run as many animations as it can find where one of those conditions/statements is true, so you have to build transitions where only one condition/statement can be true at a time.

    You'll also need to look at the engine logically. For example: if you're preventing movement while firing then you're setting a multiplier on the characters movement speed of 0. That means you character may still be "walking" or "running" - they're just not moving. There are built-in parameters to track speed across all axises, giving you several options on building out your transitions.
     
    Last edited: Nov 14, 2018
    Stevepunk and uberwiggett like this.
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Boom_Shaka > You're absolutely right, and that's what I've been saying all along :)
     
  16. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    105
    spot on boom, pretty much the answer I was after, I tried looking at the scripts to see where the melee weapon was triggering animations different to the main controller but was coming up short. I was concerned as the documentation doesn't really highlight this, and seems to indicate that you can use the provided animators without modification, which is confusing for new people as parts wont work. I've built a few other animator controllers that are working, but they are certainly not out of the box or noob friendly, the engine is good as it delivers a bunch of integrated parts, but it's neither the best solution nor the most gameplay friendly out there that I have used. Only real benefit is that it does both 2d and 3d natively. I'm putting together a review video that will highlight some of these things and hopefully provide better info for newcomers.
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @uberwiggett > I'm all for positive criticism, but you really are over reacting. Look objectively at my answers. I haven't insulted you, I haven't said anything personal or offensive, I've told you (twice, and from the start) that the issue was in your transitions, and that the "any state" pattern probably wasn't the right choice, which is exactly what @Boom_Shaka is telling you now. That's what your video was showing very clearly.

    As for the documentation, we can of course disagree on what it should cover or not, but saying it doesn't make things clear is unfair. Right from the start (from the Animation section of the documentation) :

    upload_2018-11-14_19-41-37.png

    And later on, on that same page :

    upload_2018-11-14_19-42-9.png

    As usual, I'm open to feedback on how to phrase things differently, or if you think there's a better place where these things should be mentioned.

    I've offered you help here and directly multiple times, you keep refusing it, I'm not sure why you do so, but it's not very constructive. I'd like you to assume positive intent, and read my messages at face value. I'm not implying anything, I'm just trying to help. Or you can make an angry video, of course.
     
    nra likes this.
  18. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Has anyone done tile based movement with the engine? I know traditionally a TDS would be free movement but just wondering if you could do tile based movement with an ability interacting with the Unity Tilemap engine (only allowing an agent to move from one tile to the next).
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @bsimser > I'm pretty sure it could be done!
    It's been requested quite a few times already (it's in the todo list top 10 so far). I'll add your vote to the list.
    If you don't want to wait for it to make it into an upcoming release, creating an ability would absolutely be the way to go.
    I'd start with something similar to the CharacterMovement class in terms of structure. How you handle the interpolation between two tiles is usually the trickiest part. I like having the model follow the actual controller in situations like these (with the controller "teleporting" to perfect tiles positions), but it can be a problem in certain gameplays. I think when I'll have to implement it I'll offer choices to accomodate for the most common use cases.
     
    MudPuppet and OccularMalice like this.
  20. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Sounds great, looking forward to it!
     
    reuno likes this.
  21. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I understand your frustration, but that's not a documentation or engine issue - finite state machines are a game design best practice and the basis of the Unity animator.

    I, too, am new to Unity and would have to suggest spending some time on the official unity tutorials as you navigate this asset. You will see the concepts they discuss applied in a practical setting. When in doubt, review the API Documentation and the (heavily commented) scripts themselves -- they will tell you what's happening under the hood. I've found that to be the most effective strategy for learning both Unity and the engine itself -- and I have two full-time day jobs so I have to work as efficiently as possible.

    EDIT: not trying to dump on you, just trying to help. I've found that a lot of my questions were really questions about Unity and not questions about the engine.
     
    Last edited: Nov 15, 2018
    nra, Stevepunk and uberwiggett like this.
  22. Alienpope

    Alienpope

    Joined:
    Jan 4, 2016
    Posts:
    20
    Hi!
    I've had a lot of fun using your engine. I've also been using your corgi engine quite a bit and know that features and improvements will be continuously added over time. So... I was just wondering if there's any kind of road-map for new features? If so, where can i find that? If there's one I've probably failed miserably finding it haha. I've already starting extending and adding to the AI system for friendly AI. Since our game will have a lot of those of various shapes and forms. So i guess i am mostly interested in future plans for that ^^
     
    reuno likes this.
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Alienpope > There is a roadmap, but it's not public, so it's really hard to find :)
    The reason for that comes from the Corgi Engine, which has the same system as, back when the roadmap was public, people would buy it for stuff that wasn't there yet, and then they would complain that these things weren't coming fast enough. Haven't had that problem since it's private :)
    But don't hesitate to drop me a line if you want to know the status of a specific feature, or if you have suggestions!
     
  24. Alienpope

    Alienpope

    Joined:
    Jan 4, 2016
    Posts:
    20
    Haha alright. I gotcha. People are really hard to please sometimes. I'll just be pleasantly surprised when features drop then :) And yes! I'll make sure to drop you a line if i got an idea for a feature! Though, I might just make it myself when I come up with an idea :p
     
    Stevepunk and reuno like this.
  25. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    I do love when Corgi Engine had a public roadmap, but I understand the @reuno 's point on this topic.
    Whenever it is, I'm sure is plenty of nice features to come.
     
  26. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    98
    How difficult would it be to integrate with photon? Seems like a simple version of a Diablo type ARPG could be feasible?
     
    Koodetat likes this.
  27. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hello :)

    great job Sir !!

    i m not sure, there is dungeon generator ?

    Regards,

    T.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @tequyla > No, there's not (yet).
    @sarynth > How difficult something would be really depends on your own skills, so it's hard to answer that kind of question. I'd say it'd be fairly easy for any network programmer. If you're more of an artist, this will be harder. In any case, the engine won't get in your way, and it's entirely doable.
    @Muppo > A lot of them.
     
  29. lobsterhat

    lobsterhat

    Joined:
    Jan 26, 2014
    Posts:
    14
    Is the LevelManager extendable? I'm messing around using the 2D minimum scene and when I create my own manager which extends the original LevelManager, I'm seeing when objects (like CinemachineCameraController) reference an instance of the manager, all the params are null.
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @lobsterhat > Yes, of course, all classes are extendable. The documentation even includes an example of that : https://topdown-engine-docs.moremountains.com/managers.html#extending-a-manager
    It's the GameManager in this example but it'd be exactly the same for the LevelManager.
    Hard to tell what you're doing wrong without details here, maybe you left the old instance in the level? If the problem persists don't hesitate to use the support email and provide more details!
     
  31. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    105
    Cheers Boom, I'm not new to unity or the animator though, I knew what the issue was with it but I was having a hard time navigating the documentation because it's presented in a way different to what was advertised, and is misleading. I wanted to ask the dev to better explain it in a more tutorial fashion as I believe that would provide a better resource for the customers, but they seem more inclined to pass it off onto unity instead, which I don't think is a good choice. I've already made a big video on it to say what I have to say about it and Unity so I can leave it at that, and I will get back to making my project that has game feel at its core.
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @uberwiggett > Just like every requests, if more people ask for it, I'll consider it, it's as simple as that. The animation system in the TopDown Engine (and its documentation) is pretty much the same as in the Corgi Engine, and over the last 4 years there haven't been many requests for more in depth explanations about this specific topic. But you've made your point many times now, and it's been duly noted. And just like everybody else, you can simply ask for something, a feature or more info on something, and I'll add it to the list.
     
  33. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @uberwiggett If you would have spend the same time making that video as exploring Top-Down engine workflow you'd have never posted the question in the first place.
     
    NAiLz likes this.
  34. lobsterhat

    lobsterhat

    Joined:
    Jan 26, 2014
    Posts:
    14
    Thanks for the response. A reboot of Unity cleared everything up!
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @lobsterhat > I'm glad it's working now, let me know if you have other questions!
     
  36. uberwiggett

    uberwiggett

    Joined:
    Jun 26, 2015
    Posts:
    105
    @Necka_ yeah sure mate.

    Edit: btw what you wrote is actually the opposite of what you meant, but I will let it slide as you were originally polite and I appreciate the advice you gave. I've prepared 3 beginner tutorial videos for others who might also be confused by the documentation, I will upload them in a few weeks after I move in to my new house.
     
    Last edited: Nov 19, 2018
    izam likes this.
  37. Smileypop

    Smileypop

    Joined:
    Jan 15, 2015
    Posts:
    3
    I would also like to request that the character moves in the direction of a click/tap, and stops moving on click/tap release. Similar to the way Hole.io works.



    I am working on a mobile game that should move character continuously in the direction of tap and hold, and stop moving on tap release. The Demo scene moves the character towards the click location, then stops the character at that location. Instead, I want the character to move continuously in a direction, but not stop at a point. The camera should follow the player forever in an endless line. Could you please add this feature?

    Thanks
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Smileypop > I've added your vote for this feature. In the meantime you can look at the MinimalPathfinding3D demo scene for inspiration if you want to implement it yourself, it's pretty similar. As for hole.io, I may be wrong but I think they just put a giant, invisible joystick on top of the whole screen, so it feels like you're tapping to move somewhere but you're just moving a joystick. There doesn't seem to be any pathfinding involved, it's quite basic. At least that's probably how I'd do it.
     
    Smileypop likes this.
  39. jolijar

    jolijar

    Joined:
    Dec 9, 2013
    Posts:
    8
    Purchased it this weekend. Looks great so far. Is the planned feature list available somewhere?
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jolijar > As I wrote a few posts ago : There is a roadmap, but it's not public, so it's really hard to find :)
    The reason for that comes from the Corgi Engine, which has the same system as, back when the roadmap was public, people would buy it for stuff that wasn't there yet, and then they would complain that these things weren't coming fast enough. Haven't had that problem since it's private :)
    But don't hesitate to drop me a line if you want to know the status of a specific feature, or if you have suggestions!
     
  41. jolijar

    jolijar

    Joined:
    Dec 9, 2013
    Posts:
    8
    Makes sense, I think the features I would like most would be a dialog system and a minimap. Also I think the functionality is already there, but having an NES zelda style combat demo might really help your sales. (if you want I can do a simple art pack you can use if that motivates you)
     
    reuno likes this.
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jolijar > Indeed, it's already technically possible without adding a single line of code, but having an example of that has already been heavily requested, so it's on my todo list. I'll add your vote to that!
     
  43. izam

    izam

    Joined:
    Nov 14, 2017
    Posts:
    16
    Thank you. I very much look forward to your video tutorials. I also share your sentiments on what is going on on your side.
     
    uberwiggett likes this.
  44. Smileypop

    Smileypop

    Joined:
    Jan 15, 2015
    Posts:
    3
    Thank you for the suggestion. I will try it. Currently, the joystick knob must be pressed, then dragged to trigger movement. I will see if I can edit it to accept a tap without drag.

    If you could add this ability to the engine or Nice Touch in the future, you would probably come up with a more elegant solution than I. Thank you for adding it to the vote list.
     
  45. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I saw the reply to this post in the Corgi thread, so I'm submitting it as an official feature request here:

    https://imgur.com/TfDT1SD

    One-way level mode please. Can already see a Double Dragon clone!
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    MudPuppet and Boom_Shaka like this.
  47. jolijar

    jolijar

    Joined:
    Dec 9, 2013
    Posts:
    8
    I am having a little trouble with the animator. I have my animations setup with a blend tree using xSpeed, ySpeed, and Idle but it doesn't seem to trigger. The documentation said that those values were already in the engine. Is there some way to initialize them or am I doing this completely wrong? Basically trying to have a different animation for when the character is in motion in each direction and then return to idle when not moving. Thanks. Capture.PNG
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @jolijar > They should indeed work by default. Just tested on the Koala character in the Koala2D demo, and everything works fine :
    upload_2018-11-22_8-2-57.png

    Things seem fine on your screenshot, but maybe you didn't bind your animator to your Character component as explained in the documentation? That's the main reason I can think of why parameters wouldn't update. If that's not it, maybe compare with the demo characters for differences, and if that doesn't cut it send me more details on the support email and we'll figure it out :)
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    I've made good progress on the next major update of the engine!

    A taste of things to come :
     
    mccann, eboxrocks, HeadClot88 and 6 others like this.
  50. jolijar

    jolijar

    Joined:
    Dec 9, 2013
    Posts:
    8
    I got the animator working now thanks for the help. I rebound it and it started working. Looks great!