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

    windslayer

    Joined:
    Jul 29, 2014
    Posts:
    14
    I make the demo scene generate my character and it works in the demo scene...

    I have no idea how to start debugging that... Could you pls give me some pointers?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @windslayer > Then as I said in my previous message, you likely have a layer issue in your scene, and specifically on your ground collider. Fixing that layer will solve your problem.
     
  3. windslayer

    windslayer

    Joined:
    Jul 29, 2014
    Posts:
    14
    Thanks. I did not have ground collider before. I added it and it works now.
     
    reuno likes this.
  4. hammeron

    hammeron

    Joined:
    Dec 17, 2013
    Posts:
    8
    Just bought it. Is there any plan to support Unity 2021 LTS out of the box? SRPs are the core now but post-processing effects don't work after converting to URP.
    However, my real problem is that I can't access UnityEngine.Rendering.Universal to port the feedback scripts. URP is installed, I converted assets and the game is running. Still, I can't access the URP API only in a project where I imported the TopDown Engine.
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @hammeron > 2021 LTS is already supported out of the box, so I'm not sure what exactly you mean? URP is a different thing, and despite having been around for years now, it's still definitely not the primary choice for most studios. So the demos will remain on the standard RP until that changes (if it ever does), as it's still the common denominator between RPs.

    That said, render pipelines only impact the demos, the engine itself is just gameplay logic, and that will work equally on every RP you decide to pick.

    As for feedbacks and post processing, the engine comes with dedicated feedbacks for SRP, URP and HDRP, so there's no need to port anything, it's already done. You can see a full list of feedbacks at http://feel-docs.moremountains.com/list_mmfeedbacks.html

    Finally, regarding access to the URP API, that's probably because you're trying to do it from an asmdef that doesn't have access to them. Putting your scripts in a better suited folder will solve your issue.

    I hope this will answer all your questions!
     
  6. hammeron

    hammeron

    Joined:
    Dec 17, 2013
    Posts:
    8
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @hammeron > Ha good point! Porting in that context meant creating a Volume and adapting them to your RP of choice, not porting the entire code. I'll update that!
     
  8. anysom

    anysom

    Joined:
    Apr 21, 2022
    Posts:
    2
    Hello Renaud and forum :)
    First of all thank you very much for an awesome engine and nice documentation.
    I do have an headache that I hope you can help me with or point me in the right direction. It is regarding animations that transform XZ position.

    So I have a model, and I have downloaded some animations from Mixamo. I have set up a 3D character following the guide here https://topdown-engine-docs.moremountains.com/how-to-create-character.html, so my character has a root empty gameobject, and as an immediate child thereof if have my 3D model.
    Now I have added a running animation that has a green light in Loop Match for the Root Transform Position (XZ) in the animation inspector. This works perfectly.
    Then I have added a sword attack animation where during the animation the character sort of leaps ahead and slashes with a sword. This causes a problem because the animation moves the model during the animation. If I check on "bake into pose" for the Root Transform position (XZ), then character sort of slides back to the original position after the animation is done. If I don't bake into pose, then the model and the root gameobject dont have their positions synced when the animation is done.
    So my question is, how would the animation sync the position of the root gameobject when it moves to model during the animation. Or is it just not possible to have animations that do this? I can see in the example project with the Loft3D and Colonel projects, that it doesn't seem like any of your animations actually move the model.

    I hope you or someone else the forum can help me clear it up or give me some pointers :)

    All the best
    Anders

    Edit: I guess that setting the actual model as the root character object, insted of nesting it inside an empty gameobject, and then have the Character composition on the model, would do the trick. Then I would lose the nice abstraction between a model and a character, but other than that it should be okay, right? :)
     
    Last edited: May 3, 2022
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @anysom > There's no support for root motion in the TopDown Engine, by design :
    upload_2022-5-3_8-2-16.png

    It's possible to add that feature of course, but there's no such thing in the engine at the moment.
     
  10. anysom

    anysom

    Joined:
    Apr 21, 2022
    Posts:
    2
    Alrighty, thank you very much for your reply. Then I will focus on animations without root motion :)
     
    reuno likes this.
  11. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Is it possible to rotate the camera and make the controllers respond respective to the camera rotation?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Dante20011 > Yes, it's possible :
    upload_2022-5-5_17-6-24.png
    (taken from the abilities docs)
     
  13. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Awesome!! Sorry for the bother!! This is a great asset!!! Glad I got it :)
     
    reuno likes this.
  14. windslayer

    windslayer

    Joined:
    Jul 29, 2014
    Posts:
    14
    Hi Reuno, I'm trying to create a game with 200~500 characters around at the same time. However the fps dropped significantly to 1`4 fps with huge physics and 'other' cpu usage.
    Can the engine's built-in character support this many characters somehow? Or should I implement my own?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @windslayer > How many characters you can have in your game depends on (extremely simplifying here) : your hardware, what your AIs do, how they do it, and the context in which they do it.
    The engine comes with various ways you can setup AIs, but if you're referring to the Advanced AI system, it's not designed for 500 enemies at once on your average computer. That would require a different architecture, typically a horde manager, and simplified actions.
     
  16. windslayer

    windslayer

    Joined:
    Jul 29, 2014
    Posts:
    14
    Hi Reuno, I'm using visual studio as my IDE. I extended the projectile class to make my own projectiles, however sometimes the IDE does not recognize my class is based on monobehaviour. On further inspect it seems that it does recognize the MMPoolableObject at all.

    My scripts compiles fine in the unity editor with no errors. I've not edited the scripts provided by more mountains, only extending them.

    Do you know what might be causing this? screenshot-20220513-074433.png
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @windslayer > Yes, Visual Studio is causing that. Sometimes deleting your Library folder and letting Unity rebuild will solve the issue. Switching to a more robust IDE (I'd recommend Rider) will also solve your problem.
     
    windslayer likes this.
  18. windslayer

    windslayer

    Joined:
    Jul 29, 2014
    Posts:
    14
    I implemented my own character controllers for enemies, not based on top down controller. I can get ~1000 enemies with no issue. However I'm only aiming for the 200~500 range.
    As I develop further I noticed how much I wanted to use functions provided by moremountain's character and top down controller. Do you think I can still utilize the character component, just without the advanced AI stuff, to achieve my goal?
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @windslayer > You can try, but it's likely going to be more costly. I'd recommend benchmarking and deciding whether or not it fits your target.
     
  20. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Hello! Sorry to bother again. Is it possible to stop the AI Character from moving until its looking correctly at the player? I've enemy ships and I want them to ONLY move according to where they look AND want them to rotate very slowly. I can think of ways to do it but maybe there's a single checkbox I missed?

    Thanks in advance!
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Dante20011 > That'd be something you'd define in your AI Brain, with a state in charge of rotating, then one in charge of moving, for example.
     
  22. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    hi, i installed the latest Topdown 2.4 into a new 2021.3.3f1 project and got some warning signs. Is it OK to ignore this ?



    upload_2022-6-5_19-47-17.png


    Assets\TopDownEngine\ThirdParty\NavMeshComponents\Editor\NavMeshAssetManager.cs(44,61): warning CS0618: 'PrefabStage.prefabAssetPath' is obsolete: 'prefabAssetPath has been deprecated. Use assetPath instead.'
    Assets\TopDownEngine\ThirdParty\NavMeshComponents\Editor\NavMeshAssetManager.cs(46,69): warning CS0618: 'PrefabStage.prefabAssetPath' is obsolete: 'prefabAssetPath has been deprecated. Use assetPath instead.'
    ImportFBX Warnings:
    Mesh 'Backpack' has 336 (out of 336) vertices with no weight and bone assigned (they will be assigned to bone #0 with weight 1). The list of vertices: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and so on...

    File 'MMExplodude@Stomping' has animation import warnings. See Import Messages in Animation Import Settings for more details.

    File 'MMExplodude@Stomping' has animation import warnings. See Import Messages in Animation Import Settings for more details.

    File 'MMExplodude@Running' has animation import warnings. See Import Messages in Animation Import Settings for more details.
     

    Attached Files:

  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    mickeyband likes this.
  24. tonymedd01

    tonymedd01

    Joined:
    Feb 7, 2018
    Posts:
    19
    is there a way to remove "OnPostGenerateGradleAndroidProject" ? because the build apk siez is 750Mo for just a small scene...
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @tonymedd01 > There are no calls to OnPostGenerateGradleAndroidProject in the entire codebase of the TopDown Engine, so I have to admit I'm not sure what exactly you're referring to.
     
  26. tonymedd01

    tonymedd01

    Joined:
    Feb 7, 2018
    Posts:
    19
    Hey again, i thing the problem is MMfeedbacks, i was working on unity 2019.4, build was ok no huge size , but recently i upgraded the project to unity 2021.3 and i started facing this problem, i saw in assets store that mmfeedback has changed to feel since 2021, can you confirm that mmfeedback causing this problem on unity 2021.3 and updating it willl solve it ? i dont want to downgrade the project it can produce more errors and i really dont have much time for the moment,i need to deliver the protype of the game soon, btw the topdown engine is really awsome and very helpful and saved me alooooooot of time , well done :)).
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @tonymedd01 > There's nothing in Feel or MMFeedbacks that calls OnPostGenerateGradleAndroidProject, or causes builds to be bigger than they should be. I don't think your issue is related to the engine. Also updating Unity won't have any impact on the assets in your project, they don't get updated unless you do that manually.
     
    tonymedd01 likes this.
  28. glebglebglebglebglebgleb

    glebglebglebglebglebgleb

    Joined:
    Oct 19, 2021
    Posts:
    2
    Hello. Not sure if it was asked but...i have problem with 100% gpu load. Limiting fps does not helping. upload_2022-6-11_0-44-53.png

    Unity fps microgame, for example, dont have such problem. upload_2022-6-11_0-39-56.png

    Any ideas what can help me?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @glebglebglebglebglebgleb > The engine doesn't do any rendering, it's a gameplay framework, it runs on the CPU.
    For GPU, it'll be the same as in any other project, and you'll want to learn how to optimize your assets, shaders, textures, drawcalls, post processing effects, etc to match your budget, established in the context of your target device(s). I would also recommend learning how to use the profiler, you'll get better data than via the stats panel or your windows device manager.
     
  30. glebglebglebglebglebgleb

    glebglebglebglebglebgleb

    Joined:
    Oct 19, 2021
    Posts:
    2
    Alright, tnx for advise!
     
    reuno likes this.
  31. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    40
    Hi Renaud, the ammo max quantity is set to 500 default, however if I keep collecting ammo crates of any gun, the ammo count can exceed the max 500 default. Is this a bug? Also would you be able to point out where do I change the max 500 default figure? Thanks
     

    Attached Files:

  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @AKAGT17 > That's defined on your WeaponAmmo component.
     
  33. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    40
    Hey thanks Reuno I manage to change the default max default ammo of 500 to a figure I want, however, when I continue to pick up a lot of ammo crates of that particular weapon, it can still add more than the max ammo defined in the Weapon ammo component. Is it a bug?

    test.jpg
     
    Last edited: Jun 16, 2022
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @AKAGT17 > No, it's not, there's nothing enforcing any limit, that's all. If you have more questions, please use the support form, thanks.
     
  35. RanWangGanem

    RanWangGanem

    Joined:
    Jun 20, 2022
    Posts:
    1
    Can TopDown Engine create mini-maps?
     
  36. Tretiak

    Tretiak

    Joined:
    Jan 22, 2018
    Posts:
    49
    Hi will be there some improvement in weapon handlng in 3D ? equiped weapons in colonel weapon attachment style works because model is not part of equiped weapon (in weapon attachment). When I want to have model as part of weapon (whole weapon including models, scripts etc. like in Loft3D, where you equip weapons) then I have to parent weapon attachment under character model game object, which works, but this is causing jittering of weapon when I have cursor above my character. Overall this part of framework (weapon handling for 3D) is not that improved as other parts. Would be great if there is one impoved generic way for good weapon handling for 3D.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Felinsky > "this is causing jittering of weapon when I have cursor above my character" there's a dead zone you can tweak for that. As a general rule, although it's quick to setup, coupling your model to your logic definitely isn't ideal, and the model or model enabler approaches should be preferred, they will give you more flexibility.

    I'm not sure how else to improve 3D weapons, there are already 3 different ways of setting them up, that covers pretty much every production cases I've seen (weapon and logic coupled, model, model enabler). If you have suggestions I'm open to discussing them :)
     
  38. Tretiak

    Tretiak

    Joined:
    Jan 22, 2018
    Posts:
    49
    @reuno Thanks for advice. In my project (topdown 3D) im creating game with inventory system where player can pick various weapons and store them in inventory and then equip them. Thus I wanted to put all weapon logic and model into one entity and not in character models with model enablers. I already tried dead zone but it behaved a bit strange, but I did it another way to work good: I have weapon attachment object and weapon position offset (in projectile weapon script) set to 0,0,0 and just make offset to model (renderer) object and IK objects. This is now working good without jittering
     
    reuno likes this.
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    I'm glad you got it working, thanks for letting me know.
     
    Tretiak likes this.
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    Good news everyone, there's a new major version of TopDown Engine out on the Asset Store!

    v3.0 introduces typed damages, as well as a generally much more versatile damage system, which will let you setup elemental damage, damage resistances, damage over time, and much more. And of course it comes with a lot of new features, improvements, bug fixes for all known issues, performance improvements, and more. Plus it should be a fairly painless update, even for a major one. If you decide to update, make sure you have a backup to roll back to if things go wrong though!

    Here are the full release notes :

    - Adds DamageTypes, and the ability to define and apply TypedDamage (via DamageOnTouch, Hitscan, or direct API calls)
    - Adds support for damage over time (and interruption of damage over time), damage that forces a condition, and damage that applies movement multipliers
    - Adds damage resistances, letting you define resistance (or weakness) to damage types, setup effects in reaction to damage types, etc
    - Adds the DamageOverTimeInterrupter picker
    - Adds the PickableDamageResistance, which lets you create, activate or disable a resistance on the picking character
    - Adds a health/damage focused demo, KoalaHealth, with cannons throwing fireballs, ice balls, poison and electricity, and showcasing the various effects you can create by combining the new features above, as well as pickable shields and antidotes
    - Adds the Push3D ability, extracting code previously handled by the 3D controller into a full fledged ability, complete with its dedicated animation parameter
    - Adds physics powered projectiles, for use with both 2D and 3D weapons, and an example of it with the LoftGrenadeLauncher demo weapon and its LoftGrenade projectile
    - Adds the SetTransformAsTarget AI action, letting you set any specified Transform as your AI Brain's Target
    - Adds the MMF Player version of the TDE Floating Text feedback
    - Adds the AppearDisappear class, that lets you create appearing and disappearing objects, complete with complete control over timing, feedbacks, and character proximity controls. Adds an example of it in the KoalaDungeon demo scene
    - Adds the PickableAbility class, that lets you enable any ability on pick, and an example of it in the Colonel demo scene
    - Adds an option to CharacterButtonActivation to prevent/allow jump while in button activated zones
    - Adds input system support for all modes of ButtonActivated
    - Adds AvoidNullAim option to WeaponAim3D
    - Adds a KnockbackForceMultiplier to the Health class, letting you customize how much knockback a specific character should receive from damages
    - Adds a ImmuneToKnockbackIfZeroDamage option to Health
    - The InputManager now exposes a public CameraAngle property
    - DamageOnTouch now exposes a trigger filter for (optional) finer control over when damage should trigger
    - Projectile now exposes its SourceWeapon
    - Adds an option to MeleeWeapons to use existing DamageOnTouch areas instead of having the weapon generating them
    - Adds options to CharacterOrientation2D - when in FacingMode:Weapon to flip on weapon angle, mouse position x, or reticle position x
    - Adds an optional SpawnDelay to the LevelManager
    - Adds a RequiresPlayerCharacter option to both 2D and 3D CinemachineZones
    - Adds an option to the ProximityManager to require a ProximityTarget be set
    - Adds a Space{World,Local} option to all dash abilities
    - Reduces the amount of assembly definitions used by the engine
    - Adds a safety check to WeaponAim
    - All Dash abilities' DashStop methods are now public
    - AIActionRotateTowardsTarget3D now forces ForcedRotation on the Orientation ability and restores it on state exit
    - Updates default Physics2D settings to ReuseCollisionCallbacks:true and AutoSyncTransforms:false for a (small) performance boost
    - WeaponAutoShoot now runs on LateUpdate
    - Adds InputSystem support to WeaponAim, CharacterSwapManager, InventoryInputManager
    - Adds extra safety check to CharacterHandleWeapon
    - Adds an extra null check on InputManager's OnApplicationFocus
    - The Magnetic component now automatically sets triggers on 3D colliders too
    - Improves mouse aim in 2D
    - Brings WeaponAim's main camera reference back to the base class
    - Weapon's UpdateAnimator sequence now happens at the start of ProcessWeaponState, only if needed
    - Adds HasInstance check to WeaponAim3D and CinemachineCameraController
    - Fixes a bug that could cause one too many pool to be created when using projectile weapons with non mutualized pools
    - Fixes a (harmless) typo in CharacterPersistence
    - Fixes AI Brains not resetting properly on auto respawn if nested on separate nodes
    - Fixes a WeaponModelEnabler bug that could result in a weapon model remaining active after switching to a null weapon
    - Fixes a bug in CharacterStun that could lead to characters being stuck in the Stunned state if stunned repeatedly
    - Fixes erroneous distance computation in AIDecisionDetectTargetLine2D that could let a target be detected from the back
    - Fixes a bug that could cause the LaserSight to be off by one frame in 2D when flipping
    - Fixes walk and run ability sfx not stopping correctly when pausing the game
    - Fixes a bug where camera rotation wouldn't be supported by the input system version of the InputManager
    - Fixes a bug that would prevent the secondary handle weapon ability to process the axis threshold correctly
    - Fixes a collision matrix setting that would prevent pushables to interact with pressure pads
    - Fixes a bug that could cause shared projectiles to not have their owners reset correctly
    - Fixes the order of min/max damage on the Colonel hitscan weapons, and fixes a tooltip typo
    - Fixes indentation inconsistencies across all classes
    - Refactors Health and DamageOnTouch (better inspectors, more atomic methods)
    - Renames Health:SetInitialHealth to InitializeCurrentHealth to be more reflective of what the method does
    - Renames Health:GetHealth to ReceiveHealth
    - Health and Damage are now expressed as floats (from integers) for more flexibility
    - Moves the Health class from the Core folder to the Health folder
    - Tweaks obstacle detection frequency for the Rifleman and Poolable Ninja demo characters
    - Fixes a typo in a Character class' comment
    - Removes disabled Colonel prefab from the MinimalSandbox3D demo scene
    - Updates MMTools, MMFeedbacks, Nice Touch, Inventory Engine and MMInterface to their latest versions
    - Removes the Tilemap 2D extras from the asset, they were causing too much confusion, especially now that Unity has different versions of it for each version of the editor. You can of course still grab them from Unity's repository and add them to your project.
     
    Tretiak, Aelcyx, rakutankuma and 4 others like this.
  41. jim00

    jim00

    Joined:
    Feb 1, 2015
    Posts:
    57
    I'm having problem for adding Particle effect to 2D Projectile (Bullet).

    In 2D bullet, I just drag a particle (as a child) into a KoalaGunBullet but when I shoot, the bullet come out with the attached particle.

    The funny things is when I do the above same thing in 3D, the bullet shoot out with the particle.

    What did I do it all wrong?

    upload_2022-7-24_3-49-51.png
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @jim00 > "when I shoot, the bullet come out with the attached particle". Yes, that would indeed be the expected behavior. If you attach a particle to a bullet, it will be attached to the bullet. You can see examples of that on most projectiles in the engine's demos.
     
  43. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    Would zooming in , changing the angle, etc negatively effect the engine in this fashion?
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @mickeyband > As long as you keep a top down perspective, you can absolutely change the zoom and camera rotation angles.
     
    mickeyband likes this.
  45. Tretiak

    Tretiak

    Joined:
    Jan 22, 2018
    Posts:
    49
    Hi, dont know if you consider it as important, but would be great if in MMDamageTakenEvent you would use affected Health script rather than affected Character script, since there is null pointer if health script doesnt have character script attached, but if character script is needed you can always get it via health script parameter, and event it self is more related to health than character. Just my two cents so I dont have to do workarounds :D
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Felinsky > That's a very good point, I'll do something about it, thanks for pointing it out!
     
    Tretiak likes this.
  47. NAIYOUJ

    NAIYOUJ

    Joined:
    Jun 27, 2022
    Posts:
    1
    This is a very good Engine,But I want to use 'input syatem' instead of the original input ,When I open the minimalscene3d_ InputSystem_ The multiplayer demo scene was set according to the document. It was found that the mouse could not control the aiming. Is there a way to solve this?
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  49. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    Would a POV from this angle be top down?

     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @mickeyband > Top down action games are a genre, it's not so much about the exact angle, it's about core mechanics. Do you aim in 3D, or on a plane? Does the camera rotate up/down, or is it on a fixed rotation? etc. These are the questions you should be asking to define what genre the game you want to make belongs to, and that will determine the tools you'll need.
     
    mickeyband likes this.