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,923
    @Muppo > This one is very high on the Corgi Engine's todo list, but I have to admit I hadn't thought of it for the TopDown. Do you know of a top down game that does that?
     
  2. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    +1 to the fading

    @reuno i have seen quite a few top downs do something similar. I'm at work and don't have access to my steam library right now. Perhaps someone else can chime in that has the day off. :cool:
     
    reuno likes this.
  3. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    reuno likes this.
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Muppo > Oh ok, I somehow thought you meant like a secret passage.
    That's just a dissolve shader :)
    I could add one of course, but that's usually something that is very dependent to your art direction, and has to be rebuilt on per-game basis, so I'm not sure if adding one would help that much.
    Any tutorial you'll find on that will be applicable to the engine. This one seems ok : http://glowfishinteractive.com/dissolving-the-world-part-1/.
     
    Michoko and Muppo like this.
  5. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Hi @reuno this is an amazing asset, thank you for creating and putting it up for sale.

    I had a question for you. Is there a way you can get the Virtual Joystick used for mobile to move to a new position if a player taps outside of the d-pad area? I have been trying to detect if a touch on screen is outside of the joystick area, but this is proving far trickier than expected due to it being parented to the UI Camera transform position. From what I can see if I tap outside of the joystick, I can't seem to detect the tap / click / drag. I'm not sure what I am doing wrong here!

    Has anyone done something like this with this engine? I see there is a Dynamic Joystick script, but it doesn't seem to have this behaviour either.
     
    Last edited: May 30, 2019
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @anil_unity385 > That's not something that is built-in if that's your question. But yeah, of course it's doable, you'd just need a new class for that, extending that one would be too messy for something like this.
     
  7. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Hi, I've used Control Freak 2 (which has a Corgi controller integration although I had to email the (very helpful) CF2 owner (@DansGameTools ) for the updated controller because the one in the package is before corgi v5. Having used something like this with a self-repositioning joystick I found the default Topdown/Corgi controller almost totally unwieldy (CF2 has spoiled me lol). Once CF2 was set up I simply set the InputManager.cs to force desktop input and it worked great. Works for Topdown Engine as well... although some work needs done to convert to the Topdown Engines input settings.

     
    Last edited: May 30, 2019
    anil_unity385 and reuno like this.
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Rewired's Corgi integration also works almost out of the box with TDE. I had to make a few adjustments for the control differences between Corgi and TDE, but it was pretty simple. Perhaps @reuno could contact the Rewired dev to port the Corgi integration to TDE.
     
    reuno likes this.
  9. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @reuno It seems I'm pretty noob to shaders yet, that seems like a good article to learn some basics. Thanks for the info :)
     
    reuno likes this.
  10. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I contacted the Rewired dev and he replied that he doesn't plan to do a TDE integration :( I was very sad about that...
    Reuno setup a Github for community addons/extension. Would you mind maybe sharing that integration with us?
     
  11. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I'm actually doing the almost same style of dissolve fade in my project that is used in Divinity OS2. I'm using a shader suite from the store for that (Advanced Dissolve) and it works almost out of the box.
    You use a Cylinder mask that you just need to synchronise with your Camera position and forward. Then setup the mask to dissolve any materials you wish (you add the materials to a list in the mask component, it's provided with the shader) and then setup the dissolve settings (distance from camera to start dissolve, outline, colors, noise, effect, size etc.) it's really easy. I asked that on the asset Unity forum thread and the dev replied to me with that technique details. It's not a competitor to TDE at all but if you want the forum link just throw me a PM as we are not here to discuss other assets :)
     
    Muppo and reuno like this.
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Necka_ > If it's an asset that works well with the engine and can be useful to others, feel free to post a link to it here, no problem at all with me :)
     
    Necka_ likes this.
  13. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Oh thank you :)

    So for anyone interested in doing the same Dissolve/Fade as in Divinity original sin 2 when the camera is blocking the player view and if you own (or are interested in) Advanced Dissolve asset, here are the steps to make it work (and then you can tweak the effect how you like)

    Here is the dev explanantion on how to do it simply (I replied to that thread just after for a bit more questions on how to collect materials automatically to add them to the dissolve thing in case you spawn walls or roofs at runtime)

    https://forum.unity.com/threads/advanced-dissolve.517354/page-3#post-3628384
     
    Muppo, christougher and reuno like this.
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Necka_ > I didn't know that asset. That's one good looking shader! Thanks for sharing this!
     
    Necka_ likes this.
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I'm going to be out of town until Monday. I made a note to myself to post it on Monday.
     
    Necka_ likes this.
  16. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Thanks Reuno. I am perfectly happy to do that, but would it be possible to give me a little advice on how best to do it? Where I am stuck is that I can't detect touch / drag inputs on the screen outside of the virtual joystick. What is governing that exactly? The Input Bindings in InputManager?

    Apologies if this comes across as dumb on my behalf!

    Thanks for the reply. What is involved in changing the input settings over? The repositioning joystick is the thing I am aiming to implement.
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  18. DMRhodes

    DMRhodes

    Joined:
    May 21, 2015
    Posts:
    81
    Afternoon, just wanted to pop in to let you know that everything is going great with the engine so far. It's very polished!

    I was also hoping to throw in a +1 for boss type enemies like in the corgi engine, perhaps with boss-room doors that only unlock once they've been beaten.

    Regards
     
    reuno likes this.
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Candy-Bomber > The locking doors are a nice touch. I'll add your vote to the boss thing.
     
    IlyaKo and DMRhodes like this.
  20. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    First off, do you have any of the touch input plugins from the Asset store? Control Freak? Rewired? InControl? But basically the Corgi example for Control Freak 2 would need some of the Input parameters changed to match the differences between Corgi and TopDown Engine. Could be a little bit tedious but alot of it matches already... CF2 is the cheapest of the bunch, $9 bucks is underpriced. If I get one working right I'm happy to share.

     
  21. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Thank you both.
     
    reuno likes this.
  22. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Last edited: May 31, 2019
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @christougher > If you want, you can send it to me and I'll put it in the contributions repository.
     
  24. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Edited my above post with links to my Dropbox...

    It looks like it would be quite the chore to update to control Players 2, 3 or 4... just thought I'd mention...
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  26. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    I think the controller will be included in the next update, he forgot to include it the last time... So maybe include it for now?
     
    reuno likes this.
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @christougher > Alright, I've added it to the Corgi Engine's extensions repo. Thanks for sharing this!
     
  28. HeathC

    HeathC

    Joined:
    Oct 17, 2016
    Posts:
    110
    I've been trying to map my ps4 controller to the top down engine and making some progress but the right trigger (R2) (which is button 7 on the Mac) is opening the pause menu overlay. I saw button 6 (L2) opens inventory and found that on an inventory manager, so I can change that if I like, but where will I find the pause overlay inputs? I can't find them anywhere... right now my character just starts to shoot when the pause menu comes up (it's doing both at the same time)
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @HeathC > That's the Player1_Pause axis, as the name implies :)
    If you have more questions like these, please use the support form, thanks.
     
  30. HeathC

    HeathC

    Joined:
    Oct 17, 2016
    Posts:
    110
    oh my gosh... I don't know how I continually overlooked that... I was poking around the hierarchy and searching and searching and was like... where is this happening?!? In front of my face apparently... sorry to have bothered you... can't believe I didn't see that
     
    reuno likes this.
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @HeathC > No problem, there are a lot of input bindings there, it's easy to miss one :)
     
    HeathC likes this.
  32. HeathC

    HeathC

    Joined:
    Oct 17, 2016
    Posts:
    110
    hmmm... I've gone through every single possible way of making the aim reticle move with a controller, secondary horizontal, secondary vertical, even changing every single setting (in case I don't know which one it actually is) to the same x and y axis as player movement, which should make it aim in the direction the player is moving... and I can't get it to aim to save my life... mouse works perfectly, but I can't get it to aim with the controller
     
  33. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Did you also set it the Weapon Forced Mode on the InputManager.cs?
     
  34. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    When I get a chance I'll set up versions for players 2-4 for both Corgi and Topdown. I'll also update the aim joystick I added so that if you push the joy to it's edge it'll autofire. Push a little to aim, push a lot to aim and shoot. Only so much two thumbs can do lol. :D
     
    reuno likes this.
  35. HeathC

    HeathC

    Joined:
    Oct 17, 2016
    Posts:
    110
    I'm not familiar with this...
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @HeathC > Again, you probably haven't set the secondary axis properly, just like the others, for new types of controllers, you have to set them. And of course you'll need to change the weapon aim mode on the Weapon itself.
    And once again, please use the support form from now on, thank you.
     
  37. HeathC

    HeathC

    Joined:
    Oct 17, 2016
    Posts:
    110
    I got it!!! what a joy! First hurdle down... 749 to go...
     
  38. IlyaKo

    IlyaKo

    Joined:
    Mar 19, 2015
    Posts:
    2
    @reuno

    Hello, thank you for TD Engine - I love it!

    There are some things that I wish to discuss:
    1. I set noise option on my Cinemachine virtual camera to "none". After that MMCinemachineCameraShaker can't find CinemachineBasicMultiChannelPerlin component, so _perlin variable equals null and Start method throws exception.
    2.I used AutoBuild Player button in Character component and forget to set layer masks in TopDownController2D component. It took some time to figure out why animator controller acting weird. May be to add some validation in the TopDownController2D class? Or set somewhere default layer masks.
    3. If shooting was interrupted by some event (close wall or magazine reload) then weapon stop shooting until I release Fire button and press it again.
    4. After character death there is option to disable collisions in Health class. But I think in death case could be physics layer changed instead of disable collider. So we can set some behavior by layer collision matrix configuration.

    P.S. I know I could inherit from your classes and do my own behavior. Just for your information.
    P.P.S. Sorry for my English.
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @IlyaKo > Thanks for reporting these. If you find more please use the support email to report them, much easier for me to keep track afterwards, thanks.
    1. The CinemachineCameraShaker indeed relies on noise, but that exception should be handled more elegantly, I'll fix that.
    2. The engine used to set default layer masks but that generated more confusion (seems much better now). Not sure what the ideal solution is, still figuring this out.
    3. That's the intended behaviour.
    4. That's a good idea, I'll add that to the todo list.
     
    IlyaKo likes this.
  40. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Here is my Control Freak 2 Controllers for Players 1-4

    CF2-TopDownEngine-Players1-4

    I added a second Aim Joystick as well as an alternate AIM joystick that also shoots if pressed to it's edge.

    Here's Corgi's Player 1-4 controllers as well...

    CF2-Corgi-Players1-4
     
  41. IlyaKo

    IlyaKo

    Joined:
    Mar 19, 2015
    Posts:
    2
    @reuno > Thanks for your answer!

    About interrupted weapon shooting - I just needed to switch on "Continuous press" in CharacterHandleWeapon ability.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @christougher > I've updated the repos, thanks for sharing this!
    @IlyaKo > Thanks for letting me know. I'll have a look at the other items for the next release, thanks again for reporting this.
     
  43. RikiKlein

    RikiKlein

    Joined:
    Dec 14, 2018
    Posts:
    17
    Hey, I am currently trying to create a shield/invicibility ability. But I haven't figured out how to approach it yet, maybe someone has an idea. I am happy to share it when it's done as I think it could be useful for quite a few games.

    What I would like the ability to do:
    On button press turn the player invicible for a set amount of time or add a certain amount of health (any health over the players maximum health is taken away when the ability's time runs out).

    What my thoughts were so far:
    I found a public bool Invincibility which is used in the melee weapon script (I am not sure if it turns the player invicible or the target that gets hit though) but haven't figured out how exactly it works or how to use it for my ability.
    I also thought about using the same system as the health pickup, but I would have to change that to be an ability and also add the logic that takes away the excess health after the ability runs out.

    General thoughts about the ability:
    For my purposes just having the ability turn the player invincible for a set time would be just fine, but I thought why not add the health-mechanic too, so the ability is more versatile and much more useful for other projects. So having the following options in the inspector would be nice:
    • choose between invicibility and adding health
    • if choosing adding health set amount of health to be added
    • set duration of ability
    • set cooldown of ability
    • set Parameter for Animator
    • use MMFeedbacks

    I think that's about it, any help is appreciated and again, I'm happy to share the ability once it is done.
    Cheers, Riki
     
  44. Jericox

    Jericox

    Joined:
    Jan 3, 2017
    Posts:
    2
    I am using xbox 360 controller to move the character and aim at the same direction. However the angle of the character snaps quite a bit when the movement is stopped. Usually it end up in 90 degree angle (up,down,left and right) and rarely some quite random in between.

    I disabled all snapping from preferences (input tab) and tested lots of dead zone variations. Is there something in the code that needs to be done or did I miss some option?
     
  45. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Quick question, in the Loft 3D scene, the camera always seems to shake. How do I turn this off?

    Ah NVM, it's the amplitude and frequency gain settings on the Cinematic Camera settings that need to be adjusted.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @anil_unity385 > Disable the virtual camera's noise.
    @RikiKlein > Shields are on the todo list, I'll add your vote to them. A very simple way to do them is to have an ability spawn (or activate) a collider around your character, or, even easier, target the Health component of your character and make it invincible, or add health to it, there are already public methods for this.
    @Jericox > Assuming you're in 3D, set the CharacterOrientation3D's AbsoluteThresholdMovement (and/or AbsoluteThresholdWeapon, depending on your setup) to 0.
     
  47. Jericox

    Jericox

    Joined:
    Jan 3, 2017
    Posts:
    2
    Ah, yes I am using the 3D side of things.

    Even when AbsoluteThresholdMovement (or Weapon) is 0 the snapping happens. It is most noticeable when making small movements and thus aiming with small movement becomes impossible.

    I have the newest version of Unity and tested the scene with two different controllers.

    https://www.dropbox.com/s/58ih1xr1eawi380/TopDown_orientation_issue.gif?dl=0

     
    Last edited: Jun 4, 2019
  48. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Are you using the latest version of TDE?

    @reuno I don't know if you remember, I had the same issue but you actually sent me a fix for this and it worked perfectly fine afterward
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Jericox, @Necka_ > That fix is included in v1.3. I tested and don't reproduce the problem in that version. Maybe @Necka_ if you've got a minute give it a try using 1.3 and let me know if that works for you.
    It could be a setting in Unity's input manager panel as well, specific to your gamepad, like sensitivity and the likes.
     
  50. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    I'm editing the Loft3D scene. If I wanted to make the game start in a paused state, how would I do that? Where is the central point in the engine that ticks all of the game code?

    I can see there is a paused event you can call, but if I call this in GameManager Start(), it doesn't trigger. If I tap on the Pause button once the scene has started then it does indeed Pause the game.

    I intend on starting the game with a screen that allows the player to choose a weapon before the game starts, that's why I would like to prevent the game from updating until this choice has been made.