Interactive TPC

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’ :slight_smile: ). 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

This is fantastic! Keep it up.

wow, very cool, how was the process using mecanim?

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

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…

Alright, figured out some mecanim stuff (so THATS why you slide the animation bars and line up the curves :wink: ! ). 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).

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.

Bumping this - new build and stuff to show, updated controls in top post to reflect.

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 :smile:/

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 :stuck_out_tongue:

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.

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.

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 :).

Cool!

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 :smile:.

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.

Updated webplayer, see initial post.

mecanim tutorial! they screamed!

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/

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 :)!

Hey Chris, please answer my private message. ^^

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