Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Deftly - Flexible Top Down Shooter System

Discussion in 'Assets and Asset Store' started by LaneFox, May 27, 2015.

  1. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    You bet! If you would, when/if you post feedback just ping us both in whatever thread. Easier to stay in the loop :)
     
  2. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    I will do that.
     
  3. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    Deftly 1.1 was just released on the asset store.
     
  4. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    @guavaman @TonyLi @Steve-Tack

    Unity 5.5.0f3 (64-bit windows)
    Deftly 1.1
    Rewired 1.0.0.110
    =====================

    (1) Created a new project with Deftly and Rewired. From the Deftly menu installed the Rewired co-op example.
    (2) Build options (only turned off splash screens) and just built for standalone desktop players (win/mac/linux) since that is all I was interested in.

    Built and tested the Deftly 1.1 coop example with Rewired and it works great. For my testing I used the Microsoft XBOX-360 and Microsoft XBOX ONE controllers. For each game I selected two players (using the XBOX-360 and XBOX ONE) for playing so I could test their movements and weapons. Have not tried any tests with flight controllers or tankstick yet but that is next on my list.

    From a game player perspective I cannot tell the difference between all three (win/mac/linux) platforms because Rewired does such an outstanding job of native input handling.

    Thanks @LaneFox and @guavaman for this Deftly/Rewired integration.

    Wish list .... Control Mapper integration so game controls can be remapped within the game.
     
    Last edited: Jan 22, 2017
    guavaman, TonyLi and LaneFox like this.
  5. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    Sometimes when the player moves in diagonal the feets are sliding (the animation is to slow). i occurs most time when running for example backwards + left or right if you look at the blend tree in the animator. i think its a problem with the blending if it plays the backward + left or right animation. i use the included animator controller. nothing changed. how can i fix this?
     
  6. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    https://forum.unity3d.com/goto/post?id=2911642#post-2911642
     
  7. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    Thank you! =)
    Another question. I have some Monsters which have no weapons. I use your Animator Controller and you have splitted it into 2 halfs (upper /lower body). It would be nice, when the weighting of the upper body will be only turned to 1 if they attack. Is this possible in an easy way?
     
  8. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    I found a problem with the Enemy Spawner. If i setup it in a scene (i follow exact the docs) then i cant drag anything into Destroyable Avatar and Position fields. If i click on the circle to open the explorer it shows only the Assets Folder. In other words i cant drag scene objects into the fields. It would be nice in a further update if you can integrate a working setup of the new enemy spawner as a template.
     
  9. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    It needs a prefab in that field, you can't use scene objects. Position is the same, these spawners should be kind of blackbox-like.
     
  10. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    1: Get it to work but everytime i trigger the spawner it spawns a bunch of enemys :) Something is going wired. It doesnt check the max of enemys. I have subject & enemyspawner both on the same object.
    2: How can i enable the weighting for enemy upper bodys only on melee attacks so they use the full movement animations on other states.
     
  11. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    288
    Hi! I have a problem. I'm trying to add Vehicle enemy, and it behaves very unnatural, like moving towards target while rotating its body. I know that is a NavMeshAgent thing, but it is important to be able to have vehicle enemies like tanks or robots. How can it be done?
     
  12. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    1: Is it possible to knockback enemys?
    2: How to add footsteps?
     
    Last edited: Jan 29, 2017
  13. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    1. Projectiles are just prefabs, you can put any script you want on that prefab that does whatever you want, like add force on collisions.
    2. There are some various tutorials online that explain how to do footsteps sounds. There are several ways.
    It's probably going to look weird any way you do vehicles with the tools at hand.. The AI is designed for bipedals/creatures so big vehicles are definitely not going to behave 'naturally' unless you make some adjustments and rules in the code to help deal with the cases where it looks weird.
     
  14. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    @LaneFox

    Just a general question about the multi-player demo. Is there a reason why you only have 3 players rather than 4 players in your demo? Since you are Gauntlet fan I would have expected 4 players. Is this a limit of InControl because I know Rewired does not have such a limit.
     
  15. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    No reason, there is no hard limit.
     
  16. irshad-y-pathan

    irshad-y-pathan

    Joined:
    Feb 25, 2013
    Posts:
    7
    I change my animation regarding I select the different gun & animation are change at a time of player. It rigged with all gun or we have to set separate player for each gun. And How To Character face direction Movement for Joystick ???????
     
  17. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Deftly is setup to use IK with no gun animations and keep it all procedural, but you can create a traditional Animation Controller to utilize animations if you wanted to.
     
  18. irshad-y-pathan

    irshad-y-pathan

    Joined:
    Feb 25, 2013
    Posts:
    7
    Ok Thanks But face Direction Movement How Can Use Like This Game : https://play.google.com/store/apps/details?id=com.maniraam.shooter
     
    Last edited: Feb 21, 2017
  19. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
  20. irshad-y-pathan

    irshad-y-pathan

    Joined:
    Feb 25, 2013
    Posts:
    7
  21. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Im sure it's possible, since they seem to be using deftly in the video.
     
  22. irshad-y-pathan

    irshad-y-pathan

    Joined:
    Feb 25, 2013
    Posts:
    7
    But How ????????
     
  23. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    By doing what developers do: Developing.
     
    Rich_A, shamsfk and StevenWendel like this.
  24. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    Is the KIT limited to a plane, or can the player climb stairs or terrain heights?
     
  25. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    You can do move on varying heights but the character is designed to aim/shoot flat and straight.
     
    Andreas12345 likes this.
  26. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    Thanks i buy it :)
     
  27. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    When i use InControl i get an error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Deftly.InController.get_InputChangeWeapon () (at Assets/Deftly/CoOp/Core/InController.cs:82)
    3. Deftly.Subject+<InputLoop>c__Iterator0.MoveNext () (at Assets/Deftly/Core/Subject.cs:296)
    4. UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    I have it installed InControl with the Window -> Coop Install.
    Solution for that?

    I like to use the controls in MainDemo and in co-op
     

    Attached Files:

  28. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Does the coop demo work correctly?
     
  29. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    Yes coop runs super with InControl.
    Only SinglePlayer not.

    maybe i doing something wrong, is there a more detailed information to add InControl to SinglePlayer?
     
  30. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Try unchecking the "Manually assign id" box and set the next field to zero. Incontrol uses 0 for the last active device.

    Also make sure you have an incontrol manager script in the scene. Refer to docs for both of those things.
     
    Last edited: Mar 1, 2017
  31. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    Sorry, is the same problem.
     

    Attached Files:

  32. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    You have to add the incontrol input manager to the scene.

    The docs cover the necessary steps. Here's a link to getting started with incontrol, it would be a good idea to get familiar with plugins you plan to use.

    http://www.gallantgames.com/pages/incontrol-getting-started
     
  33. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    428
    OK Super, works now.
    May be this should be a part or hint for the documents in deftly?
     
    LaneFox likes this.
  34. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
  35. BilginSahin

    BilginSahin

    Joined:
    Jul 2, 2012
    Posts:
    45
    I´m trying to setup Rewired.
    Movement & other Controls like fireing are working but the rotation not really smoothly. Thats normaly the mouse movement. its very sluggish and player dont turn like mouse input.
    Steps i did:
    Install rewired, install rewired & coop, new empty scene with normal controls, replaced playercontroller with rewired player controller, added a rewired input manager via windows->integration
    Is there any tutorial how to setup Rewired with Deftly?
     
  36. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    If its responding properly then it's basically working, you just need to adjust the control speed and such on the character to finesse the response and feel of the controls. Rewired may also have built in damping on controls that is adjustable?
     
  37. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    What version of Unity are you using? What version of Rewired? What platform are you building for Windows/Mac/Linux?
     
  38. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,373
    I do not see any difference between turning speed using an Xbox 360 Controller, Saitek P990, or the mouse when using the demo scene.
    1. What controller are you using? You did not mention whether you are using the keyboard or a controller.
    2. Please try the demo scene included in Coop/Demo.
    The RewiredPlayerController has logic to change the aiming algorithm based on whether the player is using a joystick or the mouse/keyboard. If you're trying to move the player using the keyboard and rotate using the right stick on a gamepad, you will get very weird results because it will be constantly detecting a different current controller type.
     
  39. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    507
    Hey,
    Is deftly compatible with puppetmaster?
    For advanced hit reactions and ragdoll deaths
     
  40. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Not built-in, so it depends on how puppetmaster needs to be integrated.
     
  41. valakot

    valakot

    Joined:
    Oct 7, 2015
    Posts:
    14
    Hi LaneFox,
    I like your framework, can you please give any clues how to make player face the direction of movement (horizontal and vertical axis), so that when not in shooting mode character would face the vector of movement but when in shooting mode character would run as default facing the mouse position.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,730
    Just dropping a note that the Dialogue System for Unity now comes with an integration package for Deftly so you can make characters bark, run interactive conversations, and offer quests.
     
    LaneFox likes this.
  43. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    As an update on Deftly, a heavy overhaul is in the works with the goal of improving the existing systems with better code architecture, performance and standard game features.

    • Inheritance based class structure
    • Interface driven communication
    • Strong focus on code decoupling
    • Stats module with effect/modifier support
    • Virtual input module - generalized input so input solutions are easily swapped with zero changes to implementation game code or game scripts. Input calls are mapped in the inspector via dropdowns.
    • Serialized inspectors (undo support)
    • Ability module
    • Many other things I haven't nailed down yet.

    Fundamentally the same hooks will exist and most of the workflow and good things that you all like about Deftly will basically work the same but it will generally scale significantly better, be easier to maintain and much easier to extend/modify.

    So far, working now, the bones are there along with working stats and input modules as described. You can apply and modifiers to any stat which update consistently in real-time based on formulas and the input system can be remapped in the inspector and swap between input solution assets with no code changes.
     
    OG_Jacob and TonyLi like this.
  44. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,485
    For input are you supporting multiple controllers per player? Not just a single controller (e.g. gamepad) per player correct?
     
  45. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    The virtual controller is a class that an input source fills with information. Input source are stuff like InControl, Rewired and Unity Input Manager. So far the idea is you simply swap out input sources and change nothing on the game side. All of the config is connected to a list of input actions/map you can define and the input source fills those actions with input data based on a map.

    The basic control setup will be linked to a standard set of game actions, but you could extend this with your own stuff pretty easily with small changes. If you don't add new actions for the player then it's just a matter of remapping inputs at the source. Guavaman has actually been really helpful looking at the design concept and offering practical feedback.
     
  46. indie_dev85

    indie_dev85

    Joined:
    Mar 7, 2014
    Posts:
    51
    Hi,

    Can Deftly use behaviour designer(Behaviour trees) for handling the AI's of the game?
     
  47. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    I'm actually not sure how BD works exactly so I can't say for sure. However, Deftly doesn't include any special support or integration for BD at this time.
     
  48. ShadowFenix

    ShadowFenix

    Joined:
    Nov 11, 2016
    Posts:
    7
    i don´t know why but the weapons are in the elbow instead on the wrist. 1d572918e8e5192fa7031bee4ac3a88c.png 3c429d8984c9c4de981174e285c49257.png 1d572918e8e5192fa7031bee4ac3a88c.png 1d572918e8e5192fa7031bee4ac3a88c.png 3c429d8984c9c4de981174e285c49257.png
     
  49. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,673
    Can't really tell much from the screenshot of the model, but make sure the Humanoid bones are correctly mapped on your model avatar. The code calls for the hand bone but if it is not mapped correctly in the Avatar then it's never going to get the right bone.
     
  50. ShadowFenix

    ShadowFenix

    Joined:
    Nov 11, 2016
    Posts:
    7
    hi
    i fixed the animation errors.

    however, my characters are spawning on the same spot. how can i fix this.
    "StaticUtil.Spawn(characterPrefabs[selectedCharacter],spawnPosition, Quaternion.identity);" here is the part of the script that spawn the players.
     
unityunity