Search Unity

Combat Framework

Discussion in 'Assets and Asset Store' started by username_unity_of_my, Aug 29, 2016.

  1. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    What I meant was where do you set what player prefab is chosen in multiplayer - so each real person playeing the game can use a different model/character setup.
     
  2. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    You set player prefab in PhotonScene script player prefab field.
     
  3. mendoman

    mendoman

    Joined:
    Nov 24, 2017
    Posts:
    3
    Hello, and thank you for an amazing product. I had time to test it a little yesterday, and it has everything I hoped for and more. Still, in my game I have planned couple of companions, so I probably need some more AI power, and I've had my eyes on Emerald AI 2.0. I was wondering how hard would it be to use with your Combat Framework? ( Sorry for silly question, but I'm still really new with Unity )
     
  4. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    I haven't worked with Emerald AI.
    Here's few pointers:
    - implement IGameCharacter interface so it can interact ( react to hits, triggers etc... )
    - you can copy IGameCharacter methods from NPCScript ( and derived scripts )
     
  5. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    I'm, really amused of this asset!
    5 stars are granted....

    What about Swimming ? :)
     
  6. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Thank you!
    I'll implement swimming sooner or later. I dont know when though. Its not hard to implement as its hard to make/get good swimming animations. Same goes for almost every feature.
     
  7. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    More than swimming,
    I was wondering, how can l add extra-animation (like grab from ground, open chest, open door... cut trees and so on) :)
     
  8. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Create new trigger. Look at the current triggers, see how it goes and and implement your own.
    Just note that in the next update I'll add automatic trigger/action creation tool.
    Keep a eye on my youtube channel - I'll upload trigger creator tutorial video.
     
    Lagunajam and MaximilianPs like this.
  9. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    I Really like your videos, but when you need some quick reference it's a real mess.
    Maybe it's time that you think about a PDF file or some sort of it.
    nevermind I've found it ... here. (Feeling Dumb [On] :confused: )
    Assets/_CombatFramework/doc/CombatFramework.pdf

    I've been also able to setup the NPC (pretty easy it's in Tools menu).
    but I'm not able to inflict damage, the AttackSweepCapsule is pretty large but it still play "missing sound" and didn't inflict any damage... any advice?

    Also, any chance to have the mouse cursor hidden and locked on the center of the screen? ;)
     
    Last edited: Feb 13, 2018
  10. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    In SCENECONTROLLER object there is a script SceneControl.
    There you can enable/disable cursor and lock it in center and pause, adjust game speed etc..

    Regarding npcs, have you tried increasing hit distance?
    Did you chage sweep body layer ?
    If you have more problems contact me on email and we'll try to figure out.
     
  11. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    I'll check every point, In case I'll write an email, thank you :)
    Cheers!
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I am interested in this author's other asset called Dynamic Obstacle Avoidance. Does anyone have this? If so, does it work with 2D in XY plane also?
     
  13. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    48
    so... Instead of one unfinished asset, you decided to do two?
    I think you're moving in the wrong direction. You do not want to finish your assets and do not want to integrate with other assets. choose something one.
     
  14. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    I don't think he will abandon the Combat Framework project... also 'cause I'm waiting for swimming ^_^
     
  15. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Dont worry, all that is in new asset will be in CombatFramework, Im implementing stuff right now and you can expect updates ( multiple, I will not do it at once ). I did it just to have cheaper version.
     
    MaximilianPs likes this.
  16. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    About the Swimming, IMHO, you could create an upgrade I'll purchase it without any problem :)
     
  17. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    First I need to implement firearms, covers, generic triggers etc.. from new asset then we'll see what's next ...
     
  18. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Did you notice any heavy FPS drops?
     
    Last edited: Mar 1, 2018
  19. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Where ?
     
  20. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    anywhere, you your demo scene, where the are the robots, but also on my scene. I'll investigate on it.
     
  21. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Update: after nVidia's driver update lag is gone ... looks like.:confused:
    You should also consider the possibility for implementing "Mount" (I think about horses) :)
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have to voice a major concern. While this asset looks really good and has a lot of great features, the performance is the worst I've seen of any third person controller. I recently tried this again in my Wii U game and got results so bad I had to double and triple check to be certain the results were real.

    First, I was getting about 9 fps in the 3rd person blacksmith demo so I went through and reduced texture sizes, removed the background mountains, re-built the nav mesh, which seemed very odd, and even removed the NPCs. At that point then I was getting 30 fps. Better, but still not good. So, I decided to just copy over the character to my previous test dungeon scene to see what performance I could get. For relative comparison I have tried this same dungeon scene with both Ootii and Opsive controllers on a UMA 2 character and I get 60 fps. With Combat Framework I get only 30-31 fps. I'm sorry, but a 30 fps drop just by switching third person controllers is absolutely insane. There is something horribly wrong in this asset.

    I really encourage you to do some serious bench-marking against your competitors and figure out what's wrong and fix it. I could accept a few fps difference, but 30?!!! No.
     
  23. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Holycow, so I was right when I tough that there was a seriously frame drop. :eek:
     
  24. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    I was extensively profiling asset and I get around 100fps on blacksmith demo ( VSync off and with deep profiling).
    Most expensive are npc calculations ( depends how many npcs there are - I have a demo with 200 npcs - around 60 fps on i5 6400, GTX970).

    Also when you test, please test on empty scene with only ground, character controller and / or npcs.
    And please , when you report 9fps, then can you look at profiler and say what is the chokepoint - my scripts or something else?

    Here is empty scene with only player ( no profiling on, VSync off ):


    Here empty scene with player and npcs ( no profiling on, VSync off ):



    Here's test scene with 200 npcs:


    Can you please contact me because im very interested why this results you get.

    Just to repeat - I used i5 6400 and gtx970 which is a mid range pc I think ( cpu at least which is important for asset ).
     
    Last edited: Mar 30, 2018
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @username_unity_of_my With a much more capable CPU and GPU you are probably not going to notice an issue. I'm going to be using Opsive's controller because it performs a lot better so I don't think I have any time to profile this for you. My suggestion would be to do some bench-marking on much lower spec systems and do the same tests with a competitor's product such as Ootii or Opsive.
     
  26. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    I just wanted to say that I released new update with improved ledge and trigger system, added trigger creator and generic triggers ( among other things ).

    Examples of creating custom triggers:


    Another video on how to create custom triggers on player and npc:
     
    MaximilianPs likes this.
  27. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Cool do we have NPC factions/teams now? Do grey cat and this kit integrate somehow?
     
    Last edited: Mar 30, 2018
    MaximilianPs likes this.
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Sorry to disappoint you, but I own this package and had very high hopes for using it for my games. I informed the author of the problem because I would hope that he would take the time to improve his asset for everyone's benefit.
     
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm sorry, but you clearly didn't read my original post. I ran this on the Wii U. I am not a troll, but you sure are sounding like one. Stop attacking me.

    [EDIT]
    I will add that if you continue to harass me, I will report you to the Unity staff.
     
    Last edited: Mar 30, 2018
  30. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    At the moment with a full set-up scene, 12x12 km, with trees and grass, I'm about 70FPS, just the player no NPC.
    I could say that I'm pretty satisfied at the moment... ;)


    About the sound, did you have any tricks to play different sound based on the textures?
    'Cause I've sand, grass, dirt and stones, and I'm looking for some easy way to play different sounds without placing thousand of hidden boxed all around of this huge map. :rolleyes:

    Also, there is sync issue, 'cause the if the first step is ok, the second one will be always played too early.
     
  31. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Well, about the footsteps, you can move step events in animation clip so that it is synced better.
    Also you can put some kind of footsteps mask texture and throw ray , find uv and get pixel on that position to play footstep sound based on that - it really depends on your use case, if there is lots of different footsteps variants I guess its better to use texture - otherwise ground colliders.
    I think you can get uv from mesh collider if I remember correctly - look into that.
     
    MaximilianPs likes this.
  32. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    Yes, i plan to implement all from gray cat into cf. I'll get to making teams eventually. Its just lots of work.
     
    MaximilianPs likes this.
  33. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    ... look where? o_O

    In sum, I guess, on my splatmap there are about 5 textures, plus water.
    I also guess that I could assign a default sound for dirt and grass, and then use a collider for specific areas like roads and stones, but it will be an huge work.

    I've found this scrap of code, but I'm not so advanced in c# :oops:
    https://answers.unity.com/questions/147282/detecting-what-parts-of-the-terrain-was-hit.html
     
    Last edited: Apr 4, 2018
  34. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    There is nothing on the unity forums, web etc. on getting ground pixel ? :(
    Try look from here: https://docs.unity3d.com/ScriptReference/RaycastHit-textureCoord.html
    You can throw ray in LeftFootDownEvent and RightFootDownEvent methods.
    Im speaking from head, but I think you can throw ray on meshCollider and get uv, then get pixel on that uv.
     
  35. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Ok I'll try to search and do things...
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    You might want to save yourself some time and effort and try this inexpensive package.

    https://www.assetstore.unity3d.com/en/#!/content/63066

    It should work for what you're doing and it's very easy to use.
     
    MaximilianPs likes this.
  37. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Yep, it's working very nicely, thank you :)
     
    magique likes this.
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I did some more testing and I found at least one of the specific reasons for performance issues. The demo character is the Challenger asset and it comprises 65,074 tris. That's a hefty model. So I reduced the polys down to a reasonable amount and ran the controller through the dungeon scene with no AI and I get 60 fps on the Wii U. So that's very encouraging actually.

    I will try some more testing now with AI added in.
     
  39. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    After further testing, as long as I keep my character poly count down and remove ragdoll physics then it all works smoothly and very performance friendly even on the Wii U. I apologize for my earlier evaluation that there was a big issue. I would definitely suggest that you use some much lower poly count character models for player and AI for your demos. It can give a very poor impression when testing on mobile or low-end consoles.
     
  40. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Yes, you are right.
    When I testing on mobile I replace all materials from standard to mobile and replace models.
    I should've left mobile testing scene in package.
    Although on my Samsung s7 default blacksmith scene works around 60 fps but on lower perf devices ( like samsung a5 ) it drops to 15 fps.
    So, yes, replace materials and models and also remove DEBUG_INFO macro when releasing.
    I'll probably create mobile scene demo in one of next updates.
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Where can I remove this?
     
  42. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Edit/Project Settings/Player - Other Settings
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    In Scripting Defines? If so, there isn't anything there so nothing to remove.
     
  44. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Then you dont have to remove it.
    It gets created when you click on Tools/Combat Framework/Setup Project Requirements
    - along all inputs, axis, layers etc ..
    Its just additional debug messages and asserts
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Ah, OK. I never ran that. I just imported the whole package including the project settings.

    [EDIT]
    But then I copied it over to another project and only copied in the relevant project settings. So that's probably why it wasn't there.
     
    Last edited: Apr 13, 2018
  46. Nikodemus

    Nikodemus

    Joined:
    Nov 28, 2014
    Posts:
    32
    When can we expect the gray cat to be part of the combat framework and is it possible to get your hands on a beta?
     
  47. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    I cant say exact time, all I can say is that I finished implementing ranged weapons on player, created few more creation, adjustment windows ( weapon, equipment). I need to test with npcs and photon, polish and its done.
     
  48. Anhella

    Anhella

    Joined:
    Nov 18, 2013
    Posts:
    67
    before i purchase this asset.
    can you make a third person shooter player/ enemy shooting player game with Combat Framework asset?
     
    Last edited: May 4, 2018
  49. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Ranged combat is coming in next update ( unless you want shooter with bow and arrow ).
    Currently is melee combat oriented.
     
    Prefab likes this.
  50. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    68
    Will the ranged combat update also include the cover system? Will this update be also added for the AI so that they can fire and use cover?