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

Creating a 3rd Person Combat System - Unity Development Series

Discussion in 'Works In Progress' started by kierenhovasapian, May 22, 2015.

  1. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    UPDATE AS OF 6/11/2015

    I have been working on a Third Person System Tutorial Series - It has been highly requested and Part 3 is dropping now!




    UPDATE #1

    This is the initial movement setup for a combat system. Following videos will implement first combat steps.

    After playing Witcher 3: Wild Hunt last night, I came to my development station and started toying around with a few ideas, one of which was to develop a Batman Arkham Knight styled fighting system. I knew undertaking a large task like this would not be easy, but after prototyping a few ideas, I figured I could get a working demo out and impress a few people. So here is the first video illustrating the basic movement and strafing system.

    I will be posting all of the successes and failures for your enjoyment over this development journey.

    The next challenge is setting up the mecanim combo system, from which I will implement a mecanim syncing system to register and frame sync hits with the opposite reactions - ala Batman Arkham Knight or the New Mad Max Game.



    EDIT UPDATE LIST:
    As of UPDATE #10 I am now working on refined combat mechanics, crossbow implementation, a massive UI update with lock on display, inventory and skill tree.

    What you can expect in the next update:
    - New UI Inventory and Skill Tree
    - Refined Combat Mechanics
    - Shield in Combat (for both enemies and player)
    - More movement with the climbing system.

    BIGGEST, LATEST UPDATE
    [07/06/2015]


     
    Last edited: Nov 6, 2015
    Slaghton, TheNorthridge and gromi7 like this.
  2. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    UPDATE #2
    Part 2 of the Combat System Development Cycle.

    The system now has Jump and Falling Detection systems as well as a rough foot IK system running.

    Next video will start to implement combat moves.

     
    Last edited: May 22, 2015
  3. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    UPDATE #3

    Alrighty, this is Part 3 of my journey to a Combat System in Unity, this has taken me some tinkering but now I have a fully working combat system with a different stance, working combo and cloth simulation on the end of the axe, which is sweet.

    Now I am implementing more combos and starting work on the enemies (hides in the hiding spot), yes the enemies will prove a harder challenge than the player controller, but the main thing that will be difficult will be the syncing of hits reactions of the enemy.

    Wish me luck and I'll see you all in the next video.

     
    Last edited: May 22, 2015
  4. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    UPDATE #4

    I have finished my second system, which is a heavier and slower hit - which in the game will do more damage however be slower to pull off.

    Video will be attached under this update later today. Currently I am working on the enemy AI. Will show off the first prototype enemies in Video #5.
     
    Last edited: May 22, 2015
  5. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    I just wanted to say that this looks really good.

    for hit reaction I think you should check out the MecanimRagdollAnimationBlender.
     
    kierenhovasapian likes this.
  6. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks @dibdab I will definitely check it out when I get to hit reactions.
     
  7. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Update #5
    I have been working on the next update video and it's looking great! I have two working combos, also now Crossbow implementation! You can pull out a crossbow and aim with it. Need to insert firing capabilities. I have also improved movement detection, so you don't have to wait a couple of seconds for the player to start moving.

    Looking forward to showing you all what I have been working on, when the video is live I will also have a working demo on my site you can play with and give suggestions on bugs and what to improve on.

    Thanks for reading and catch you all in the next update!
     
  8. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    305
    Looking good, keep it up. I might need this if it turns out to be better then what i have.
     
    kierenhovasapian likes this.
  9. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Update #6
    Still crunching in development for the enemies, so they'll definitely be in the next update, just uploaded a very early test for you to play on my site.


    Alrighty this is a good update with a better starting movement controller, so the player reacts a lot quicker then what he did before when starting movement.

    Also started to implement a stamina system and a crossbow animset. Just need to finish the crossbow model to allow the player to have something to hold. Need to tweak the aiming system to bring the camera closer while in crossbow mode.

    Added another combo for the Axe Animset.

    Next update should be about the first enemy implementation. Video up in 83mins.
     
    Last edited: May 26, 2015
  10. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks @sowatnow !
     
  11. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    New Video Update!

     
  12. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    UPDATE #7
    ENEMY AI

    This is the first enemy AI implementation. Enemy is still rough, and the hit detection needs work but the basic principles are here and working so now I have a base to build off.

     
  13. unit3ro

    unit3ro

    Joined:
    Dec 18, 2014
    Posts:
    15
    I like the fluidity
    I would like to see the character climb the walls

    a great job so far
     
    kierenhovasapian likes this.
  14. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    New Enemy Update Coming this afternoon!

    Playable test update comes with Video Update #8

    Keep your eyes on the horizon.
     
  15. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Big Update coming soon, I got carried away and designed a few more features:
    • Lock On System in Combat
    • Individual Enemy GUI with Names and Health Bars
    • First Horse Integration
    • Falling States for Enemies
    • Better hit detection and more responsive combat
    • Can now Dodge in combat. - Blocking to come soon.
    Cant wait to show you all the new updates!​
     
  16. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Update #8

    In this update I have introduced Lock on to Enemies to allow easier strafing and also updated the player model.

    Enemies can now pursue you faster and more accurately with new Falling states.

    Enemies now have their own dependent GUI's which show how much health they have and also their enemy type, in this demo's case they are "Thugs".

    Player has enhanced combat movement with the Axe with better animation lineup and better syncing with mecanim to allow more responsive movement - Also Dodging is now implemented to allow faster reactions to evade enemies strikes.

    Feet IK now works a lot better and requires less memory to process - shown from the profiler readout.

    I have also started implementation of Horse riding for faster transport around the game world. [Actual riding coming in the next update].

    ** Please note the frame rate is due to my bad capture software, you can test to see how smooth the game actually is, capping way over the 60fps mark which is great because I can still add heaps and heaps of features and beautiful landscapes... did I mention landscapes... coming in the next few updates I will begin to flesh out the game world to allow for better exploration and begin to integrate more GUI elements into the game as well. **

    As always I will have a link to the most recent demo on my website soon.

    I hope you are liking this project so far, if you have any suggestions or just general feedback please let me know in the comments below!

     
    Last edited: May 30, 2015
    AndreiKubyshkin and XCO like this.
  17. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    This is looking really good. Read that you did a crossbow which is great. How about 2 hand fighting combo? Or shield/sword? That is one thing that is lacking in every 3rd person controller. Everyone does 1 hand sword/gun etc but none do a sword/dagger or sword/shield attacks.
    But keep it up will be interested in the final outcome.
     
    kierenhovasapian likes this.
  18. TheNorthridge

    TheNorthridge

    Joined:
    Jan 4, 2012
    Posts:
    193
    Aww, Man, This looks great! You got a unique Asset on your hands here!

    I really hope you release this on the Asset Store eventually :D

    I hope you add movement skills like parkour in the near future! Magic Attacks too!
     
    kierenhovasapian likes this.
  19. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Update #9
    Horse Riding First Test
    This is the first implementation of horse riding in the combat system.
    A more refined update video will be up soon, with the added ability to get off the horse as well as the horse following the player at a set distance around the map.


     
  20. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    366
    I thought she was going to kill the horse!! I was like noooooo dont do it, the horse is innocent!
     
    kierenhovasapian likes this.
  21. Gherid_lacksGPS

    Gherid_lacksGPS

    Joined:
    Dec 3, 2011
    Posts:
    111
    Just curious, is this a personal project or a system you plan on releasing?

    It's looking great. If you're not familiar with it already, check the horse mechanics in shadow of colossus. Also, being able to call for the horse over a distance would be something to consider, too. Again, great stuff, looking forward to seeing more.
     
    kierenhovasapian likes this.
  22. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks for the feedback @Archania , I will be implementing sword / dagger and sword / magic combinations in the system so you can be fighting with one hand sword and the other with a short dagger or magic. Also I will have a stronger combination for 2 handed combat as well for long swords and pikes. Cheers and hope you stay around for the updates as they come out.
     
  23. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks for the kind words @TheNorthridge , I will be releasing this on the store eventually, once I get into a mocap studio to get more motions that I need to finish the asset. I will implementing a climbing system as well, so keep your eyes peeled on the updates in the weeks to come.
     
    TheNorthridge likes this.
  24. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @XCO haha, that's amazing, I just watched the video again and I kinda made it look like that.
     
    XCO likes this.
  25. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @Gherid_lacksGPS Hi there, Yes this is a system that will go up on the asset store when it's finished. I am just waiting to get into a motion capture studio to get more motions recorded.

    Also check out the next update coming soon (today or tomorrow) the horse follows you around and you can also call the horse from a distance. Thanks for checking this system out and I hope you stay around for future updates.
     
  26. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks @unit3ro , for the character climbing walls, check out one of the new updates coming soon, I will be adding climbing functionality to the system soon.
     
  27. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    How will be targetting system ? it is not clear on your video, Batman like , or Dark Souls like ? or possibility to choose also no targetting and free movement like Blades of Time ?

    Will it include projectile weapons like arbalet, bows ?
    Will it include object throwing like powder bombs or rocks (that we could use to attract some ennemy near us ) ?
    Also it is possible to choose if a shield could block all damage (special shield) or only some amount based on it's defense ?
     
    kierenhovasapian likes this.
  28. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Hi @zenGarden , The targeting system once it's finished will have the option to have free movement and then on button down will lock on to the nearest enemy.

    The system will include a crossbow which can be pulled out on the right hand during combat. (Currently you have to switch to it from the sword state, this will be improved in a future video update.)

    Also get excited because I am implementing a distraction system so you can throw rocks and other objects (which you can pick up off the ground) to bring enemies closer to you.

    Right now, the shield functionality is buggy in my current build, but I am also fixing this up for a future video update.

    I am currently building a complex UI which can handle inventory and skill upgrade points which increase sword damage, magic elements and general health and stamina attributes ~ I'm keen to show that off soon.

    Thanks for the questions and I hope you stay around for future updates!
     
  29. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    As of UPDATE #9 I am now working on refined combat mechanics, crossbow implementation, a massive UI update with lock on display, inventory and skill tree.

    What you can expect in the next update:

    • Horse get on and get off.​
    • New UI Inventory and Skill Tree​
    • Crossbow working (first pass)​
    • Refined Combat Mechanics​
    • Shield in Combat (for both enemies and player)​
    • Horse can be called to you if it's far away.​
     
  30. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Can't to see what you have come up with. Great work so far!
     
    kierenhovasapian likes this.
  31. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    looks great ... i can't wait to see this in the asset store :)
     
    kierenhovasapian likes this.
  32. DefinitionUK

    DefinitionUK

    Joined:
    May 18, 2013
    Posts:
    33
    Hi Kieren,

    Loving what you're doing! I've sent you a PM, would be great to talk.
     
    kierenhovasapian likes this.
  33. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Thanks @sarum ! Hope you like it when it's released!
     
  34. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Hi @DefinitionUK I have replied to your PM and thanks for the compliments!
     
  35. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    BIG VIDEO UPDATE COMING TOMORROW
    What you can expect to see...

    - HORSE System -

    You can now call your horse to you and get on and get off the horse around the map, the horse also can now jump and gallop (sprint).
    - Crossbow -
    Finally the crossbow has been finished with refined aiming and reloading abilities you can take down your enemies from across the map, silently.
    Refined Combat + Finisher Moves
    My personal favorite when you are fighting the last enemy of the group and you defeat him, the camera will turn cinematic and slow down time to witness you beating him in all its glory.
    - Shield in Combat -
    This ones pretty much what the title says you can now use your shield in combat to deflect enemy attacks, until your stamina runs out that is.
     
    macodys and Archania like this.
  36. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    do you have the structure / design thought over? is this all on the same animator controller? or is it a separate logic? (*ok, I see it's states)
    since some would not use crossbow but guns, would not have horse and things like that. so the question is how much is it modular and extendable or separateable.
    i'd also advise focus on walking and combat (and climbing!) but you doing good, hope you can pull it off.
     
    kierenhovasapian likes this.
  37. Jim_West

    Jim_West

    Joined:
    Aug 5, 2013
    Posts:
    47
    Looks really cool, are you using root motion for that or scripted / physics motion?
     
    kierenhovasapian likes this.
  38. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    i already like it unreleased :)
    keep up the good work
     
    kierenhovasapian likes this.
  39. unit3ro

    unit3ro

    Joined:
    Dec 18, 2014
    Posts:
    15
    you can not imagine how happy that makes me to read that, I'll be waiting, because I know you would do incredibly, you are an expert, continue their good work.
     
    kierenhovasapian likes this.
  40. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    Hi @Jim_West all of the system is driven by root motion, makes it easier for blending mecanim. Also trying to setup ragdolls for deaths but they are quite expensive in the profiler.
     
  41. Sykoo

    Sykoo

    Joined:
    Jul 25, 2014
    Posts:
    1,394
    Hey! That looks absolutely astonishing, will be looking forward to this!
    Did you make the character models too?
     
    kierenhovasapian likes this.
  42. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Will you bring a Dark Souls targetting system ? Press one time to enter target mode, press another to release ?
     
    kierenhovasapian likes this.
  43. Cammander

    Cammander

    Joined:
    Jun 2, 2015
    Posts:
    2
    This is really coming along nicely! Not only is the system great, but the updates and the timing of you releasing them are astonishingly fast. I hope to see more from this project!
     
    kierenhovasapian likes this.
  44. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    The new update will be out soon, promise! I have just been super busy moving production studios, so it will be out tonight!

    Thanks for your patience with the updates!
     
  45. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @zenGarden yes! This is exactly how the targeting system is going to work. Right now I am working on a GUI element to show the player exactly what he is locked onto.
     
  46. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @Cammander Thanks for the kind words! Right now I am in a bit of a slow process of hand animating climbing animations - because the motion capture was bit off. So it's going to take some time for that to get finished and get rolled into an upcoming update.
     
  47. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @Sykoo Thanks for the compliment! No, these character models I am using are provided from Mixamo. For the final asset I will be using 100% my own assets - so keep an eye out for that.
     
    Sykoo likes this.
  48. kierenhovasapian

    kierenhovasapian

    Joined:
    Dec 23, 2014
    Posts:
    87
    @unit3ro Thanks!
     
  49. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    218
    Do you have plan to support mobile?
     
    kierenhovasapian likes this.
  50. Cammander

    Cammander

    Joined:
    Jun 2, 2015
    Posts:
    2
    Nice, I love your process and in that everything is dynamic and the animations are so smooth and flow very nicely. Also I sent you a PM if you can check it out that would be great!
     
    kierenhovasapian likes this.
unityunity