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. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello Renaud, just spotted this and can reproduce with the Loft3D Scene. Basically I hit play, press ESC key to pause, press ESC to un-pause, and player can still move - all okay there. But if I press ESC to Pause, and then hit the 'Resume' button, the player can no longer move.
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @matthewngweile > You could add another nested collider on another layer around your enemies to make sure this doesn't happen.
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @MudPuppet > Please use the support email if you think you've found a bug, thanks!
     
  4. Necka_

    Necka_

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

    Coming back to you just to know if one of the request made at the release could still make it at some point

    The request was to have the option that the character moves following the Camera direction (just a checkbox somewhere) so if I press up it goes up but if I rotate the camera slightly to the left the character will follow that direction

    If it is not possible for you to implement it "soon", a little help on where to look to create that "extension" would be super appreciated.

    For a clear example here's what I'm talking for (I time stamped the video link) in Divinity Original Sin 2 played on PS4 with a controller:


    You can see that the player is rotating the camera and that the character is following that direction
     
    Vog likes this.
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Sure, I added it to the todo list when you requested it. So far I only had a handful of requests for it though, so it's very low in the list, but if it gets more requests, it'll get pushed up. I guess I'd look at Cinemachine if you want to implement it in the meantime, it's a good basis to build upon a feature like this.
     
    Vog likes this.
  6. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Ok
    I am using Cinemachine of course
    But it’s the character controller that isn’t moving related to the camera at all
    It’s the only blocking point for me at the moment, I managed to transfer all my project logic in TDE except the movement part

    Edit: I am using Cinemachine freelook camera. Locked in a top down view slightly angled (like in DOS or POE) with rotation possible like shown in the above video. But when rotating then the movement aren’t right anymore of course
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Oh for sure, that you're after would require an extended (or new, really) version of the CharacterMovement ability. I thought we had discussed this previously, my mistake. Because yes, input would have to be interpreted differently, and relative to the direction, instead of relative to the world as it is right now. That'd be the main change.
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    I've just created the extensions repo, on the same model and license as the one for the Corgi Engine.

    Here's the link to it :
    https://github.com/reunono/TopDownEngineExtensions

    I've kicked it off with a class that @Necka_ very nicely shared to handle a camera mode such as the one from Divinity 2 (and many other games). If you've made changes to the engine that you think would be useful to others, let me know and I'll add them to the repo (or make a pull request if you prefer).
     
    Stevepunk, Vog, Muppo and 2 others like this.
  9. Nemega

    Nemega

    Joined:
    Oct 23, 2012
    Posts:
    2
    Hello Reuno.
    I haven't bought the asset yet but it looks huge and very polished. I am very interested so far but there is one big thing that intrigates me. From what I have read/seen your 3d character controller seems to be relying on Unity's Character Controller which is convenient for you I agree but poses some great limitations at the same time. If you are using a capsule collider, making a 3d voxel based game seems difficult as the collider will get stuck on cubes corners. Is there anything in the engine to prevent that from happening or do you plan to make a rigidbody based controller (using a box collider) in the future? Thank you for your time and congrats on release.
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Nemega > Why would the character get stuck on corners, why would voxels be any different than normal model square walls, and why would using a rigidbody solve the problem? That seems unrelated to me, but maybe I'm missing the point :)
     
  11. Necka_

    Necka_

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

    It's not really a feature request but more an improvement for the future

    Would you consider switching the Camera Shake from the basic noise to the new Impulse listener (It's not that new anymore actually) ?

    I've worked with the Impulse listener on some prototype and it's really really better and more natural. Also the shaking can be depending on the source (in 3D space) of the shake, and on the screen it's really nice (imagine a big monster stomping is feet at 4 meters from the player and the more he move towards him the stronger the shake is.

    Also the impulse listener would make it possible to use a Freelook camera (up to the dev to use it or not of course) because this kind of camera is great when you want to put some smooth zoom-in but in that case the Noise component is added on all three level of the camera so it's not compatible with TDE

    I'd vote for that feature/improvement right now :)
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Yup, it's already been requested quite a lot actually, and I'm working on improving the feedbacks right now, so it's definitely coming. I just wish triggering these impulses didn't require that many components everywhere, it's a mess.
     
    Stevepunk and Necka_ like this.
  13. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Oh boy I'm so looking forward for that one :D
    Made my day :) future looks bright!
     
  14. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I'd like to add my vote to that with just one argument about using a RB controller: Root motion

    Movements handled by root motion (so the animation defines the speed of walking/running etc.) are better generally speaking. With the character controller it's a lot of tunning to avoid the "sliding effect" and many animations that are not in-place cause problems with the character controller not following the character

    Just in case it would be considered at some point :)
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > I strongly disagree about root motion.
    Outside of the obvious (ladders, feet placement), it's really bad if you're going for tight gameplay, and nearly impossible to maintain at scale. Not something I'd encourage :)
     
    Stevepunk likes this.
  16. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @reuno I get your point and won't disagree here, I have to get used to it and replace some of my animations to stay in-place
    The thing that I was struggling with last time (I didn't get back to it) was a spell I created, I was trying to create an explosion at the source point.
    So basically: explosion at point X, get all rigidbodies in the area and add force to them
    If I recall correctly it never worked because the RB of any TDE characters are set to Kinematic which is mandatory for Unity character controller
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Well you can't add the force to the rigidbodies (not like that at least), you'll want to use the controller's methods. Look at how the damage on touch script works for an example.
     
  18. Nemega

    Nemega

    Joined:
    Oct 23, 2012
    Posts:
    2
    I joined a 2D view of what I meant by using a character controller. Since you are bound to use a capsule collider you can encounter this kind of issue:
    stuck.png
    The character is getting stuck, you cannot get on the platform unless you jump but you can fall down.You kind of want a box collider there to prevent this from happening but to do so you must remove the character controller and handle movement using the rigidbody component. I was wondering if you handle this case properly in your engine. If so, I would gladly buy it since I lost a lot of time trying to figure out a solution.
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Nemega > I'm sorry I don't follow, the engine comes with its own controller, it's not just a CharacterController, so you can implement whatever behaviour you want. What you describe can be solved whether you use a box, a sphere, or a capsule, it's unrelated. If you have more questions, please use the support email, I'll be happy to keep discussing that with you.
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > Sneak peek from the next update :
    upload_2019-1-6_11-56-13.png

    You will now be able to trigger impulses from your feedbacks, without the need for any additional component, it handles the source event creation and all. You'll still need a listener on your CM camera of course, but the rest is taken care of.
     
    mccann, Stevepunk and Muppo like this.
  21. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I just bought the asset. I am having issue with pixel perfect. Here is what I am getting when running the Demo scene
     

    Attached Files:

  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @kotor > set the pixel perfect size to 16 to fix this
     
  23. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @reuno I don't want to spam this forum with stupid heart emoji or else, but it's totally how I feel seeing that Feedback update!

    Thank you so much, that's going to be some badass shaking management!

    <3 (F*** it!)
     
    reuno likes this.
  24. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I don't know where you want me to change pixel perfect size ?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @kotor > Select the MainCamera, go to its Pixel Perfect Camera component, set the Assets Pixels Per Unit size to 16.
     
  26. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I found it. If I remove pixel perfect from the project still it works. Which one is better ? with or without pixel perfect ?
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @kotor > That depends on what you want. If you want a pixel perfect camera, it's better with that script.
     
  28. mattbrayne

    mattbrayne

    Joined:
    Sep 3, 2017
    Posts:
    2
    Hi @reuno
    Thanks for creating such a great engine.
    I want to make a character that can equip and fire 10 weapons at the same time (each with their own weapon attachment transform). What do you think the best way to do this is? Extend or modify the CharacterHandleWeapon class? I don't want to mess with your code, and will extend wherever possible, so I'd love to get your thoughts on it.

    Cheers.
     
  29. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello Reuno, I was wondering if it's possible to make the ConeOfVision act like a weapon. ie: If the player is within the cone of vision they can take damage. Sure I can just create a mesh to match the cone radius and add either KillZone or Destroy on touch but if I were to adjust the ConeOfVision radius I would have to readjust the mesh in a 3d app.

    Basically I was just tinkering around trying to make a moving platform an enemy - kind of like having a mounted searchlight on a wall that travels on rails. I spotted this in some mobile games today and thought that if it was possible I might do up a little video tutorial.
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mattbrayne > That's an interesting question!
    I see two main ways of doing this, depending on what you want exactly.
    - if you want to shoot all 10 weapons at once (with one input), then extending CharacterHandleWeapon into CharacterHandleManyWeapons (pick a better name) and have it bound to as many weapons as you want, triggering them all wherever the single weapon is triggered into the main class
    - if you want to shoot them via 10 different inputs, then I'd recommend creating as many classes as you want, on the same principle as the CharacterHandleSecondaryWeapon (it's quite short you'll see, as it simply overrides the input). You'll have to declare and setup more inputs in the InputManager, but apart from that it should be quite straightforward.
    @MudPuppet > I think for that I'd create a class that directly applies damage to the Health component of whatever you detect within the zone. You can already get the info of what is or not in the cone via the ConeOfVision class.
     
  31. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12
    Hello, hope all are well.
    RE: local co-op, can someone point me in to where in the documentation how would I approach where I can have players pick their game character regardless of which controller they are holding, i.e., player1 can choose archer, wizard, warrior, or valkyrie. player2 chooses whomever remains, etc., and so on instead of a character being assigned a default controller.
    Thanks to all, and wishing everyone a wonderful day.
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Tha_Urthmaan > So there's no example of it in the asset right now (it's coming soon though - next update probably).
    That said, it's already quite doable.

    Basically you'll need a character selection screen, and then on the engine's side, you'll want each Character to have a unique PlayerID (that's set via the Character class). Player1 for the first player, Player2 for the second, etc. The engine comes with pre-created bindings for 4 players by default (you can change them via the InputManager like you would for the main player), and you can of course create more if you want, using the same logic.

    You'll also need an InputManager per character, so all you have to do is select the main one (it's on the UICamera), and duplicate it as many times as you want Characters, and change its PlayerID field to Player2, Player3, etc.
     
    MudPuppet and Tha_Urthmaan like this.
  33. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I have just a very quick question: the Input manager

    In my project I mostly have scenes with only the environment and specific game logic of that scene and most of the managers/player/cameras are instantiated at start (if there were not transported from the previous scene)
    If I instantiate the input manager at the start of the scene, it seems to not be active. If it is in the scene before loading it, absolutely no issue at all
    If it's not possible I'll just add the input manager in all scenes, but I prefer to ask in case there is a trick I didn't recognise :)
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > The Character needs to find its InputManager when it gets initialized. If you decide to change the scene structure, you'll have to either put things in the right order (tricky, potentially), or make these bindings manually in an initiator class.
     
  35. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Understood, thank you for the answer.
    I'll just leave the input manager in all scenes I load, that's fine :)
     
    reuno likes this.
  36. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I was having some errors and understood where it came from, I wasn't using a Cinemachine confiner
    I didn't see natively a way to not use one with TDE and I was wondering why?
    I checked what is the main use case for Cinemachine Confiner and apparently it's widely used in 2D projects and my lack of knowledge here makes me question how and why a Confiner is required in a 3D project (considering my scenes are on 512x512 terrains - should I have a boundary box of that size?)
     
  37. eboxrocks

    eboxrocks

    Joined:
    Nov 22, 2017
    Posts:
    9
    Hi @reuno ,

    I apologize if I missed this in the documentation, i did read all of the documentation.

    Quick question in regards to sound when weapons are firing. I noticed sound attributes for equipping and dropping on the weapon scripts and player abilities, but I didn't see any designated spot for sound when specific weapons are shooting.

    My question is this, where would you recommend that we add this (or is it somewhere that I just haven't seen in the engine). It seems to make sense to me to maybe include it in the object pooling script, as we can add a sound clip for each bullet like how it would work in real life, but that might be slow performance for fast firing weapons, so maybe it should be at the weapon level. I would like to have different noises for each weapon.

    What are your thoughts on best approach? I want to make sure I don't shoot myself in the foot when upgrading later.
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Necka_ > I'll add an option on the camera controller to not have to use one for the next update. In the meantime you either need a big box, or you can extend the camera controller to override its Start method so it doesn't bind itself to the confiner.
    @eboxrocks > That is set in the Feedbacks section of each weapon (you can have different feedbacks (including sound) on start of use, stop, reload, etc.
     
    Necka_ likes this.
  39. eboxrocks

    eboxrocks

    Joined:
    Nov 22, 2017
    Posts:
    9
    Awesome, I must have missed it. Thank you so much for clarifying so quickly! Your customer service is phenomenal.
     
    reuno likes this.
  40. GurneyHalleck

    GurneyHalleck

    Joined:
    Jan 9, 2019
    Posts:
    1
    Trying to play the demo levels and they seem to work fine except the Koala2d Dungeon. It starts very zoomed in. Both on the play option and the build option. The camera views seem to be fine on the other demos. I installed the extras and made sure I didn't have any more install options in the Tools -> More Mountains menu. I'm running Unity on a Mac if that makes a difference. It does it if I just run the scene itself or I get to it via the level selector, no difference.

    https://imgur.com/a/gPszVnJ
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @GurneyHalleck > Select the camera, and set its Pixel Perfect size to 16 instead of 100. I don't know this setting seems to flip for some people and not others, but I'm investigating.
     
  42. mattbrayne

    mattbrayne

    Joined:
    Sep 3, 2017
    Posts:
    2
    @GurneyHalleck you had the same problem I had. I also noticed the screenshake wasn't working, so if you're having that problem I've found the fix. You just need to set the Noise Profile to any profile you want in the virtual camera.

    https://i.imgur.com/ZAodqig.png


    @reuno Thanks for the reply regarding equipping multiple guns, I got it working thanks to your suggestions :)
    I also want to change the screenshake from being completely random, to shaking in the direction of the aiming reticle (or any direction I specify really). Any idea where I should be looking to make that happen? Would this be possible within your MM framework?
     
  43. VENOMOUS09

    VENOMOUS09

    Joined:
    Dec 27, 2014
    Posts:
    37
    when will the new update come out
     
  44. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12
    Hello, hope all are well.
    RE: projectiles - I purchased an effects pack (polygon arsenal) and would like to swipe out the default projectile handgun bullets with those in the pack, but when I tried to do this via the projectile folder, im still getting the default handgun bullets but kinda glitched up or it would lock up when trying to test the scene. Is there somewhere I can look to see how this should be approached when looking to swipe out the default weapon effects with new ones?
    Thanks and have a great day.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mattbrayne > The directional screenshake will be made easier when the new update hits. In the meantime you can extend the camera shake class to implement it yourself if you prefer.
    @VENOMOUS09 > When it's done and properly tested, just like all the other updates. As explained in the FAQ, I don't give ETAs.
    @Tha_Urthmaan > Just edit the projectile prefab and put your thing in its place. There's nothing specific to the engine here, maybe just look at your thing's scale. Hard to tell what's wrong here without any info :)
     
  46. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12
    @Tha_Urthmaan > Just edit the projectile prefab and put your thing in its place. There's nothing specific to the engine here, maybe just look at your thing's scale. Hard to tell what's wrong here without any info :)[/QUOTE]
    Hello again. thanks for the response. I'll try to clarify and I added picts to help explain my situation.
    Here if I use the default bullet set-up. Everything is fine and functions as it should.
    unity001.jpg
    unity002.jpg

    If I then try to substitute the default bullet set-up with a different bullet particle effects package, it hangs on playback.
    unity03.jpg
    unity04.jpg
    So then I figure if I go inside the default bullet prefab to change where it pulls the particle images from, it hangs again.
    unity06.jpg
    So yeah,...I don't know what I'm doing here. Now I do notice that the default bullet prefab and the particle effects prefab have nested instances (default bullet = 2, effects bullets = 3), could this affect how this works?

    I appreciate any insight anyone can offer. I know its not a glitch with the engine, I'm not understanding what I'm doing wrong or what I might've missed to allow for different looks to the projectiles.

    Thanks and enjoy your day.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @Tha_Urthmaan > It's hard to tell what's wrong from these screenshots, but basically in the context of the engine a projectile is a game object (not necessarily a particle system, it can be, but doesn't have to) that moves in a direction using the Projectile script (which gets its direction from the weapon, usually) and that gets recycled in an object pool for performance. But really it could just be a cube. To create a new one you can either start from scratch, or copy an existing bullet prefab and modify it to remove and add whatever you'd prefer. So that's all there is on the engine side. I guess the rest depends on how your specific particles work, maybe they need something else, but I can't see what at this point. I guess I'd look at the scale, that's the first thing that comes to mind.
     
    Tha_Urthmaan likes this.
  48. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @Tha_Urthmaan Compare with the orignal Bullet prefab
    If you use custom objects/particles you'll have issue because their position/rotation/scale is not right.
    I don't use this pack but in my case I had to follow the prefab example from Loft3D. The Impact particle is slightly forward, the missile/bullet is slightly backwards and the scale as Reuno said is also important. if it's too big you'll see just one large bullet that look bugged.

    Also orientation is very important of course.

    So compare original prefab with your and step by step you'll find out. As Reuno said, it's really up to Unity stuff for that topic, but nothing difficult to handle
     
    Tha_Urthmaan likes this.
  49. Tha_Urthmaan

    Tha_Urthmaan

    Joined:
    Sep 18, 2018
    Posts:
    12
    Thanks all. I appreciate the feedback. Take care.
     
    reuno likes this.
  50. Ambicioso

    Ambicioso

    Joined:
    Oct 16, 2017
    Posts:
    3
    Hello, can anyone explain to me how can I create an AI? I'm trying to create Zombies that only attack melee, also is there a Discord I can join to ask for help?