Search Unity

  1. Going to #UniteBerlin? Bring a buddy & get 25% off the 2nd ticket! More info here.
    Dismiss Notice
  2. Famed game designer and creator of The Sims, SimCIty, and Spore is looking for a 3D artist to join their team. Join the challenge.
    Dismiss Notice
  3. Unity 2017.4 has arrived! Read about it here.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. We've opened a new World Building sub-forum to faciltate all your world building discussions! Drop in and ask any ProBuilder, ProGrids, or PolyBrush questions.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Deftly - Flexible Top Down Shooter System

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

  1. javier11om

    javier11om

    Joined:
    Apr 27, 2014
    Posts:
    24
    Hi, I want to use Deftly for a mobile project, I can get it working with touch but I was wondering how hard would it be to implement a left joystick for move and rotation(joystick moves left & character faces and moves left), and right joystick for rotation and shooting(Seems like typical top down zombie shooting controls), do you have plans for having different control setups? And if not, can you suggest a way to go about it, sorry my programming skills still aren't that great and in the Move() function I know it takes into account the camera position so it might be more difficult for me, Thanks for any help in advance.
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    You can probably handle it, the control setup for InControl basically does that. You would mainly need to adjust the inputs to be handled from the touch interface instead of InControl, have a catch for if the R Stick is in the deadzone then the character looks in the direction of the L Stick and configure firing to be on/off based on the same R Stick deadzone.

    Direct mobile support is low on the priority list at the moment, I want to address other primary stuff before getting into supporting mobile officially.
     
  3. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    I was just wondering if the price of the asset will increase once it is out of beta? Also will their be any discounts comming soon lol
     
  4. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    It was just in the Cyber Sale over turkey day weekend so no sales are planned right now. I do plan to move the price up once its out of beta but that is a ways off - really set back recently with my MIL in the hospital for basically all of December I haven't had much time to work on it but that should pick up to normal patch schedules after the holidays.
     
  5. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    Oh okay, might as well pick it up now!
     
  6. Nothnless

    Nothnless

    Joined:
    Oct 10, 2014
    Posts:
    38
    Thought about it, but couldn't purchase with no mobile controls.
     
  7. Xaphan

    Xaphan

    Joined:
    Sep 12, 2014
    Posts:
    4
    Just some info that I ran into while dealing with the Demo scene MainDemo:

    Getting the following warnings. It looks like it has to do with the pooling solution and maybe the shooting of the weapon (which makes sense to pool the bullets). Using Unity 5.3 fresh project, fresh install. Advice?

    Deftly.Weapon:OnTriggerEnter(Collider) (at Assets/Deftly/Core/Weapon.cs:261)Deftly.Weapon:DoMeleeDamage(Subject) (at Assets/Deftly/Core/Weapon.cs:363)Deftly.Subject:DoDamage(Int32, Subject) (at Assets/Deftly/Core/Subject.cs:498)Deftly.Subject:set_Health(Int32) (at Assets/Deftly/Core/Subject.cs:100)Deftly.Subject:Die() (at Assets/Deftly/Core/Subject.cs:424)Deftly.StaticUtil:Spawn(Object, Vector3, Quaternion) (at Assets/Deftly/Core/Internal/StaticUtil.cs:53)UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)The referenced script on this Behaviour (Game Object '<null>') is missing!

    Deftly.Weapon:OnTriggerEnter(Collider) (at Assets/Deftly/Core/Weapon.cs:261)Deftly.Weapon:DoMeleeDamage(Subject) (at Assets/Deftly/Core/Weapon.cs:363)Deftly.Subject:DoDamage(Int32, Subject) (at Assets/Deftly/Core/Subject.cs:498)Deftly.Subject:set_Health(Int32) (at Assets/Deftly/Core/Subject.cs:100)Deftly.Subject:Die() (at Assets/Deftly/Core/Subject.cs:424)Deftly.StaticUtil:Spawn(Object, Vector3, Quaternion) (at Assets/Deftly/Core/Internal/StaticUtil.cs:53)UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)The referenced script on this Behaviour (Game Object 'Point light') is missing!
     
  8. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    I'm still tracking down why the first one pops. It should be sorted it in the next patch. The second one is a test script I forgot to strip off of the lights on one of the explosion prefabs. You should be able to just remove the missing behavior and it goes away.

    Are you having problems beyond the demo scene or specific demo prefabs?
     
  9. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    146
    Huh?! No mobile controls for a top down shooter... "low on the priority list"...wtf!
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    I think that's fair enough. I'm using Deftly in a desktop/webplayer project with gamepads using InControl (with keyboard/mouse as fallback), and it works great. I'd rather Deftly focus on top down shooter-specific features and leave input device support to assets like InControl that are dedicated to that purpose.

    I may be in the minority, however, given that more than one person seems to be looking for mobile controls to be natively built into Deftly. So from a purely marketing perspective it's probably very worthwhile to move it high on the priority list.
     
  11. DeanMarquette

    DeanMarquette

    Joined:
    Feb 10, 2015
    Posts:
    146
    I can agree looking at it from your perspective as a desktop developer. But to kind of equate it to a mobile developers perspective it would almost be like not having mouse and keyboard controls. Which, if the asset is not intended for mobile that’s fine. My only thing is this… I may be wrong but here’s how I see it. Only one platform uses mouse and keyboard so everything else is touch. I would argue that commercially the majority of builds are for mobile platforms. There are probably 5 people in the whole community publishing on consoles so I would through gamepads in with desktops. Most hobbyist are building for desktops or publishing to one outlet (Steam), everything else is mobile. Even the Unity services are for mobile (Ads, Analytics, Everyplay, Performance Reporting etc...) Almost the entire showcase on Unitys home page is on Steam (1 outlet) or for mobile. Sorry, I just think that complete projects like this one should look at virtual controls as vital as a keyboards.
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    Good points! I can't argue with that.

    FWIW, since Deftly works with InControl, I don't think there's any roadblock to using touch with Deftly (other than having to buy InControl if you don't already have it).
     
  13. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    You make good points. I don't argue that it would add value to the product and i am fully aware and understand that not having mobile support built in now does isolate some developers but it is a deliberate choice. I have limited mobile hardware right now and have not published on any mobile platforms so I don't want to build in support for them and deliver a substandard product for the developers. That would make everyone unhappy.

    When the product is 1.0, stable, and I am in a better position to do so then I will proceed to built in mobile support but that time is not now and hence I am straightforward with everyone by indicating it is "low priority" so as to minimize buyers remorse here.
     
  14. coolbird22

    coolbird22

    Joined:
    Mar 20, 2014
    Posts:
    37
    Working on my prototype lately and I felt the need for twin stick animation blending where the left analog stick controls the movement of the player, while the right analog stick controls the direction the player looks at. Asked about it on the gamedev sub on Reddit and someone told me about Deftly. Played the demo and I feel it did what I needed, but only to an extent. The animations don't look well animated, and the strafes don't look like strafes. I'm an animator by profession and I can fix em up if you want me to for free.
    As for the movement, the entire player character rotates to look at the mouse direction at all times, and this is what kills the feel of a nicely animated character. Check out the Angry Bot demo project by Unity, where the lower body rotates only when the mouse moves out of its' range. The problem with Angry Bot is that it was done before Mecanim was introduced, and uses legacy animations, not to mention the code is a bit hard for me to understand :(
    Either way, the point of this comment is not to diss Deftly. The demo looks nice and could potentially help many in their projects. If only I knew how to get this upper and lower body mask working...
     
  15. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Using a mask is pretty easy, just make a an Avatar Mask and tell the layer to use it. In the default Animator Controller for players in Deftly you'll see it being used. The hard part is making Animator Controllers that are custom fitted to your animation set. Unfortunately the animations that are included in Deftly aren't very good and I'm still working on the blending and stuff to try to smooth out transitions and stuff. I didn't have much available originally and the guy I hired to make the locomotion animations really oversold his skills and underdelivered.

    The way its set up is by default is with a Lower Body layer, Upper Body layer and any Override layers you need (for reloads, weapon swap, etc.)...

    shot_160111_073152.png

    The basic setup here uses 2D Freeform Directional in the blend tree and there aren't any 'turning' animations. The Character will turn to match the target direction and the animations respond to directional inputs. I'm working on an advanced controller and Root Motion to help with this but can't really ship anything without owning the animations to support it. If you want to work something out here your can pm me your details.
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    While we're on the topic of animation, it would be nice to be able to override Subject's animation with our own for non-Humanoid enemies. I haven't dug to deep into Subject yet, so please let me know if it already handles this.
     
  17. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    If anyone is using 5.3.1 note that you need to download its latest patch as there seems to be some broken things in the regular 5.3.1 that lead to a bunch of invalid AABB errors.
     
  18. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Intellect Awareness Update

    Intellect can now be configured with Field of View and various Ally Assistance settings to make them respond to threats more intelligently. The editor appearance of the script has also been updated.

    shot_160120_101549.png

    Now you can configure an AI to do stuff like
    • "If there is a provoked ally anywhere in your Sight Range, you should attack his target as well"
    • "If there is a provoked ally in your Field of View and have a clear Line Of Sight, you should attack their target"
    • "If there is a provoked ally but you do not have a clear Line Of Sight, you don't care about his problems"
    This allows simplistic stealth game mechanics and improves the overall quality and general feel of the Intellect class.

    The Editor gizmo appearance has also been updated:

    shot_160120_104646.png

    Once I do more testing and squish any bugs in doing so I'll push an early version to the beta group. It's possible that this version update may not go to the store until 5.3.2 is released (and change the min version) but if it's taking too long I'll revert the code that requires 5.3 and keep the min version at 5.2.x.
     
    Last edited: Jan 20, 2016
    TonyLi and hopeful like this.
  19. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    'Standoff' distance
    Intellect can now be specified to use a Standoff distance to maintain a minimum gap between themselves and their target. Applies only to Ranged weapons.





    0.7.0 rc1 is available in the Beta Group
    Check your email if you are in the private beta group, 0.7.0 rc1 is now available for download.

    Here's a link to the latest Release Notes.
     
    Last edited: Jan 25, 2016
  20. Saturn-Ent

    Saturn-Ent

    Joined:
    Jan 25, 2013
    Posts:
    59
    UI seems broken. Installed into fresh project, and when ticking off god mode and infinite magazine, the health still keep staying at 999, and the weapon image does not change when you swap weapons, oh and the bullet&magazine is also 999.
     
  21. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    On the '/Canvas/Character UI' object in the scene drag the Subject that you want data on into it's "Subject" slot. Such as your main Character. Otherwise it doesn't know what you want information on.
     
  22. Saturn-Ent

    Saturn-Ent

    Joined:
    Jan 25, 2013
    Posts:
    59
    Yeah I just figured it out my self. Lol oh well. Thanks for the quick reply anyhow :) !
     
  23. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    I added high level API documentation to the website. I'll probably move to Doxygen if there is enough demand for better API documentation after version 1.0.

    Online API Documentation (WIP)

    Version 0.7.0 is being submitted to the Asset Store tonight. Min version will be 5.3.2 since Unity 5.3.1x has a few serious breaking bugs and I still get a lot of emails about them so we're just moving forward to avoid more backwards compatibility problems. Get in contact if you are version locked and need assistance getting things working on an older version.

    Patch Notes
     
    Last edited: Feb 3, 2016
    TonyLi likes this.
  24. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    0.7.0 is live on the Asset Store
    Patch notes, etc linked above.

    Let me know if you run into any issues!
     
    Last edited: Feb 11, 2016
  25. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    487
    could you please allow us to get the older version i m not really happy with update it's no more compatible with old unity version , second i like the previous demo more than the current one which strangly the gui is not showing the correct weapon and for some unknown i have two players at the same time
     
  26. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Sure, when I get a chance I'll dig up 0.6.9 and send you a link to a package. I would suggest not staying on an older version during beta, though. Out of curiosity, what are the main things keeping you from moving to 5.3?

    You can also use 0.7.0 on older unity versions (with some trivial code changes to non-core scripts) but some Unity bugs in 5.2 were causing major issues which drove the min version up to 5.3. I noted this a few posts up. Most of the changes between these two versions were bugfixes and improvements. If you're not seeing the UI work right check to make sure it is assigned properly, as mentioned a few posts up.
     
    blackbird likes this.
  27. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    487
    handheld/console are behind the pc version in terms of versions
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    Hi Lane -

    I'd like to suggest a couple features:
    • Nonhumanoid Intellects (maybe just expose a few events or overrides for custom animation)
    • Damage types (e.g., robots aren't damaged by poison projectiles but take extra electrical damage)
    These -- along with constraining multiple players to the camera frustum or zooming out to encompass them all (which I believe is already in the works) -- would really help eliminate the need to directly modify Deftly scripts. Thanks!
     
    LaneFox likes this.
  29. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Non-Humanoid characters are in. I have a working example using the Unity Mine Bot model from UT's AngryBots. Since Mecanim's IK requires Humanoid to use IK you won't have any IK built-in for non-humanoids. Instead you'll specify a GameObject to mount the weapon to and it will operate normally from there. Should feel pretty familiar.

    I can post a build on the beta group if you want to check it out.
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    Awesome! That would be great! I'll check it out this weekend.

    Any news on zooming out the camera to encompass all targets, or constraining players within the frustum? Zooming out might be a better general-purpose solution. Single-player games could use it to temporarily zoom out to highlight non-player targets such as mission objectives. Then I could extract my ugly hack from the Camera script. ;-)
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    Speaking of modifications to Deftly code, I implemented damage types. The Trello board has an "(Elemental) Damage Types" card, but I can't figure out how to vote for it. Please consider me a "me too" for that card. I'd love to eliminate my customizations so I don't have to reapply them every time I update Deftly. Alternatively, if you could delegate damage to an external method, I could just hook in my own scripts without having to modify Deftly scripts.

    Briefly, I wrote a DamageTypeModifier script that I can add to Subjects. It has a list of damage types and how they scale damage values.

    I also added a damage type field to Projectile.cs. Projectile.DoDamageToVictim() looks for a DamageTypeModifier on the victim. If it exists, it runs the projectile's damage type through the script to get a modified damage value before applying damage to the victim.

    This lets me make robots invulnerable to poison gas, take extra electrical damage, etc.
     
  32. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    I'm looking at an automated way to do the frustum constraints right now. It's basically creating runtime colliders, setting them to a layer and configuring the collision matrix so the frustum only hits the Players layer (or whatever suits your needs). I've used the technique before without any real hiccups, so I'm trying to do the same with more automation.

    For zooming and stuff I haven't got into it yet and still assume a static camera distance but I'll look into making toggles and different methods for handling player spacing. Definitely a useful feature.

    Yeah that works. I was planning on passing all of the damage through some stat calculators/formulas anyway so damage types will probably go in at the same time. Basically I planned to have a table of elements that you can define in the Options menu which you can add on Projectiles and Subjects in another Foldout that will work as a multipliers when processing damage.

    I'm still rolling around how Perks and Abilities might all play into it and how I can best structure things. So far, doing it right seems to get a little messier on the front end than I would like so it hasn't seen much daylight. These more RPG style damage systems can work a lot of different ways and get pretty robust.
     
    hopeful and TonyLi like this.
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    For my part (other customers may disagree), on this project I'm less interested in deep RPG stuff and more interested in the strategy of using different weapons against different opponents -- "uh oh, it's an ice monster; better switch from my freeze ray to my flamethrower."
     
    hopeful likes this.
  34. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Yeah, I agree. Will get something in that keeps it simple.
     
    TonyLi likes this.
  35. Nekotika

    Nekotika

    Joined:
    Jan 31, 2014
    Posts:
    16
    Hi, I've seen your kit at the store and it looks good. I'm interested in integrating the weapon/projectile part, since I've already a player controller for movement and camera system of my own. I wanted to know if it is feasible to use only that part or if the scripts are heavily dependent on each other.

    Thanks!
     
    LaneFox likes this.
  36. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    The scripts are pretty modular. I didn't want them too dependent on each other so that doing what you're describing would be easier but there is a degree of interconnectivity. Subject is the main thing you'll need. It manages the weapons, character stats, etc while PlayerController will receive inputs, apply locomotion and update Mecanim params. Subject doesn't require PlayerController (although I think it adds it automatically by default if you choose Player type).

    You could add your own PlayerController pretty straightforwardly if all you want to do is take over locomotion/movement with your own scripts, basically just send events to Subject when you want to swap weapons and such. Subject doesn't do any locomotion as that is outside of its scope.

    You can always post/email for support if you have code or setup questions.
     
  37. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Frustum Constraints via runtime mesh generation are working. This means you can have two or more players going different directions on the screen and it will not allow them to walk outside of the screen space. The confine meshes show below are vertical instead of aligned with the camera angle which means the boundary collider wont crush your players into the ground but simply push them back into the screen space instead.

    This is running super efficient and works great so far.

     
    TonyLi and 600 like this.
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    7,724
    That's great! I'm really looking forward to testing this out in my four-player game. It seems like it'll be much better than my current hack of simply zooming out to encompass the players as they spread out.
     
    LaneFox likes this.
  39. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Once I get it polished up I'll push another version to the beta group. Looks solid thus far, so probably by the weekend.
     
  40. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Uploaded another version to the beta group which includes the Frustum Constraint system.

    Also Added Intellect Wandering!



    The little guys can Wander in any range either inside a locked origin (shown) or have it follow them around so they could wander anywhere on the map.
     
    hopeful and TonyLi like this.
  41. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    487
    beta group does that mean you will release another version which we need to buy later again ?
     
  42. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Nope, there is a small google group where I post builds to let a few users test new things before I submit to the asset store.
     
    blackbird likes this.
  43. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Patrol is now working for Intellect's. You can optionally pause at waypoints for a period of time.

     
  44. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,015
    Can you use Intellect system to create ennemies shooting the player with fire weapons ?
     
  45. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Elemental damage is on the roadmap, hoping to get it in the next patch.
     
  46. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    487
    any chance lane to upload the previous version so i can use it with unity 5.2
     
  47. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Check your PM's.
     
    blackbird likes this.
  48. nproject

    nproject

    Joined:
    Jan 16, 2015
    Posts:
    68
    When the next update ?
    I'm looking forward Intellect Wandering
    Hehehe
     
  49. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    5,625
    Aiming to submit the update on monday so it will probably be approved and available some time mid/late next week.
     
  50. Nekotika

    Nekotika

    Joined:
    Jan 31, 2014
    Posts:
    16
    Great then. I'll buy it soon and integrate it in my game :)