Search Unity

Automatic Acrobatic - Parkour System

Discussion in 'Works In Progress - Archive' started by JohnnyA, Dec 24, 2013.

  1. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Automatic Acrobatic



    First look at a parkour system I have been messing with. The idea is that the system automatically detects the moves that fit within your level geometry meaning you can drop the system into your scene with zero or minimal configuration.

    If an object is too wide it will be dived over instead of vaulted. If its too high for this it will be vaulted on to. Higher again and it will be climbed. If theres some overhaning branches in the way of a vault it wont vault, etc.

    Some other notes
    -----------------------

    It already has key assignments (so you can for example use a keypress to choose between mutliple valid moves). I have an animator on the case to get some animations for fancier moves.

    There will also be the ability to override automatic selection (in case you want a specific move to be used in a specific scenatio) and I'll also be adding a quick time system.

    Will be Mecanim only, and should be pretty easy to integrate in to your own animation controller... if Unity would expose the API it would be automatic :)

    Initial release will work with Character Controller but its written with extensibly in mind so it should be relatively simple to merge with another controller. Over time I'd aim to integrate with popular packs.

    Will include editor gizmos so you can easily see what your character is doing.

    Works in Unity free but supports a few extra features for pro-users (animation curves for collider settings, IK for climbing).

    On Jan 1 I start work on a major update for 2D Platfrom Controller, so the first release of this will either be done before then (probably not), or after thats finished.
     
    Last edited: Dec 24, 2013
  2. MarkrosoftGames

    MarkrosoftGames

    Joined:
    Jan 5, 2012
    Posts:
    442
    thats cool. i bet you will win thingimabobs parkour game challengle.

    one thing i noticed is that when you run off of an edge he sort of seems to walk on air until he gets to the ground. is there dismount type moves implemented?
     
  3. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Its using the Unity provided character controller for the basic walk/turn/etc. The aim is that it can work with any controller, but I might provide another one given Unity's is pretty average.

    But yes, dismounts as well as obstacle to obstacle traversal will be included in the first release.

    - John A
     
  4. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Wow dude that is intense! I couldn't even begin to fathom how you managed to pull this off. And it will detect ANY game object? Do the gameobjects that the player will be able to interact with (vault over, climb, etc) have to be dragged into a GameObject variable in the inspector first? Or does this system just detect is all already?

    Did you use Raycasting or something? I'm fascinated!
     
  5. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Any object with a collider. No dragging of extra components. Although I'm sure if you set out to trick it you could do so. It does aim to err on the side of caution so you might have some areas where you think you should be able to do a move but you can't.

    There will also be the concept of hint objects which will allow you to specify specific moves (or combinations of moves) that happen on a certain object. These will override any check the controller does. If you have complex geometry you might need to go through and add some "Hint" objects.

    At a high -level it uses sphere casts to check that the player can fit through gaps and things, and a combination of calculations and raycasts to determine where to place hands and feet.
     
    theANMATOR2b likes this.
  6. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Similar to previous but showing a little more complex geometry and also the first incarnation of dimsounting objects (needs some more animations :) ):

    **Grr seems my video didn't work... stay tuned.
     
  7. thingimibob

    thingimibob

    Joined:
    Nov 1, 2013
    Posts:
    39
    This is epic!!
     
  8. NutellaDaddy

    NutellaDaddy

    Joined:
    Oct 22, 2013
    Posts:
    288
    This looks like some high quality stuff and I would use as is! What will be the price range for this amazing piece?
     
  9. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    Definitely interested in this. Were you thinking of using some objects as helper objects, a lot of parkour is also bouncing off walls to gain speed to be able to vault a bit higher, or using a small object to raise the level at which a jump starts? As is though it looks brilliant. Great work.
     
  10. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi guys, didn't see that anyone had commented.

    @NutellaDaddy - Price will be around $20. If it grows in complexity it might get a bit more expensive over time.

    @sicga - You can use the hint system to tie together multiple objects in to complex moves. I'm not sure I'll be able to set that up to be automatic. Maybe an in between would be "branching hints" from one object you can transition in to 2 or 3 moves (e.g. based on speed, angle, or keypress).
     
  11. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    @JohnnyA - yes, of course. It would also be relatively easy to do wall walking as well. Anyway, the work you've done is great, the amount of work that would be saved not having to figure out a system from first principles makes a asset like this a must have.
     
  12. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hopefully I can get wall running as an automatic move which can then transition in to other moves without requiring hints. I've got some wall running and cat grab animations coming.

    Will post a new video soon (hopefully within the hour) too.
     
  13. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041

    [video=youtube_share;m6KL1ZxopWc]http://youtu.be/m6KL1ZxopWc

    Another video with a few more features.

    The small issue on the feet position in the sideflip move is simply a settings problem (I have't correctly set the minimum distance to ledge, mainly because I dropped it into the kit 5 minutes before filming).

    - - - -

    BTW What locomotion systems/assets should I integrate this with?

    It is built to be added to any system (theoretically) but to do will require some configuration of animators (Unity doesn't provide API access for this so I can't make it automatic) as well as potentially a small amount of code. To help new users I'd like to integrate into some popular systems out of the box.

    Would love to know what you are using.
     
  14. SEG-Veenstra

    SEG-Veenstra

    Joined:
    Sep 3, 2010
    Posts:
    326
    Just, wow, it looks amazing! Love it!
     
  15. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Just a little bump, not much to report (did add a few more ledge drop actions). Hopefully a new video in a week or so.
     
  16. nitekrawler

    nitekrawler

    Joined:
    Dec 8, 2013
    Posts:
    13
    This is great stuff. Not only will you be responsible for my controller in 2d games but 3d games as well. Can't wait to see the wall running in action ^_^
     
  17. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I have a lot of this working for Nightfall, one problem I'm hitting is how coupled the code is to an animation - for instance my 'vault' animation is used to vault over waist height objects, the problem is that if you wanted to swap out the animation for another it means you'd have to adjust the target matching indexes (at least). Are you taking the same approach?
     
  18. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Yes, although its data not code. I don't think there's any reliable way to automatically determine the matching points for an arbitrary animation. Instead there's an editor for easily setting the matching points (so for example a vault matches hands and feet landing position so it provides a slider between 0 and 1 with two indicators one for hand time and one for feet time).

    There's also options to add new points, change bones, etc.
     
    theANMATOR2b likes this.
  19. Ethaninja

    Ethaninja

    Joined:
    Jan 7, 2013
    Posts:
    277
    Hey is that a character model? Or is it Unity's primitives all slapped together (I wanted to know if that was possible)
     
  20. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    The model in the sample is the Mecanim model from Unity's Tech demos.
     
  21. Montreseur

    Montreseur

    Joined:
    Jan 24, 2014
    Posts:
    49
    Consider this purchased on my end. Any ETA's on the release my friend?
     
  22. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    This looks very nice! I'd pick it up if you want to turn it into a store asset.

    If you're willing to develop it further, features that could be added would include: variable character size; variable maximum jump height, jump distance, and foot speed; event signaling for animations, so different animations can be used; and maybe adding some framework that could facilitate climbing.

    Since I'm going to have to work out something like this myself, I wouldn't mind getting a leg up on it by using yours. :)
     
  23. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    I'm still stuck in the middle of the platfrom asset overhaul. So anywhere between 4-12 weeks. I really can't say.

    All of that is already in except complex climbing and event signalling for animations... for the animations you have to manually adjust a slider to set your points of contact (i..e look at your animation find where the hand point of contact is, slide the hand contact slider to the correct percentage/normalized time).
     
  24. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    This is looking good, especially at $20. But can the acrobatic level of the character be toned down? Like, make it good at jumping over obstacles and get up to walls, but not quite martial artist/olympic performer level of acrobatics when landing on top of things? ;)
    Basically less coordination once over obstacles.
     
  25. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Well I guess you could merge a stumble animation at the end of the main animation with mix amount determined by how athletic the character is.
     
  26. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Anything ever happen with this? It looked so promising ...
     
  27. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi hopeful, I haven't progressed it as I've been snowed under with other work. I'll post when I get a chance to update.

    - John A
     
  28. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Very interessing any chance to see wall walk
     
  29. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hrrmm I should do something with this, even if its just giving it away...
     
    odival and hopeful like this.
  30. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I'm saying that you need to develop code based on a state in the animation data, so that comes down to semantics which aren't entirely relevant here except to say the current model ties code closely to animation state/data.

    I do have a thought in decoupling them - we have the notion of triggering events on a particular keyframe correct?

    Perhaps a pub/sub model which would allow a user to markup their animation keyframes so that they can push out animation state abstractions (events) that follow a pattern - in this way you would be able to develop a system which relies on event notification instead of polling animation state.
     
  31. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Yes that sounds like it might work pretty well.
     
  32. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    221
    Wow! I wish I had stumbled upon this thread when I was making my system in March. Its similar to yours as its checks for the height of the objects in front of the player. It differs by using versatile tags to determine what animations play, and uses Raycast Hits instead of sphere cast.
    It also incorporates what @Lypheus said about using the state animation info to ensure the right animation plays from the right state. I also have assembled a full set (walls,windows,doors,and floors) that are not only drag-in ready for use, but also are full destructible (like levelution in Battlefield).

    Be sure to check out the project here, not sure if it would do good on the asset store though.
    http://gamejolt.com/games/industrial-evolution/55983#
    Screenshot (17).png
     
    DizzyTornado likes this.
  33. Andrew-Carvalho

    Andrew-Carvalho

    Joined:
    Apr 22, 2013
    Posts:
    44
    Posting to poke about any progress or possibility or open sourcing/private licensing/whatever. I'm super interested in the kit as it would save myself a bunch of development time on an upcoming project.
     
  34. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi @Andrew-Carvalho

    there wasn't enough interest so I haven't pushed this forward. I do sometimes open it and have a play around, it may one day come out, but likely not soon.

    I don't think its clean enough to be of use to you in its current state. It only took a day or so to put together, at this stage its probably easier to write your own than learn my code.

    - John A