Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

[RELEASED] TopDown Engine by More Mountains [new v2.2 : tons of things]

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

  1. alivecat

    alivecat

    Joined:
    Jul 22, 2017
    Posts:
    3
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @alivecat > Thank you very much for reporting this bug, I'll fix it right away. If you find more, please use the support form to report them, thanks!
     
  3. alivecat

    alivecat

    Joined:
    Jul 22, 2017
    Posts:
    3
    Modify FillWeaponWithAmmo method in weaponAmmo.cs (should be line 11,23)
    I made a mistake
     
    reuno likes this.
  4. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    Hi Reuno, I was wondering when I switch the background sound fx off in the options , how come the sound fx can still be heard in the inventory when I select and move things? Is there a way you can guide to fix this by any chance so that it responds to the options SFX on off functionality?
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @AKAGT17 > The inventory engine is a separate asset, it doesn't use the TopDown Engine's sound manager. You'd need to change its sound calls to have them go through the sound manager.
     
  6. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    @AKAGT17 > The inventory engine is a separate asset, it doesn't use the TopDown Engine's sound manager. You'd need to change its sound calls to have them go through the sound manager.

    Ok, But from the perspective of an artist without no programming knowledge, do you think it is achieveable if I use the correct top down engine scripts and connecting things properly such as using the MMTOUCH etc and connect with a MMFEEDBack, Sound and EVENT clicked?
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @AKAGT17 > It's certainly possible but I feel like just modifying the calls would be easier.
    I'll make a note of it and will look into how I can make it easier for you!
     
  8. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    @AKAGT17 > It's certainly possible but I feel like just modifying the calls would be easier.
    I'll make a note of it and will look into how I can make it easier for you!

    Thanks look forward to it:)
     
    reuno likes this.
  9. closethedamndooralready

    closethedamndooralready

    Joined:
    Feb 16, 2018
    Posts:
    6
    Hello!

    Does this asset include any sort of implementation of fog of war?
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @closethedamndooralready > No, right now it doesn't. I have to admit I can't think of a top down action game with a fog of war feature. Would you have examples of that?
     
  11. closethedamndooralready

    closethedamndooralready

    Joined:
    Feb 16, 2018
    Posts:
    6
    Hmmmm.....IIRC Hotline Miami has sort of FOW. By that I mean when action is happening in the Room A other rooms are obscured, dimmed, in other words they might me visible from top down perspective but not possible to see what is happening there....Now that I put everything in words I think this feature might be a subject of another asset
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @closethedamndooralready > Ah I see what you mean! That's fog of war alright :) So no, there's no such feature. You could technically use some of the helper classes in the asset to put it together (binding the appearance of an enemy to a door opening, etc), but nothing systematic. I can add that to my todo list though, I like the idea!
     
    christougher likes this.
  13. closethedamndooralready

    closethedamndooralready

    Joined:
    Feb 16, 2018
    Posts:
    6
    Would be interesting imo. Currently I am on the market for the functional FOW and so far nothing comes up to make me open the wallet.
     
    reuno likes this.
  14. frattapa

    frattapa

    Joined:
    May 30, 2018
    Posts:
    3
    @reuno hi! I've just started using this asset and it's great! thanks for the awesome work :)
    anyway, I was trying to use AutoAttributePlayerIDs for a multiplayer level manager and I noticed that there were no methods called if it was set to true, so I've added in the base LevelManager script a piece of code (see below) at the end of this method:

    protected virtual void InstantiatePlayableCharacters(){}


    I thought that perhaps you forgot to add it so I hope this can help you, in case you plan to update the asset.
    Thanks again, keep doing amazing stuff! ;)

    F

    Code (CSharp):
    1.            
    2. // Automatically assign IDs based on the number of players in game
    3. if (AutoAttributePlayerIDs)
    4. {
    5.     for (int i = 0; i < Players.Count; i++)
    6.     {
    7.         Players[i].SetPlayerID("Player" + (i + 1));// = "Player" + (i + 1);
    8.     }
    9. }
    10.  
     
    septN and reuno like this.
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @frattapa > Oh that's a mistake, looks like a cut and paste went wrong at some point. Thanks for mentioning it! If you find other issues, please don't hesitate to use the support form to report them!
     
    Last edited: Dec 11, 2020
  16. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    Hi Reuno just want to follow up from your last message if you have any updated info on how to tackle this.
    @AKAGT17 > It's certainly possible but I feel like just modifying the calls would be easier.
    I'll make a note of it and will look into how I can make it easier for you!


    Would it be just a simple line of additional code needed for me to add to the Inventory sound player script?
    If so would you kindly advise what to add?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @AKAGT17 > You'd need to replace all direct sound calls with sound events instead, or route them directly through the SoundManager. You can look at how TopDown sounds are triggered for reference of that.
     
  18. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    Hi Reuno, @AKAGT17 > You'd need to replace all direct sound calls with sound events instead, or route them directly through the SoundManager. You can look at how TopDown sounds are triggered for reference of that.

    I have no idea where to start as i'm just an 3d artist , any thing programming is beyond me, unless you type out the script that I need to add/modify ?


    Please help or anyone on this forum as I desperately need the UI inventory sounds to respond to the sound fx toggle in the option screen. Much appreciated:)
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @AKAGT17 > It's not just a few lines to do it cleanly. I've made a note of it, it'll be in the next release if all goes well.
     
  20. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    59
    Hi,
    when i use "GoToLevelEntryPoint" that mean i need move player from current scene to another scene.
    And, the player have a new weapon it founded from current scene. but when use "GoToLevelEntryPoint" player lose this weapon, it seems like (re instate player prefab)

    so, is there anyway to solve this issue?
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @SarhanSoft > To do what you're after you'd need to save your state, load it again. The engine will already let you implement that, but there are no examples. It's high on my todo list though.
     
    SarhanSoft likes this.
  22. johnietop

    johnietop

    Joined:
    Jan 17, 2017
    Posts:
    6
    I have one question are meele 3d weapons able to hit player becasue when i equipped one of my characters with meele sword and changed attacking layer to player nothing happens , even though the character is clearly using weapon
    because animations and everything work, but the player remains untouched?
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @johnietop > Yes, melee weapons can hit the player (thankfully!).
    For example, if you select the LoftSword, and duplicate it (maybe rename it LoftAISword), all you have to do is change its layer (at the prefab/object level) from Player to Enemies, and then, in its MeleeWeapon inspector, under Damage Caused, change the Target Layer Mask to have it target the Player layer.
     
  24. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    216
    I'm not sure if anyone has suggested this feature before, but a great feature to add (would fit nicely into Corgi as well) would be to create a magnetize/attract ability that can be attached to a player (or other object). The concept being that when you move within range of a certain type of object (think coins or some other resource), they automatically get sucked into the player.

    This would be something like the Gathering Swarm ability in Hollow Knight (https://hollowknight.fandom.com/wiki/Gathering_Swarm). Let's say the player destroys a chest and a bunch of coins pop out. Some coins, however, landed in a spiky area that the player cannot go into, so those coins are not accessible. With a cool magnetize/attraction ability, the player can just get close (configurable range) and they get pulled to the player. Perhaps the ability can be configured to attract given types and become more powerful as the player progresses.

    Thoughts?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @ScourgeGames > That's a great suggestion, and one I got a lot via email.
    I think you'll have a pleasant surprise when the next update hits :)
     
    christougher and ScourgeGames like this.
  26. gnerpo

    gnerpo

    Joined:
    Mar 29, 2017
    Posts:
    5
    Hi! Great work your TopDown Engine! I would like to know if it's easy to add 2d lights in the engine.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @gnerpo > If you use URP, that's built-in.
     
  28. gnerpo

    gnerpo

    Joined:
    Mar 29, 2017
    Posts:
    5
    Thank you, that work out of the box or i need to tweak something?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
  30. gnerpo

    gnerpo

    Joined:
    Mar 29, 2017
    Posts:
    5
    Ok, than you very much! You're so kind and responsive!
     
    ScourgeGames and reuno like this.
  31. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    216
    Thanks for the heads up! I cannot tell you enough how cool this and Corgi are. Even my dog Rudy thinks so. PXL_20201018_214902653.jpg
     
    reuno likes this.
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    ScourgeGames likes this.
  33. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    216
    He's my foot heater and buddy when I'm working. Best doggo in the world.
     
    reuno likes this.
  34. gnerpo

    gnerpo

    Joined:
    Mar 29, 2017
    Posts:
    5
    I've installed successfully the URP and done the hint you gived in the documentation but now the UI is gone... Can you suggest a fix for that?
     
  35. gnerpo

    gnerpo

    Joined:
    Mar 29, 2017
    Posts:
    5
    Ok, i've solved the issue setting the KoalaUICamera Rendertype to Overlay and the InventoryCanvas and Canvas Camera Render Camera to "MainCamera" and Sorting Layer to "Above".
     
    Last edited: Dec 22, 2020
    reuno likes this.
  36. ScourgeGames

    ScourgeGames

    Joined:
    Aug 22, 2017
    Posts:
    216
    I was playing around with the Koala rooms demo. Super fun. I'm still dissecting how you stitched it together. There are a few glitches like weapons and dead shells show up above the mask when you go to other rooms. But I love the room system, thanks for adding it.

    I started stitching together some autotiles with tilemap, and I must say that the whole Unity rule tile is just cumbersome for any complex setup. I know this has nothing to do with the TopDown engine. I just wish the documentation was richer for more advanced tiles.

    One of the things I'm wondering, is what would be a best practice for hiding/showing the roofs when you enter a building? Make a collider trigger and use the OnEnter and OnExit events? Perhaps this could also work for dungeons and such to have a pseudo fog of war view? It seems heavy handed, so any suggestions are greatly appreciated.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @ScourgeGames > I agree with you on the Unity rule tile. It doesn't scale well. As for hiding/showing roofs, yes, I'd go with the OnEnter/OnExit events, that's a perfect use case for these.
     
    ScourgeGames likes this.
  38. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    59
    Hi reuno,
    I have to ask about some movement features if possible and how can do it.
    first: Auto run. for player and AI. i know there "Run" feature, but it should click on "Shift" or specific button. but i ask about Run directly no need "walk" because my player and some of AI speed is very high and i try to implement auto run for player and some of AI.
    ==============================
    another thing it just "feature request" and it not very important but maybe become helpful.
    let say AI maybe out of player view (he can't see it) in same time this AI have long range attack and it can see player! so player will git a hit (bullet damage) from somewhere he don't know from where
    my suggestion is just add a UI in the scene on the edge of screen Exactly where enemy direction there. (Indicators)

    i hope you understand what i mean ^^"

    Regards,
    SS.
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @SarhanSoft > There's already an AutoRun feature. You'll find it on CharacterRun.
    As for offscreen indicators, I can add them to the list, for sure.
     
  40. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    59
    Thanks,
    more one thing,
    In the current situation, the player is in the middle of seeing the camera, that's fine, but given some huge maps, it would be nice if the camera moved forward with the aiming point (UIReticle), to give the player a better view of what is in front of him (so that the player is on the edge of the camera) - a feature similar to Included in the game "Hotline Miami"
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    SarhanSoft likes this.
  42. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    59
    yes, i see it. Thanks.
    regarding to Auto run. i set it with player, it work. good!
    but with AI it not working even Demo AI !! i don't make any change in move or run components. same on player same on AI. walk it working, but auto run not working so AI just walking!!
     
  43. septN

    septN

    Joined:
    Oct 29, 2015
    Posts:
    33
    The CharacterPathfinder3D doesn't seem to have any form of avoidance. Is there any extension available for characters avoidance like in unity default NavMeshAgent?
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    septN and SarhanSoft like this.
  45. septN

    septN

    Joined:
    Oct 29, 2015
    Posts:
    33
    Thanks, I just extended the class and got it working. Now my agent is carving the navmesh, and when it needs to move, it will just disable the NavMeshObstacle for 1 frame, do the pathfind, then activate the NavMeshObstacle again. I'm posting my extension class here just in case someone else also looking for local avoidance with their pathfinder class

    Code (CSharp):
    1. public class CharacterPathfinder3DExtended : CharacterPathfinder3D {
    2.         private NavMeshObstacle _navMeshObstacle;
    3.    
    4.         protected override void Awake() {
    5.             _navMeshObstacle = GetComponent<NavMeshObstacle>();
    6.             base.Awake();
    7.         }
    8.  
    9.         protected override void DeterminePath(Vector3 startingPosition, Vector3 targetPosition) {
    10.             StartCoroutine(DoDeterminePath(startingPosition, targetPosition));
    11.         }
    12.  
    13.         private IEnumerator DoDeterminePath(Vector3 startingPosition, Vector3 targetPosition) {
    14.             _navMeshObstacle.enabled = false;
    15.             yield return null;
    16.             NextWaypointIndex = 0;
    17.  
    18.             _closestNavmeshPosition = targetPosition;
    19.             if (NavMesh.SamplePosition(targetPosition, out _navMeshHit, ClosestPointThreshold, NavMesh.AllAreas))
    20.             {
    21.                 _closestNavmeshPosition = _navMeshHit.position;
    22.             }
    23.        
    24.             _pathFound = NavMesh.CalculatePath(startingPosition, _closestNavmeshPosition, NavMesh.AllAreas, AgentPath);
    25.             if (_pathFound)
    26.             {
    27.                 _lastValidTargetPosition = _closestNavmeshPosition;
    28.             }
    29.             else
    30.             {
    31.                 NavMesh.CalculatePath(startingPosition, _lastValidTargetPosition, NavMesh.AllAreas, AgentPath);
    32.             }
    33.             _navMeshObstacle.enabled = true;
    34.             Waypoints = AgentPath.corners;
    35.             if (AgentPath.corners.Length >= 2)
    36.             {
    37.                 NextWaypointIndex = 1;
    38.             }
    39.         }
    40.     }
    • Replace CharacterPathfinder3D with CharacterPathfinder3DExtended above
    • Add NavMeshObstacle to your character
    • Check "Carve", Uncheck the "Carve Only Stationary"

    z9owNZQqy6.gif
     
    Last edited: Dec 24, 2020
    ScourgeGames and reuno like this.
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @septN > Thanks for sharing this, Yes, as far as I know that's the only way to do it with moving obstacles. Feels a bit hackish, but it'll work :)
     
  47. miles616

    miles616

    Joined:
    Dec 17, 2020
    Posts:
    1
    How would I go about using this to make a 2d isometric game? Is that possible?
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @miles616 > If you implement it, it's possible, but there are no examples of that at the moment. It'd be quite a heavy task, the engine really focuses on "regular" top down action games, not isometric.
     
  49. spinape

    spinape

    Joined:
    Feb 1, 2018
    Posts:
    8
    What would be the best way to implement hit effect sprites over top of the models? I’m working in 3D mode with 2D sprites using your top down engine and a face camera script I wrote. Like paper Mario

    my issue is getting the effects. I’ve played around with the MMfeedbacks. Here’s my issue, the feedbacks deal with the objects animator. I want a separate animation that handles effects over top of the characters, rather than replacing them. Furthermore, the parameters on the MMfeedbackAnimation, it sends the value to the animator and triggers the animation, but doesn’t seem to return an opposite parameter once the animation completes. It’s infinitely looping on me and I’m not sure why. I’ve tried the trigger, Boolean, and int methods. They all do the same, trigger the animation, but never call to stop it.

    What do you think is the best way to go about this? Create a special effects animator that handles all character effects or one that’s specific to each prefab? Or you already implemented this and I can’t find it?
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,335
    @spinape > No, there's no "opposite parameter", that'd be an unusual pattern. The way it's commonly done for events like this is you consume the state ("you're getting hit", "a bullet was shot") in your animator, and have it run by a duration defined in your animator.

    Now without knowing what exactly you mean by "effect sprites" it's hard to tell what the best approach would be. I suppose I'd go with particles, not an animator.
     
unityunity