Search Unity

Interactive TPC

Discussion in 'Works In Progress - Archive' started by Lypheus, Jan 17, 2013.

  1. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Nightfalls TPC is coming along (slowly), now using awesome Ruined City asset for some testing. Have some work to do in improving movement and transitions but its looking passable now. Going to start in on armour and inventory handling next :).

    Worked out the clipping issue with some walls now as well, great stuff - problem is it breaks other aspects of the code so i'll have to look into it some more.

    Controls so far:

    WSAD = Movement
    Spacebar = Interact (must be facing object and it should indicate it's ready by being highlighted in green)
    C = Crouch
    x3 WSAD = Dive roll
    SHIFT = Sprint
    SHFT + C = Running Slide
    1-6 = Toggle weapons (5 or rifle, disabled in favour of shotgun atm).
    LMB = Fire weapon (primary)
    RMB = Alt Fire weapon (secondary, currently melee)
    R = Reload weapon
    G = Drop weapon
    Space = Pickup weapon when highlighted in green
    ESC = Menu

    Web Player Demo

    Lots of work and the state machine is sure starting to look messy :), but it is progress nonetheless!

    -------------8<-------------8<--------------8<-------------
    Updated 09-20-2013: Upgrade to 4.2, Fixed some movement issues and interactions, added basic menu hook (esc), targetting armour/inventory next - since there will be asset store work involved game development may be idle for a while then get a big bump from my own assets :).

    Updated 06-15-2013: Upgraded to 4.1.5, lots of bug fixes including running slides being straight now and some animation transitions, have very basic AI in place and weapon bloom effects on weapons. Also dropped TPC into MichaelO's "Ruined City" scene. Will be deploying a new web player in the coming months here, this one should play much more like a 'game', for now see blog for more details: http://nightfallgame.blogspot.ca/ .

    Putting some more cycles into weapon handling here and sprinting (with weapon) which is currently quite 'meh'. I'm targetting some HUD elements here as well, time to HUD it up a bit!


    Updated 03-25-2013: Upgraded to 4.1.1, smoothed some animations, ladder animations broken and need rework to behave well with animation state machine changes.

    Updated 03-05-2013: Guns shoot, bullets impact - magic happens .. a bit :).

    Updated 03-01-2013: Smoother upper blends in place, weapon dropping (G) pickup (space) and more weapons to try out.

    Updated 02-17-2013: Have combat mode "mostly" working now, as well as a few new animations (try holding shift while moving then tapping 'C' :) ). There are a LOT of mecanim state machine refactorings in progress, so this code is going to be unstable and buggy while that is ironed out. Have the remaining weapon blends waiting in a queue, but busy reworking vaulting and a few other details atm.

    Updated 02-03-2013: Fleshed out remaining bits for both Pistol and SMG animations, added sound and refactored weapon handling into an aspect. Also found a way to allow for target-able areas of an object while highlighting the whole thing still :).

    Updated 01-20-2013: Added Pistol based animations for firing, reloading and melee, need to work out how to mix in different avatar masks (see: http://forum.unity3d.com/threads/167002-Different-Avatar-Masks-in-a-Layer
     
    Last edited: Sep 20, 2013
  2. levijgraham

    levijgraham

    Joined:
    May 8, 2012
    Posts:
    63
    This is fantastic! Keep it up.
     
  3. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    wow, very cool, how was the process using mecanim?

    Do you use raycasting or trigger zones for those interactive areas?
     
  4. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    holyjewsus: I'm finding mecanim so-so atm. The tools for matching up animations to avatars are awesome, on the other hand, handing state transitions and writing code to synchronize animations with controller code is sloppy and not stellar (imo). From an API perspective we have a long ways to go, but in terms of the state machine authoring tool gui and avatar/animation mapping etc... very nice!

    I'm using raycasts/capsulecasts - will be refining it soon but basically my TPC framework allows for pluggable "Resolvers" that the TPC uses to determine what is in front or beside it, interactable, etc....
     
  5. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Alright, figured out some mecanim stuff (so THATS why you slide the animation bars and line up the curves ;) ! ). Added some sound and did my initial cut on handling player fire, melee and reloads for smg + pistol. Next up are shotgun and rifle animations, still lots of cleanup and work to do but most of the "pop" i was getting earlier is gone and transitions should be a lot nicer. Also fixed a problem where you can fall through the ground. Comments, bug reports, etc... appreciated thanks for checking it out (be sure to clear cache if you get no sounds and reload app).
     
  6. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Going to run a blog, not typically my thing but I'm constantly emailing friends and thought some other folks might be interested: http://nightfallgame.blogspot.ca/ . Will try to write a bit more about details in working with mecanim and such.
     
  7. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Bumping this - new build and stuff to show, updated controls in top post to reflect.
     
  8. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Wow, this is nice, only thing i found buggy was if i run and go into slide mode right by a wall, i can go through it sometimes. Mostly in the buildings :D/

    Edit :

    Found the gun controls, i thought i had to find a gun before i could shot lol. You should start with your pistol out. Last, when using a headset the gun shots sounds great but almost blew my head off :p
     
  9. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    lol - ya i haven't really got into sounds yet, just threw some stuff form the asset store into place to get an idea - i'm also going to try and find some particle effects for slides (dust), climbing over walls (chips/dirt where feet hit), etc...

    The walls are all using MeshColliders atm, i'm finding that they can be "defeated" by a rigidbody if you are persistent enough - most likely something i'm missing but i'll figure it out, if you try the playground outside the building, this should not occur. I also am refactoring my "trigger zones" which are really colliders i raycast against to be actual triggers as well, that way i can allow you to run-slide *or* crawl under areas if it is possible to do so.

    Thanks for the feedback, i'll keeping chipping away here - reworking "vaulting" animation atm, not happy with it right now - needs to be more fluid.
     
  10. nixter

    nixter

    Joined:
    Mar 17, 2012
    Posts:
    320
    Thanks for posting a detailed blog on your mecanim development. I haven't needed to start using it yet for my game, but I probably will in a month and I'll be visiting your site for tips. Bookmarked.
     
  11. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    No problem nix, i'll try to be more descriptive about what i'm doing since folks may be using it for some info on the mecanim experience, will post a blog on fully directional strafing here soon - release night so working late today - perhaps tomorrow night :).
     
  12. emergki

    emergki

    Joined:
    Oct 15, 2007
    Posts:
    422
  13. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    Will you be selling this as I could really use this. And if so how much would you sell this for? Keep up the great work :D.
     
  14. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I haven't decided yet - I'm thinking maybe after my game is released it'll be a consideration, the nice thing is all assets in my demo so far (excepting buildings and weapons) are custom work and mine, which would make spinning this off into a nice TPC package much easier. It's too soon to say, if I do release this as a package it needs to be rock solid, which is not the case just yet - still a lot of work to do with it.
     
  15. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Updated webplayer, see initial post.
     
  16. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    mecanim tutorial! they screamed!
     
  17. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Ugh, no thanks - maybe when I actually 'know' something about mechanim though :).

    BTW, new web player build just went up, see blog or top of thread for details: http://nightfallgame.blogspot.ca/
     
  18. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Ok, so I made some changes to bring my code up to 4.1.1 - using the dual parm blend trees and i love them - see blog and try new webplayer linked up top :)!
     
  19. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Hey Chris, please answer my private message. ^^
     
  20. Kinos141

    Kinos141

    Joined:
    Jun 22, 2011
    Posts:
    969
    Ha, nice game, now put in a cover system!! An auto-cover system, no buttons needed!!
    Also, with mecanim, you can use blend trees to blend using the Input.GetAxis, so you don't have to manually code every action on XZ axis, if you don't know already
     
  21. 0n35

    0n35

    Joined:
    Aug 23, 2012
    Posts:
    51
    Not sure if it's been said yet, but if you take a run at that angled piece you will go up and be glitched into running into the wall ^^
     
  22. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Thanks for the tip :) - believe this is fixed now. I ran into the root cause for this while transitioning into the ruined city scene and having to deal with odd angles. Was a bit depressing to see my TPC fall apart a bit when the new scene was used but encouraging to see how quickly it was adapted (minor code updates) to get working nicely! No web player demo just yet as i'm shooting for a little mini-game here and getting the small ruined city scene all setup with colliders and such, working on a new demo within the next few weeks here.
     
  23. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I've put together a website to showcase progress of Nightfall (working title) - if you're interested in taking a look at the demo or more details on it - take a gander at: www.logicwell.com
     
  24. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Ok more updates, I'm actually working on modular armour now, roughed in a really crappy menu system just to test a few camera effects for it ... ugh, I'm hurting for a GUI here but it's tough to find high quality that's willing to work iteratively instead of 'big picture' up front.

    New landing url is: http://nightfall.logicwell.com

    The armour system will be targetting the asset store, just waiting on artists atm :).
     
  25. create3dgames

    create3dgames

    Joined:
    Aug 20, 2012
    Posts:
    275
    Webplayer is too big
     
  26. GeneBox

    GeneBox

    Joined:
    Nov 15, 2012
    Posts:
    480
    This is pretty fantastic.
     
  27. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Working on the login screen atm, check out : http://logicwell.com/nightfall_menu.html and let me know your thoughts folks :). Going to see about getting a couple background characters and animations going on so its more like an action scene, seems like a low-budget way to get a nice landing page for my game.
     
  28. order66

    order66

    Joined:
    Apr 17, 2012
    Posts:
    150
    How big is the webplayer? Loading takes forever... Or is your webspace just so slow?
     
  29. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Not sure, i'm hosting out of esecuredata.com (Vancouver, BC), so perhaps its just on a bad route to you? The game itself is ~80MB the menu scene should be around ~40MB.

    It is a large download for the webplayer depending on your connection/location - it's roughly ~4-5m on my country wireless connection, but i'm also located in AB so not many hops here.