Game Development Community

Fun With Animation

by Paul /*Wedge*/ DElia · 04/28/2006 (4:31 am) · 3 comments

Muahahaha, fooling around tonight, I managed to trick the inheritance into working. I'm pretty sure what I did is totally illegal in C++ or anything else, but TS let's me get away with it!

----------------------------------------------------------------------------------------------------------------------------------------

So after playing around with blends a bit, I've got a nice ground for a simple player animation system. I make animations for each arm for each weapon type, and an animation for each arm supporting the weapontype on the other arm when single weilding. This is nice, all I have to do is define what animation set for a weapon class to use, and everything else takes care of itself. It's not very noticable right now, as I just have some test animation sets for SMGs and rifles, but it will be much more interesting when I have some pistols and swords in there. Especially cool this should let me freely mix melee weapons and guns together.

This also forced me to test my ever so carefully crafted base gun class, to see if it really would be subclassable like I'd intended. After a little silly bug fixing, it's working great! The base gun file has about 400 lines of code, and a gun subclassed to a weapon type, and then a specific weapon ended up at less than 100. Hooray for reduced code clutter! It could be reduced more if method inheritance was working right, but I tried that with images, and it made a lot of stuff not work or act kind of weird. So I'm just faking it by redefining all the methods for subclasses and calling the parent method from there and it's working great.

I'm barely using any of the original inventory system, and have written a lot of code around my custom weapon/ammo/inventory setup. It's the first thing of this magnitude I've ever done on my own. Overall I'm pretty happy with what it lets me do. There are probably a few things I could have setup better, but no huge snags. It even gives me the mostly useless capability to specify a "primary" hand for the player for when dual wielding (this is on a per player, not per weapon basis). Enough words, onto screenshots!

Right handed setting
img.photobucket.com/albums/v124/Wedge/devshots/AnimFunOne.jpg
Left handed setting
img.photobucket.com/albums/v124/Wedge/devshots/AnimFunTwo.jpg
I want to throw in a test pistol for fun maybe still, and then it's onto working on... the melee system! Dun dun dun dun...

Oh yeah, and after the reopening of internships at GG, I applied again and got one! Hooray me! See you guys at GG in June!

#1
04/28/2006 (6:43 am)
Cool! Congrats on the internship.
#2
04/28/2006 (9:18 am)
nice work, paul! sounds like cool stuff, I'd love to see your gun class!
#3
04/28/2006 (8:24 pm)
Cool stuff!