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. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Heyo, looking at your engine to create a local multiplayer game. Is everything setup in a way where this would be a relatively painless transition?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @DespairBear > There is no proper demo of it right now, but technically all the bricks are there, it's just lacking an example of it.
    It's very high on the todo list and should make it in the next release if all goes according to plan.
     
  3. lo-94

    lo-94

    Joined:
    Nov 1, 2013
    Posts:
    282
    Awesome, any ETA on the next release?
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  5. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Upon purchasing and downloading, not much worked. I followed the documentation and eventually got it working. One thing I noticed in the videos is that there is a stutter when sliding down a ramp. Upon playing the provided demos this is still present (but only if you are not moving into the slope when falling which eliminates the effect).

    I have recorded a video of the effect. 2 times I slide down whilst pressing W to move back towards the slope which you can see removes the stutter and also slows the slide. The rest of the time the stutter is quite noticeable.

    The demo's were running at ~200fps while the video was recorded at 60fps.


    Now that I watch the video again there also seems to be some jitter in regular movement as well; it is not smooth. However, this is not as noticeable as when sliding down a slope (and not holding a direction into the slope).

    The asset is running with default settings as per the external download that was required for the asset to work properly: https://topdown-engine.moremountain...n-engine/settings/topdown-engine-settings.zip
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cereal_Killa > What your video shows is not stuttering, it's physics. That may not be the behaviour you expect, in which case it'd require a separate implementation. But that's the expected behaviour.
    I'm not aware of any jitter in the engine's movements. If you think you've found some, please use the support email to report it, and provide the requested info, thanks. Without data it's hard to work.
    Note that Unity is famous for editor stutter (it's well documented, a simple Google search will give you more info about this). You may want to do proper tests and collect actual data, recording a video in editor is probably not the best way to do so :) I'd recommend profiling actual builds to get actionnable data instead. If you do find something, again, drop me a line, I'll be happy to look at it.
     
  7. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    I thought this engine was a custom movement solution (using raycasts like the corgi engine), rather than simply using standard unity physics. Perhaps that's my fault for making the assumption, but I do believe you stated the character rigidbody was only used to push objects around. Perhaps my misunderstanding of how the Top Down Engine works?

    [EDIT: I played around with settings. As moving more slowly seemed to fix it I changed sliding speed to 10 (from 15) which fixed the problem. I also set sliding speed control to 0 to disable the ability to adjust speed by the player, and left sliding direction control at 1 (though will probably reduce later).

    So the first problem is resolved but now there is a new problem: when the character is at the bottom of the 50 degree slope in the Minimal Sandbox 3D level if they move diagonally towards the slope they can actually move up it then slide down again (perhaps something to do with the physics you mentioned?) this does still cause a significant jitter (moreso than in the first example). However, this only happens when moving diagonally, not when trying to move straight up the slope.

    See below]
     
    Last edited: Apr 10, 2019
  8. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Overall, happy with the asset. It's not as mechanically polished as the games that seem to have inspired some of the demo scenes such as Enter the Gungeon, but it provides a decent base to be extended and modified for the same result.

    A few roadmap questions: (not necessarily requests)
    Weapon attachment slots/hardpoints?
    Item combination? (select 2 items in inventory then click button to combine)
    Weapon/ammo crafting/quality/repair?
    Melee aiming? (crosshairs disappear with sword equipped - most annoying on koala which can only attack diagonally down)
    Multiple Transition conditions (AND)
    eg. Target in Radius AND own HP > 50% = proceed to Aim.
    upload_2019-4-10_23-58-55.png

    The ability to use the selector upload_2019-4-11_0-2-55.png to choose the desired condition/action as dragging and rearranging components becomes cumbersome with complex AI (you don't seem to be able to scroll the inspector whilst dragging a component either) - this is probably the largest annoyance. If there is an easier way than dragging and dropping by shuffling components around the inspector please let me know!

    With a small amount of behaviours and transitions it's manageable.
    upload_2019-4-11_0-8-54.png

    But with many transitions/states it becomes impossible to drag/scroll within the inspector.
    upload_2019-4-11_0-15-33.png

    Would be happy for porting of Corgi features or anything you see as urgent to take priority over any of the above if they are planned at all.

    Cheers
     

    Attached Files:

    Last edited: Apr 10, 2019
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Cereal_Killa > I never said standard Unity physics, not sure where this comes from :) And again, if you think you've found a bug, please use the support contact form to report it, thanks. And if you move diagonally up a slope, you change the angle. The angle is relative to the character's direction, not absolute. Same way most people climb mountains, not in a straight line.
    As for the features, most of these are already on the todo list, yes (except the ones unrelated to top down games). Regarding the AI inspector, I guess splitting all these conditions in more than one state would be the way to go, I've never seen an AI tree with that many conditions in a single state, looks like a design issue at this point :)

    Edit : to elaborate a bit more about each request :
    Weapon attachment slots/hardpoints? > love the idea, kinda specific I guess? Not sure how to offer that in a generic way
    Item combination? (select 2 items in inventory then click button to combine) > I don't think that's to be expected from a top down solution :) Could be a feature for the Inventory Engine maybe (which already supports that, in a way).
    Weapon/ammo crafting/quality/repair? > Same thing.
    Melee aiming? (crosshairs disappear with sword equipped - most annoying on koala which can only attack diagonally down) > Yes
    Multiple Transition conditions (AND) > I'd recommend solving that at the design level. The AI system right now is based on a behaviour tree pattern. AND is just a state in that context. Or you could create new specific conditions if that really doesn't work, but I've never seen such a use case. Feel free to drop me a line if you ever run into such a situation.

    Thanks for the suggestions! I really try to prioritize stuff that is common to most top down games. Not saying crafting for example can't be found in a top down game, of course, just that it's not a universal feature in these, and it's quite easy to set it up on the side without having to interfere with the engine.
     
    Last edited: Apr 11, 2019
    Stevepunk likes this.
  10. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    That makes sense. As for solutions, Corgi has a one way platform. If this was ever implemented for TopDown then we could just slap a one way platform in front of the 50 degree slope to remove the jittery behaviour (blocks the character moving up but lets them move down). Not sure if that is possible currently in TD Engine or not.
     
    reuno likes this.
  11. Mekrou

    Mekrou

    Joined:
    Apr 4, 2019
    Posts:
    7
    I need help implementing 4-way directional movement animations, but I have no clue how to do it while working with the engine. I'm new to coding so I'm not very experienced, but I need a parameter for registering what direction the character is facing so a specific animation is playing. For example, if the character is facing right and not moving, play the IdleRight animation. It could also be the character is facing left and is walking, play the walking left animation. I have Idle animations for every direction, along with walking and running animations as well. I have read over the documentation on how to add parameters, but how do the parameters actually work with the movement script? How do I make them work well with it? I'm following a tutorial for the exact movement I want but the animations rely on specific things that are not in the engine. Can anyone help me/point me in the direction on what to do? I'm DESPERATE. This is the tutorial I'm following for context:

    EDIT: Also, do any of the other scripts rely on the normal character movement script? Because if not I might just use my own, but I want to be able to use all of the preset abilities. Thanks for taking your time to read this :)
     
    Last edited: Apr 12, 2019
  12. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    As per the tutorial if you move left/right it changes the value of MoveX which is used to set the correct animation.
    Each animation is a blue dot in the blend tree "minimap". The blue dots are at different X/Y values.
    When the player inputs "Left" to move left, the code sets MoveX to -1.
    The blend tree looks at the blue dot closest to -1 and plays the corresponding animation.

    I hope that makes sense; it seems to be all explained in the video you linked.

    Once I've modeled a few characters and created animations I'll set up a proper blend tree for strafing (the current one in engine always runs forwards). I'll upload it somewhere if you like.
     
    uberwiggett and reuno like this.
  13. Mekrou

    Mekrou

    Joined:
    Apr 4, 2019
    Posts:
    7
    If you could do that it would be a life saver, I've been trying to get this to work for days and maybe that's embarrassing but again, I'm desperate. My problem is how would I do the whole moveX thing with this engine? Like it needs certain things for the animations to work that are in his own movement script, that the engine's movement script doesn't have. Do I literally just add the parameter moveX and moveY into the engine movement script and that's it? I'm seriously confused, lol.
     
  14. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    FacingDirections is an ENUM in the character class - you can probably grab it from there and pass to your animator as an integer. Search for Unity enum tutorials online for help with that part.
     
    reuno likes this.
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Mekrou > An example of this is in the works and should make it in a future update. That said, it's of course entirely doable right now. Follow the advice already given to you right here, it's exactly how it should be done.
     
  16. Mekrou

    Mekrou

    Joined:
    Apr 4, 2019
    Posts:
    7
    Could you elaborate on the passing it into the animator as an integer part? Like do I just add it as an integer in the parameters of the animator? Do the directions already have a value assigned to them or do I have to assign them?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Mekrou > Directions are an enum, you can simply cast them as an int. Or you could decide on your own convention.
     
    Boom_Shaka likes this.
  18. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    239
  19. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    21
    Hey @reuno!

    I was just wondering if you're planning to add a block/shield mechanic into the engine?

    Cheers!
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @MilziPPG > Absolutely, it's high on the todo list already :)
     
    MilziPPG likes this.
  21. VENOMOUS09

    VENOMOUS09

    Joined:
    Dec 27, 2014
    Posts:
    37
    wheres the char selection screen ? please add one
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @VENOMOUS09 > There isn't one for now. It's been requested many times, I'll add your vote to it.
    Please try to use the contact form for suggestions as recommended, makes keeping count so much easier.
     
  23. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    21
    Awesome! Thanks man, really looking forward to the next update :)
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @MilziPPG > Just to be clear, it's high on the todo list but not "next update" high.
     
  25. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    21
    Sorry Reuno, I didn't mean it to sound like I was pushing for you to have it in the next release! It's just always a pleasure seeing your latest release.

    Having said that, I was wondering if anyone has had any issues with the particle system, specifically the Walk Particles under Walk Feedback in the Character Movement component of the Koala character. If you try and change the particle system or delete it, it will keep playing the original walk particles infinitely. I can't really turn them off. Not sure what's happening there!
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @MilziPPG > Please use the support contact form if you think you've found a bug, thanks. I'm not aware of any bug with the walk feedback (and don't reproduce it), but I'll be happy to take a look if you provide some explanation on how to reproduce it.
     
  27. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    166
    I'm not sure why they suggest to do it that way. It seems strange to me. However, I see your problem. I just bought the asset today, and I wanted to use 8 directional animations while moving/aiming in a dual-stick fashion. My solution was to create a blend tree with 2D freeform cartesian movement. I created two floats in the animator's parameters, representing horizontal and vertical movement. I modified and added the following code to UpdateAnimator() at the bottom of the CharacterMovement.cs script:

    Code (CSharp):
    1.         private Vector3 relative_direction;
    2.  
    3.         public override void UpdateAnimator()
    4.         {
    5.  
    6.             MMAnimator.UpdateAnimatorFloat(_animator, "Speed", Mathf.Abs(_controller.CurrentMovement.magnitude), _character._animatorParameters);
    7.             MMAnimator.UpdateAnimatorBool(_animator, "Walking", (_movement.CurrentState == CharacterStates.MovementStates.Walking));
    8.             MMAnimator.UpdateAnimatorBool(_animator, "Idle", (_movement.CurrentState == CharacterStates.MovementStates.Idle));
    9.             if (_currentInput.magnitude > 0.02f)
    10.                 relative_direction = _animator.gameObject.transform.InverseTransformDirection(_currentInput.x, 0f, _currentInput.y);
    11.             else relative_direction = new Vector2(0f, 0f);
    12.             MMAnimator.UpdateAnimatorFloat(_animator, "horizontal", relative_direction.x);
    13.             MMAnimator.UpdateAnimatorFloat(_animator, "vertical", relative_direction.z);
    14.         }
    15.  
    Also, I don't see the point of the MMAnimator.cs script either. It seems to obfuscate the functionality of the code with things Unity already does.

    Besides these nitpicks, the asset seems like a good purchase for me. I hope it saves me a lot of time.
     
    uberwiggett, Necka_ and Boom_Shaka like this.
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Tarball > Thanks for sharing your solution!
    I've recently added native support for directional animations in the engine, along with an example of that, so starting with the next version this won't require any coding.
    As for the MMAnimator class, as explained in the documentation (or in the class itself), they're simply a wrapper to make sure (when called appropriately of course) that the parameters do indeed exist in the animator, mostly to avoid errors when a parameter is not present in the parameter list. Feel free not to use it, it's just a wrapper.
     
  29. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hi, thanks for that, I actually started yesterday to work on a 8 way blend tree and I was going a bit crazy with the direction issue.

    Would you mind sharing a screenshot of your animator as an example here? I was wondering if I should create different blend trees based on an animator paramter such as "current direction" or if something else is possible and apparently that's what you just shared
     
  30. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
    Hey! Is it multiplayer-friendly? If I want to integrate UNET/Mirror networking?
    I already tried another top down shooter solution and it appeared not suitable for multiplayer because of a messy code.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @hottabych > I like to think my code isn't messy, but I guess it's a subjective opinion.
    The asset is already local multiplayer friendly (and the next update brings an advanced example of that), and I don't see why it wouldn't work via Unet or Mirror, but sure there'll be some refactoring needed.
     
  32. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    To vouch for the asset: I'm not a coder (or let say, I'm very beginner) and extending TDE was a piece of cake as it's so freaking well organized and commented. I tried to modify many other assets on the store, most of them I didn't get what was going on. Here, it's really clean.
     
    hottabych and reuno like this.
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I vouch for it, too. It's good code. And since all methods are virtual, it's easy to add/customize functionality with subclasses so you don't have to directly modify any TDE code. It took me about 15 minutes to write some subclasses to get local multiplayer working with version 1.0.
     
    reuno likes this.
  34. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    166
    Sure, here is a screenshot:
    blendtree.png

    I did it this way, because I had 8 different animations for movement. If you had 4, the diagonals would blend automatically, if you set it up the same way. I hope that makes sense.
     
    Boom_Shaka and reuno like this.
  35. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Ok, just tested (also I think we use the same animation pack) and it works like a charm, I was thinking of some super complex system while... well that just made it with your few lines of code

    I had a 2D directional instead of Cartesian where I was using the x/z speeds, with a 16 direction blend tree (8 for walking 8 for running)

    I believe I will make a "master" blend-tree with a condition on the Running bool going either to the Walking or Running blend tree... I hope it make sense and will work (and blend) properly.
    But for the walking part, it's just perfect.
    It's not for a twin stick shooter, but the player have a rifle tool to craft/plant/dig stuff and while using that tool it uses the mouse cursor to aim and rotate the player around... so I needed the strafing movements for this.

    Thanks again for sharing!
     
  36. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    166
    Depending on how you want your controls to function, you might be able to do this from the same single blend tree. Instead of 0.5s, change them all to 0.4 for walk. Then, add 8 more identical entries, except use 0.8 where the 0.5s are. These are your runs. In this way, your stick sensitivity determines how fast you move, rather than an extra button/boolean.

    I think I may do it this way, but instead of using different animations for the 0.8s, I'll double time from 1 to 2 for each one. This will just make the animation play twice as fast.

    Now, if I could just figure out how to include root motion, without messing up all of the cinemachine stuff, that would be awesome. Also, it's not very clear to me how the weapon combo system is set up. I have coded something similar in the past, so I mean I get how it works, but what is "delay before use" and "time between uses," and how do they interact with the combo script? I didn't see these explained in the docs and when I open MeleeWeapon.cs, I don't see either one anywhere. @reuno You mentioned earlier in the thread that there is a tutorial video exactly for this, but I can't find it anywhere. Could you please give me a link?

    I can't wait to start on the AI. The behavior system looks incredible and worth the price of this asset alone.
     
    reuno likes this.
  37. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Ah no it won't work in my case as I'm primarly focusing on Desktop build with Keyboard/Mouse controls, so there is no sensitivity for that case
    MeleeWeapon is derived from the Weapon class, you'll find all the stuff there (ProjectileWeapon is also a derived)

    Delay/Time between and before use are quite straight-forward and also easy to extend with your own logic

    For RootMotion, I checked and I think my skills are too limited for that... Honestly if you build something up around that feature and willing to share, tag me up!

    For combo there is no video tutorial that I'm aware off (Could have missed it though) but it's in the demo scene, I think it's in MinimalSword3D scene.

    Basically you put multiple weapon components on your game object and have on top of that the combo component that dictate how it works out

    Then you can tweak how it works out, I personally prefer to work with Animation events to trigger stuff (instead of timing the actual attack animation), but again it's quite easy to extend with your own logic

    Hope that helped
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Tarball > If I mentioned a video I was mistaken, I haven't finished recording them (but spoiler, it's in progress, and coming soon!) That said there's a complete documentation on the documentation website dedicated to creating weapons, and the step by step example there is about melee weapons specifically.
    You can also (while waiting for the real deal) watch the Corgi Engine video tutorial on youtube, it's pretty close in terms of core concepts (with a few twists).
     
    Necka_ likes this.
  39. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    177
    Full Gamepad support?
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @maxaud > Gamepad is already supported by Unity, that's native. So yes, of course :)
     
  41. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    177
    Maybe I wasn't specific enough with my question. So the UI for inventory works out of the box with a gamepad? I'm deploying to a device that has no mouse or keyboard and would like to know if I'm going to need to make modifications to that part of the code to get it to work.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @maxaud > Yes, the inventory works just fine with a gamepad as well.
     
    maxaud likes this.
  43. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    177
    Thanks for your response.

    I read through some of the documentation and downloaded the PC build. Thanks for making that available.

    A couple more questions I have:
    1) Is dual wielding two weapons at once an option?
    2) None of the demo scenes show multiplayer but the documentation talks about different PlayerIDs. I'm assuming its set up for the most part for the capability to have multiple players?
    3) Is the projectile weapon capable of a time based physics based weapon like a grenade throw with a delayed explosion?
    4) My current character in my game is a rigidbody and I have the movement down to how I like it, am I able to still control my character with my current setup but use the weapon system of the topdown engine?
    5) The weapon pushback, is this physics forces or ?
    6) Can the enemies use the same configured weapons that I have set up for my player?
    7) Any known issues for use with VR?

    Thank you for your time.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @maxaud >
    1) Sure.
    2) There's no multiplayer demo right now, but it's already entirely doable. The next update will bring an actual, "advanced", 4 player example.
    3) You can create whatever projectiles you want.
    4) No. The engine is mostly a controller, so I wouldn't recommend buying another one if you like the one you have.
    5) Depends on how you do it.
    6) Yes
    7) You mean issues with using the controller in a VR environment? I can't see how that could cause any issue. Never tried it myself though.
     
    digiross and maxaud like this.
  45. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    177
    I would be buying the engine mostly for the weapon system, inventory, and AI. Are these components modular enough to adapt to a different controller? My controller is a very simple rigidbody with moveposition and moverotation for controlling movement. Or maybe I could use the built in controller and adapt it to match?

    I can’t find another asset that offers similar options for weapons and ties with an inventory system easily.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @maxaud > It's certainly possible to adapt everything. It'll imply refactoring.
    I can't really answer whether or not components are modular enough, that's quite subjective :)
    The engine is built in a way that controllers can be added, for sure (it already contains two actually), but I wouldn't recommend doing that to someone that is not quite confident with C#.
     
  47. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hi there, I have both Corgi and TopDown, great engines :D Engines are amazing, but it looks like if the AI system is a bit too bloated for large projects, a virtual tool would be very useful. Does the TDE integrate well with Behavior Trees ? I am thinking of combining it with TDE.
     
    Last edited: Apr 28, 2019
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @SpyrosUn > That's not something that is built-in if that's your question. I've never tried Behavior Trees so I wouldn't know about that.
     
  49. RED-92

    RED-92

    Joined:
    Mar 11, 2019
    Posts:
    1
    Hey, I have an issue using TopDown engine where a Player character dies they are not re-assigned their Initial weapon (It doesn't appear under the WeaponsAttachment under the character and therefore it can't be used) The character and weapon were created following the example of MinimalSword3D.
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    RED-92 likes this.