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

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    Hello everyone! I'm sorry if this has already been brought up in the thread but I was wondering if theres a way to make an 8 directional character (Like the ones in the grasslands demo) rotate and change the direction its facing depending on where the weapon is aiming like in Enter The Gungeon. Thanks!
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @lessthanthreewizard > Sure, that's something you can easily tweak at the animator level. Right now the blend trees are based on movement direction, but there's nothing preventing you from using weapon direction instead.
     
  3. lessthanthreewizard

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    Thank you for the quick reply! Can you be more specific on how I would go about doing this? You don't have to explain it thoroughly just guiding me in the right direction would help alot. thanks!
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    lessthanthreewizard likes this.
  5. lessthanthreewizard

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    Thank you so much ^^
     
  6. pouria77

    pouria77

    Joined:
    Aug 13, 2014
    Posts:
    36
    Hi everyone

    We're working on a top 2d game and so far this engine has been awesome. There's only one issue that I haven't been successful in solving. I was wondering if anyone has had any experience with this.
    So our game has a character that moves in a small scene and kills enemies, get keys, and the camera follows him around.
    We have 3 different scenes, one is the intro, which has only UI, then the loader scene that comes with the engine, and then the main game scene, which will timeout to the intro after a while.
    The issue is that after letting the game run for a few hours, the camera that follows the player, moves very rapidly, and looses its smoothness. It's weird because every time someone starts the game, the game scene is loaded again, and then it will timeout to the intro scene, so the camera and everything will be reset along with the scene, yet for some reason after a few hours of letting the game run, the camera that follows the player does so very rapidly and looks really buggy.
    I've checked the memory and cpu usage after a while and those are the same as when the game starts, so I know we don't have any memory leaks or things along that line.

    Some additional info:

    The game scene has a Virtual camera (cinemachine), a main camera, and also a UI camera.
    on the virtual camera, in addition to the cinemachine stuff, we have 2 other scripts : cinemachine camera controller and MM cinemachine camera shaker. On the main camera, we have 3 scripts: MM chromatic aberration shaker, MM color grading shaker, and MM lens distortion shaker. These scripts are used so that when we kill an enemy, or get a key, the camera shakes a little bit, and the screen flashes.

    I'd appreciate any guidance with this.
    Please let me know if I can provide any additional details. Thanks.
     
  7. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    I'm still learning about the possibilities of the TopDown engine (and having fun doing so), and have a follow up question for my custom controller for a ball run game.

    The physics based feel is actually what I would like to go with, and I already made some progress writing a custom controller to use instead of the CharacterMovement ability.

    Where I am still having trouble is that I cannot just use Rigidbody.AddForce(), because the Rigidbodies components added for example by the AutoBuild function are marked as kinetic. If I am not mistaken that is the case, because the actual movement is done via the CharacterController.

    Disabling the IsKinetic flag on the Rigidbody causes characters to bounce of the ground as soon as they are spawned (e.g. in the Minimal Example 3D scene, when you disable IsKinetic on the respective MinimalCharacter Prefab).

    Am I perhaps missing any settings in the CharacterController which would explain this behaviour, or is using a CharacterController together with a non-kinetic Rigidbody a bad idea in the first place?

    When I remove the CharacterController from my player prefab, I would have to make a custom version of the TopDownController3D if I understand correctly.

    I would really appreciate any tipps or warnings about pitfalls when writing a custom movement controller, which does not rely on a CharacterController. Or if I risk breaking functionality of the TopDown engine that needs the CharacterController (directly or indirectly).

    Thanks in advance you guys for any input you can offer on this issue.

    Best regards,
    Patrick
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @hellhammer > I have to admit I've never encountered such a situation. It looks to me like a Cinemachine bug (considering that nothing else in the engine makes the camera move if you're using Cinemachine), but I've never reproduced it (and I use Cinemachine a lot). The 3 shakers you have on the camera have no impact on its position, so you can safely exclude these from the problem. The CinemachineCameraController doesn't do anything at update, so I don't think that's it either. That leaves Cinemachine itself. I'd recommend contacting Unity about it (or the Cinemachine team directly), maybe they'll have encountered that before. Please let me know how it goes.
    @patrickk2 > You'll want to modify not just the CharacterMovement ability, but also the controller itself (create a BallController for example instead of the TopDownController3D in this case). From there everything's entirely up to you, if you need a non kinematic rb, that's entirely fine.
     
  9. pouria77

    pouria77

    Joined:
    Aug 13, 2014
    Posts:
    36
    @reuno Thank you so much for the response. I kept testing yesterday and strangely enough, when I remove the shaker scripts, the issue seems to go away. I was wondering if somehow they hold some values even after the scene is unloaded and when we reload the scene again, the become out of sync?
    I'll keep investigating and report back.
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @hellhammer > Oh that could be the CinemachineCameraShaker (I overlooked that one in your past message, and only saw the post processing shakers). You can remove that one and use Cinemachine impulses instead (with a Cinemachine Impulse Listener on your virtual camera), it's much better anyway.
     
  11. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    Thank you! I'm glad, I was kinda on the right track with replacing/modifying CharacterMovement/TopDownController3D :). I will keep working on that.

    Best regards,
    Patrick
     
    reuno likes this.
  12. JKURNIA

    JKURNIA

    Joined:
    Dec 27, 2019
    Posts:
    4
    @reuno ,

    Apologized if this is too novice of a question or has been discussed before, I am trying to create a Health Item as an inventory item that could be consumed later. I read the documentation but can't seem to get it to work.
    Capture_ChipHealth.JPG

    Cheers,
    JK
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @JKURNIA > It's hard to tell what your issue may be without any info. What's happening? What's not working exactly? What did you do? Please provide these infos using the support form and I'll be happy to have a look. I'd suggest reading the inventory engine's documentation though, it covers all there is to know about it.
     
  14. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Quick question. With the 2D top-down character, could I set the physics to "roll" or slide around...i.e. like a character on a skateboard? I'd still like to maintain tight control of the character, but that the character would gradually come to a stop.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @JamesArndt > Maybe not out of the box, but it's doable, yes.
    The rotating 2D controller would be a good start point, you'd then need to add inertia, mostly.
     
    JamesArndt likes this.
  16. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Okay excellent. And this works fine in 2018.4?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @JamesArndt > The latest version requires a more recent version of Unity, but most of it (if not all) will run in 2018.4, sure.
     
  18. lessthanthreewizard

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    Has anyone been able to get unity's timeline to work with the asset? I tried feeding the character through the timeline api in runtime but that didn't get me far
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @lessthanthreewizard > It's already doable (via code, or by having duplicate actors separate from the actual gameplay ones), but the next update will make it more easier by allowing the playable character to be already present in the scene at start, enabling easier binding in Timeline.
     
  20. lessthanthreewizard

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    Thank you, I've sort of got it to work now and I was wondering if theres any way to delay the player spawn? Because if I could delay the player spawning on the spawnpoint I could probably just disable the actor character and have the player spawn in the position I want
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @lessthanthreewizard > I can add that to the todo list for sure, and if more people request it, it'll be included in a release, but I have to admit I'd rather avoid adding options like that, which are certainly useful in your case but not so common. It complexifies stuff for the majority, and I try to prevent that from happening :)
    In this case, nothing prevents you from extending the LevelManager to delay that. You'd just have to override the Start method to have it launch a delaying coroutine instead of just calling InstantiatePlayableCharacters directly.
     
    lessthanthreewizard likes this.
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Good news everyone, I've just pushed v1.6 to the Asset Store.
    Here are the full release notes :

    - Adds new AI Actions : CrouchStart and CrouchStop
    - Adds HealthAutoRefill, a new component that you can add on a character or object with a Health component and that will refill its health automatically after it gets hit. It comes with burst and linear settings, cooldowns, etc.
    - Adds MMPlaylist, a new system to play songs (or any audio really) in sequence, that supports crossfading and other options
    - Adds MMTimedActivation, a new tool to trigger events and state changes after a certain duration
    - Adds a new feedback, MMFeedbackAudioSource, that lets you play audio sources via the feedback system
    - Adds an option to have playable characters directly in the scene and not instantiated
    - Adds more options to the MMSceneRestarter
    - Adds more options to MMSaveLoadManager, adding Json support and encryption
    - Adds a raycast offset to the WeaponLaserSight
    - Adds an option to lock 3D AI's aim horizontally on AIActionShoot3D
    - AIActionChangeWeapon can now also be used to unequip the currently equipped weapon
    - Adds support for delay to AIActionMovePatrol2D
    - Improves performance on tag comparisons
    - Removes a tiny bit of coupling between Teleporter and LevelManager
    - Caches a wait for fixed update in TopDownController3D
    - Auto focus management is now separate from the LevelManager, and handled by the AutoBindAutoFocus class
    - Adds assembly definitions to all libraries included in the engine
    - Removes all mp3s and replaces them with wav files to comply with the asset store guidelines
    - Fixes a bug with the radius detection 2D AI script that could cause it to not detect targets when close to certain walls
    - Removes missing references in a few prefabs
    - Fixes an issue that could prevent 2D grid based characters from flipping correctly
    - Fixes incorrect settings on the MinimalCharacter2DGrid prefab
    - Fixes a missing non null check in the WeaponAim classes
    - Fixes a deltaTime typo in CharacterJump3D
    - Removes a "todo" signpost in MinimalSandbox3D
    - Fixes a few aim related scripts that kept running even when the game was paused
    - Fixes missing InventoryCanvas in the MinimalSandbox3D demo scene
    - Fixes a bug that could cause teleporters to malfunction under a certain combination of options
    - Fixes a typo in the install readme
    - Fixes a few bugs related to how the WeaponAim classes move the camera target
    - Removes coupling between ProjectileWeapon and WeaponAim2D
    - Fixes a few orientation related typos
    - Fixes a bug that could result in weapon animators not binding correctly after an inventory load of an equipped weapon
    - Prevents an edge case that could potentially cause the mouse cursor from being shown properly
    - Fixes a bug that could cause a weapon change to result in the weapon pointing at a different direction than the previous one
    - Adds more options to the MMProgressBar

    As usual, it fixes all bugs known to date, and will be followed by another update soon. Note that it requires 2019.2.9f1.
     
    JKURNIA, DMRhodes, patrickk2 and 5 others like this.
  23. lessthanthreewizard

    lessthanthreewizard

    Joined:
    Oct 27, 2019
    Posts:
    16
    No no thank you no need to add it ahah, Now that the update is out that should fix the issues i've been having. Thank you again :)
     
    reuno likes this.
  24. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Any plans to support an LTS/stable release? The 2019.xx series are all either alpha or beta versions. Also looking at performance reports every single instance of the 2019.xx editor is slower than the 2018.xx or 2017.xx versions of the editor.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @JamesArndt > No, the 2019.xx series is not just alpha and betas. 2019.3.x is still in beta (technically release candidates, but well...), but 2019.2.x is very stable, and very much not an alpha or beta. In all my benchmarks at work we've found 2019.2 to be much faster than 2018.x, but I'd be happy to see any data regarding that, I'm very much into editor performance these days, I'm very curious!
     
    JamesArndt likes this.
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Runtime performance is better in 2019.x in many ways, but there's an editor performance bug in 2019.2.0 - 2019.3.x and 2020.1.0a01 - 2020.1.0a16. It's fixed in 2020.1.0a17+. Hopefully it will also be fixed in 2019.4 (LTS).
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @TonyLi > I've ran into the bug you mention before, but thankfully none of the custom editors in the engine seem to be affected by it, even the bigger ones. Let's hope it gets fixed soon :)
     
  28. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    Not sure if this has been asked but in the 2d scene you can play local coop, could that be changed to play coop in the 3d scenes?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Bonzotaz1 > Absolutely. I don't copy all examples so they have an equivalent in the other "D", but unless explicitely specified otherwise, all features work in both 2D and 3D.
     
  30. TechSinsN

    TechSinsN

    Joined:
    Apr 12, 2014
    Posts:
    121
    @reuno ah perfect, thanks a lot!
     
    reuno likes this.
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    I've just pushed v1.6.1 to the Asset Store. This minor version just fixes a lightmap asset that was still around and shouldn't have been, and fixes a bug that could cause the Welcome Window to spit errors on import. Nothing major or breaking, but it'll be cleaner that way :)
     
  32. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Ask and you shall receive.
    https://forum.unity.com/threads/performance-overview.735185/page-2#post-5368833

    Peter77 does an outstanding job working with Unity testing out new editor versions and older editor versions. His data showed very clearly performance regressions in the Editor and I believe builds from 2019.xx editor versions vs. the 2018.xx editor versions. The latest LTS release that is not in beta or alpha is 2018.4. It is the version Unity recommends for projects that need long term support, stable features and bug fixes. In other words, the editor version for most serious projects. That's why I asked...why not support the recommended editor version?
     
    Last edited: Jan 24, 2020
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @JamesArndt > I'd say it's hard to consider a test ran on a single machine, on a single OS, a single project, ignoring GPU performance, and between 2018.1.9f2 and 2019.2.0f1 (considering there have now been 18 subsequent updates to 2019.2) as absolute proof that performance is significantly worse. Not trying to defend Unity here, or implying that this test is bad, but when I meant data I meant a bit more than that. I wish I could share the data I have, but it'd probably be breaking NDAs and stuff.

    As a user I've found performance in Unity to be very project specific, and each update will make something a bit faster and something else a bit slower. Or sometimes it's just all worse and welcome to 2019.3. In any case, I'd recommend running your own benchmarks in your own context maybe and deciding for yourself? But I guess this is all a bit off topic :)
     
  34. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    What I can say is that from 2019.2.0f1 to 2019.2.4 or .5 the performances, bugs and crashes were absolutely terrible for my project. All of that improved A LOT with each upgrades.
    The actual 2019.2 version is extremely stable

    2019.1 and .2 version aren't alpha or beta. They are tech stream versions. Means they are stable and added new technologies.

    From my understanding as a very humble Unity dev, the people buying assets from the store usually are not (in majority) going to stuck to the LTS version, a lot of us are pleased with new techs and improvements that can make their work better, faster or both.

    A studio that doesn't need the asset store because they are developing their own systems will I guess stick to the LTS version until release.

    On top of that Top Down Engine can work on previous Unity versions with some handy work. I'm not sure if it would work on 2018.4, but like that I think all the Unity tools it uses were added in 2018.X
     
    bml likes this.
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Yeah I didn't mention it this time (it's been discussed previously) but it's relatively painless to import in 2019.2, and port back to 2018.4. It's mostly about resolving package dependencies, quite doable.
     
  36. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    I see that there is a CharacterFallDownHoles2D ability, and was wondering if anyone had an idea how to fake falling through a hole in a 3D level.

    For the ball runner game I am working on I want to just place "(fake) hole" prefabs on the ground instead of designing and placing objects with actual holes in their meshes.

    Now I do understand, why there is no 3D version of that ability, but I still wanted to try my luck on the off chance, that any of you guys have any tipps on this issue.

    I really appreciate any input or pointers to where I can look further into this.

    Thanks in advance and best regards,
    Patrick
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @patrickk2 > It'd be pretty much the same logic in 3D than in 2D.
     
  38. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello @reuno!

    Thank you for your swift answer! I see, so it comes down to creating an animation that looks like the character is falling? I will look into that.

    Thanks again and best regards,
    Patrick
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @patrickk2 > I don't know, it depends on what you want it to look like. But as far as the engine and the logic is concerned, it'd be the same as in 2D. How you want it to look depends on you and your game's art direction, there are infinite ways of doing it.
     
  40. judemcenth

    judemcenth

    Joined:
    Feb 27, 2016
    Posts:
    13
    If anyone has used a 2D pathfinding system for the engine I would greatly appreciate it if they share the details here. thanks
     
  41. ImPrankster

    ImPrankster

    Joined:
    Jan 25, 2020
    Posts:
    4
    i created my own NPC using autobuild AI character 2D but my Character kept floating around, i didnt set any movement or animation to move it. and my player and camera r all working properly.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @judemcenth > I have, what exactly are you looking for? Have you looked at the 3D example? It's pretty much the same logic when working with 2D.
    @ImPrankster > Have you tried checking the documentation? Have you tried comparing with other demo characters? What was the result? If the issue persists don't hesitate to contact me via the support form, and provide exact repro steps, I'll be happy to help.
     
  43. ImPrankster

    ImPrankster

    Joined:
    Jan 25, 2020
    Posts:
    4
    my problem solved by copying the demo Level and refactor it but i really hav no idea why this bug happened
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ImPrankster > I'm glad it's working now, thanks for letting me know. If you ever reproduce it, please send me more info on what you did via the support form and I'll gladly have a look.
     
  45. judemcenth

    judemcenth

    Joined:
    Feb 27, 2016
    Posts:
    13
    Hi, I thought pathfinding isn't possible in 2D?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @judemcenth > It's not something that is built in into Unity, or in the engine, but you can use external libraries that do that. Most of them will implement some form of the A* algorithm. This one is great, for example.
    And from there it's pretty much like the 3D example, as mentioned before.
     
  47. judemcenth

    judemcenth

    Joined:
    Feb 27, 2016
    Posts:
    13
    thank you, i've been trying to figure out how to implement it to the engine but i didn't know where to start; i will take a look at the 3D examples.
     
    reuno likes this.
  48. lobsterhat

    lobsterhat

    Joined:
    Jan 26, 2014
    Posts:
    14
    I'm trying to use the new functionality that allows for playable characters to be added directly to the scene and I'm running into an issue where all characters are being controlled from the start. I'm also using the character swap functionality and after I make my first swap, control is limited to one character. I'm sure I'm screwing up one of these. Anyone else have this problem?
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @lobsterhat > As explained in the documentation, "Note that this ability is dependent on normal character instantiation by the LevelManager."
    You'd need to modify the way the swap manager works to support scene characters. I can add that to the todo list if you want.
     
    lobsterhat likes this.
  50. ImPrankster

    ImPrankster

    Joined:
    Jan 25, 2020
    Posts:
    4
    Hey another question, how can i call my own function while the player gotHit? i noticed a OnHitDelegate but that made me end up using a
    using static MoreMountains.TopDownEngine.Health
    and it did not work, can u give a example on how to use the OnHitDelegate in another gameObject?