Search Unity

[RELEASED] TopDown Engine by More Mountains [new v1.5 : grid movement and new demo]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @MudPuppet > That was discussed in the posts right above yours :) It's on the todo list now.
     
    birdmanscn likes this.
  2. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    138
    Oh cool. Sorry I didn't spot that - I was trying to catch up on a few pages worth of posts in this forum and must have gone right past it.
     
    reuno likes this.
  3. lobsterhat

    lobsterhat

    Joined:
    Jan 26, 2014
    Posts:
    13
    I needed to kill the speed :| Thanks for your help!
     
    reuno likes this.
  4. CoolMambo

    CoolMambo

    Joined:
    May 21, 2013
    Posts:
    19
    I was able to use a simple object pool and timed spawn script to achieve this. I also hacked it to allow for a spawn once scenario if you want it.
     
    reuno likes this.
  5. pabloawara

    pabloawara

    Joined:
    Nov 28, 2018
    Posts:
    10
    Hello, how can I disable the auto-generation character? When I add 3D Cameras, GameManager, SoundManager, BackgroundMusic and other Managers (LevelManager, AchievementsRules, InitialSpawnPoint, Inventories and TimeManager) the engine automaticly generate a character, I copy the managers from Loft3D demo and I don't put a character player on scene but appears on it.
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @awaralabs > No, it doesn't generate a character. As explained in the documentation, the LevelManager is responsible for instancing your character(s), as is good practice. Feel free to get rid of the LevelManager if you prefer doing things like that, but I wouldn't recommend it.
     
  7. pabloawara

    pabloawara

    Joined:
    Nov 28, 2018
    Posts:
    10
    Thanks for your reply and sorry by my confusion ;)
     
    reuno likes this.
  8. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    390
    Hello Reuno,

    I was wondering: is there a way to get/set the buttons set in the input manager at runtime?
    I know this isn't possible with Unity basic input without a custom input manager, but TDE has an input manager. But so far I didn't find anything like what I'm looking for :(

    Example: I have an UI showing "press <Player1_Interact> to pickup this item" where <Player1_Interact> would be replaced by the actual configured key and whatever image I can then set by code.
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Necka_ > There's no example of that but you could probably call a variant of the InitializeButtons method to do so.
     
  10. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    390
    Hmm ok, I'll try to look into that

    Let me then ask a bonus question:

    I saw that Corgi engine was integrated with Rewired. Was it done by you or by the Rewired's dev? what would it take to have an integration with TopDown Engine? Should he contact you based on our request or is there a process usually?

    edit: in case that can't be integrated easily or not on the roadmap, I just saw that rewired has an Unity input override, so I think I can manage my way through that if my idea of an official integration fall flat :)
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Necka_ > No idea, I'm not involved at all when another asset adds support for one of my assets.
    The people who do so do that on their own.
    You'd have to ask them directly.
     
  12. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    111
    HI @reuno I'm having alot of fun with the engine just like the corgi engine :)

    Was wondering if a possible future feature could be a way to lock the player following a set path I'd imagine a spline? kinda like this example in castle of illusion at 2.33

     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Mcg > That's 2.5D platforming on a spline, not sure it'd be the best fit for a top down solution :)
    It's on the Corgi Engine's todo list though.
     
    Boom_Shaka likes this.
  14. pabloawara

    pabloawara

    Joined:
    Nov 28, 2018
    Posts:
    10
    Hello, is there any tutorial to make spells in the weapon system? Or any ideas about it?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @awaralabs > Not really, but I don't think it'd be possible to make a dedicated tutorial for each type of possible weapons, nor is it needed. A fireball spell is just a machine gun that spits bigger bullets and likely doesn't have a gun model, for example. So it's always the same workflow whether you're building a bow, pistol, plasma gun or fireball spell.
     
  16. pabloawara

    pabloawara

    Joined:
    Nov 28, 2018
    Posts:
    10
    Ok, thanks for your help.
     
    reuno likes this.
  17. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Hey everyone!

    Just a question about animations, specifically the melee weapon animations. So, I want to add a boolean parameter in the animator called "HasHitEnemy" or something like that. This will check if an enemy has been hit. If the player swings their weaon and an enemy has been hit, the boolean is true. With this boolean true, and slash1 true, the player will then be able to play slash2 and slash3 if they continue the combo. If the player does not hit an enemy and they keep on using their melee attack, only the animation koala_sword_slash_1 will play.

    I want to do this as I am creating a melee combat system similar to that of Final Fight. For example, if you keep on punching and do not hit an enemy, you do the same punch. If you hit an enemy, you go into a combo and different animations play.

    I've looked at the documentation and I understand that I have to add some parameters in a script (specifically under protect override void InitializeAnimatorParameters() & public override void UpdateAnimator(). My question is, where do I add this boolean, as I am unable to find where the slash1, slash2, and slash3 booleans are. Second of all, let's take "Dashing" as an example -

    Code (CSharp):
    1. MMAnimator.UpdateAnimatorBool(_animator,"Dashing",(_movement.CurrentState == CharacterStates.MovementStates.Dashing),_character._animatorParameters);
    I know I'm supposed to replace _movement.CurrentState == CharacterStates.MovementStates.Dashing with my own parameter, but what would that parameter be?

    Sorry for the long message but if anyone is able to give me a hand, that'd be fantastic!

    Thanks!
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @MilziPPG > That boolean you mention (and the related test) don't exist, and adding them is maybe gonna be a bit more complex than what you describe.
    As for Slash1, Slash2 and Slash3, they don't exist in the engine, but you can define them on each weapon of your combo. Each weapon defines a bunch of animation parameters, for which you're free to pick a unique name (while for pretty much everything else in the engine, the engine decides on the name).
    All that (and all the other specifics of the engine when it comes to animation) are described in details in the animation section of the documentation, you might want to give it a look.
     
  19. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    Sorry, had to try to tackle this one! :cool:

    Use cases:

    idle/no action - weapon should not combo
    1. set DropComboDelay to 0 so that the combo always drops by default

    weapon hit - weapon should combo for X seconds
    1. add an event listener(s) to the player character that manages the DropComboDelay - it will have a reset to 0 after X seconds method and a set to X seconds method
    2. extend health script and add a check to the damage method to see if damage "instigator's" owner is the player character (instigator.owner.tag == "player" ?)
      1. if it is, call both events - set the amount of time you have to complete the combo and start the timer to reset it back to 0.
    attack interrupted
    1. set "interruptable" to true
    2. extend combo weapon script to set DropComboDelay back to 0 when weapon state "interrupted" is true

    That way, every hit would reset/extend the time you have to complete the combo, whereas a miss (i.e. take too long to hit again), no action, or interruption would prevent you from completing the combo - you'd have to start again.
     
    Last edited: Mar 21, 2019
    reuno likes this.
  20. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Thank you both @reuno and @Boom_Shaka! I'll be having a tinker with everything tonight so I'll try and post up a video with what I have. Hope it'll be able to help someone else!

     
    reuno likes this.
  21. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    111
    I'm looking to copy the same style of mechanics with mostly 2d platforming but a few sections that use full 3d movement or the spline movement, would you recommend to stick with using top down engine or try to fit in with the corgi engine? :)
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Mcg > Using a top down solution to do mostly platforming sounds really weird to me :)
     
  23. Stoovey

    Stoovey

    Joined:
    Sep 11, 2018
    Posts:
    4
    Hi Reuno,

    Is there a roadmap to include a Minimap at all?
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Stoovey > It is on the roadmap, yes.
     
  25. FlowStateGames

    FlowStateGames

    Joined:
    Jul 6, 2012
    Posts:
    5
    Hi Reuno,

    First off, thanks for the amazing assets! I am a software engineer by trade, and I actually found that expertise hindering my game design, as I'd get stuck on solving algorithmic puzzles instead of ... designing.

    I'm doing a 4 games in 4 weeks challenge, and am hoping to use your engine as the framework. As such, I have a couple of questions. I don't need direct code solutions, just pointers to where to modify / inherit:

    1) I was thinking about doing a quick Marble Madness or SkiFree thing in an isometric pov. The two issues I can see up front are the camera and rolling / setting velocity based on surface modifiers / surface angle. I assume that spending some time with Cinemachine will help figuring out the camera. As far as rolling down surfaces, I see that you have a TODO `SurfaceModifier`, should I start there?

    2) Another simple game sub-genre to clone would be top-down puzzle games like Adventures of Lolo. Do you think you have the necessary abstractions in place for me to do grid- or tile-based movement? If so, should I start by modifying `CharacterMovement`?

    Thanks again, and I'm happy to put in work on SurfaceModifier if you have a set of requirements / specs for that class.
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @FlowStateGames > 1. I wouldn't recommend using the top down engine for such a game, it doesn't have much in common (if anything) in terms of controller. I'd probably go with a sphere collider and built-in physics for that, it's quite simple to setup without needing a framework for this, seems overkill.
    2. Same thing, a custom controller would be needed for this, right now it's not built-in. That one is on my todo list though.
     
  27. Shamshiel

    Shamshiel

    Joined:
    Jan 5, 2017
    Posts:
    3
    Hey @reuno I really love your asset. It is as good as the Corgi Engine!

    I'm currently studying your code to understand how everything is connected and I guess the comment for the class "CharacterButtonActivation.cs" is wrong. The comment says "Add this component to a character and it'll be able to crouch and crawl" but that doesn't fit the class at all.

    I'm also interested to know why you chose physics based collision instead of collisions with raycasting. Is there a specific reason for that? I'm always struggling with the decision what kind of collision detection I should chose for my game, so I would love your insight on this. :)
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Shamshiel > That comment is indeed wrong. If you find others like that, please use the support email to report them, thanks. As for collisions, it's really about different specs, picking the right tool for the right job.
     
  29. pabloawara

    pabloawara

    Joined:
    Nov 28, 2018
    Posts:
    10
    Hello, How can I run a script when AI character is dead? thanks
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @awaralabs > Not sure what you mean exactly. That depends what you mean. If you mean "detect the death of a character", you can listen to events for that, as explained in the documentation. If you mean "run a script on my AI that just died" then you can look at the Character's current state. If you have more questions about this please use the support email, thanks.
     
  31. FlowStateGames

    FlowStateGames

    Joined:
    Jul 6, 2012
    Posts:
    5
    Thanks for the speedy reply. I'd say I'm disappointed, but your library is just too solid for that. I'm learning a ton reading through it, and will be using it in the future.

    Also, I'm not sure if you're the same person, but the Unite talk about prototyping was absolutely inspirational and invaluable, thanks!
     
    Cereal_Killa likes this.
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
  33. Alai

    Alai

    Joined:
    Feb 14, 2009
    Posts:
    12
    I'm new to Unity and an getting confused just figuring out how to make a single sprite rotate with the direction it's going. However, I don't know where the animation distinguishes between the directions it's going. Should I be looking at the Topdown Engine documentation, or elsewhere in Unity?
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Alai > Rotating a sprite to have it face a direction is not a feature of the engine, so I'm not sure what you mean. That'd be something you'd have to implement. You can see a full list of features on the asset's page (and in the many demos). If it's not listed, it's not in the engine.
     
  35. vinhuman

    vinhuman

    Joined:
    Jul 24, 2014
    Posts:
    3
    Has anyone else had issues with the camera appearing very zoomed in on most of the 3D levels (not the sword one)? I previously asked about issues with the 2D camera and apologize for my incompetence with respect to cameras. I've updated packages/project asset files and the Cinemachine vcam has its FOV set to 40, but the problem is still there.

    I can sort of remedy it by offsetting the camera target that is instantiated by say, (0,10,-5) or so, but as soon as I equip a weapon the camera zooms back in.
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @vinhuman > Please use the support email for requests like these, thanks. And provide some info as to what happens when you set the FOV to 40 on the cinemachine cameras. What happens when changing that FOV? Nothing?
     
  37. vinhuman

    vinhuman

    Joined:
    Jul 24, 2014
    Posts:
    3
    I'll follow up with an email, thanks for the quick reply.
     
    reuno likes this.
  38. ROMA_VALERIUS

    ROMA_VALERIUS

    Joined:
    Jun 24, 2014
    Posts:
    3
    I'm also having a similar issue with the camera. I went about to create already 2 new fresh projects with the new cinemachine 2.2.8 and TopDownEngine, and still the camera defaults being extremely zoomed in, in all demos for me. I haven't even slept yet trying to figure this out all night how to fix this.
    I can't explain why something so annoying like this that could have been fixed the OG way in 2 seconds has to be so complicated. Documentation doesn't say anything about it (or I'm totally missing something). Cinemachine I expect should be "easy" and straightforward....
    Pardon my whining here but since I'm frustrated about this i simply can't help it because time is of the essence.
    I'll be back in 16 hours since I have work later in the afternoon and I'm gonna catch up on some Zzzs just before i do.
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @ROMA_VALERIUS > Don't hesitate to use the support email, that usually solves problems, @vinhuman's cameras were just not positioned correctly, that was a 10 seconds fix. In your case I'd need more info, such as a screenshot of the inspectors to be able to help properly. Drop me a line.
     
    ROMA_VALERIUS likes this.
  40. ROMA_VALERIUS

    ROMA_VALERIUS

    Joined:
    Jun 24, 2014
    Posts:
    3
    okay, will do!
     
    reuno likes this.
  41. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12
    hello all, hope youre well.
    is there a radar feature (halo/call of duty), or are there plans to implement one in the future?
    thanks!
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @Tha_Urthmaan > It's on the todo list, I'll add your vote to it.
     
    MudPuppet and Boom_Shaka like this.
  43. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12

    ...yay! thx and have a great one. peace!
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    So a few people have reported issues with the camera(s) just after an install recently. If you're in that case, please check out the first page of the documentation, the fixes are all explained right there : https://topdown-engine-docs.moremountains.com/
    If that doesn't solve your issue, please write me a bit more about the issue on the support email and I'll help you sort it out. If you follow the install guidelines there shouldn't be any issue :)

    And of course I'm looking for a way on my side to provide a fireproof solution to it, but until Unity provides a native way to link a manifest to a project, well, it's tricky.
     
  45. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Evening everyone!

    I'm back with yet another animation question! So, last time, I asked about having a combo that doesn't start until you hit an enemy/a random object. Fortunately, I've managed to get that working and it's pretty cool (I might stick a video up of it and show it to everyone).

    However, the game that I'm trying to play around with does not use a melee weapon and uses punching instead (like a beat 'em up). I have moved the melee animations into the koala character animator as I want the punches to be a part of the character, and not a sword that is floating. The only problem with this is now when I attack and hold down a movement key, the animation gets interupted super quickly. When the melee animations were in their own animator, I could toggle on and off "Prevent All Movement While In Use" but now that's not possible.

    My question then is can I make it so that the full attack animation can play by changing things in the animator or will it require some coding?

    Thanks!
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @MilziPPG > Of course you can, you just have to setup your transitions so they don't get interrupted by anything else. You can look at the 3D Sword dude example for reference. Note that this is absolutely independent from the engine, it's just regular Unity animator setup.
     
    MilziPPG likes this.
  47. eboxrocks

    eboxrocks

    Joined:
    Nov 22, 2017
    Posts:
    9
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,080
    @eboxrocks > Congrats on your release!
    I love your models, great work!
     
  49. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    reuno likes this.
  50. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99