Game Development Community

I want to change how Torque handles animations...

by Chris Cain · in Torque Game Engine · 11/26/2005 (2:29 am) · 5 replies

Hey guys, I was hoping some people could help me out with changing how animations are dealt with. What I'm trying to do is not a new animation system, just a new way (hopefully better and more flexible) to deal with how animations are used. (Yeah, this sounds confusing... but read on, and hopefully it might become more clear)

To help show why I think it needs to be changed, one of the problems I've noticed with the current system is that it requires the names of the animations to be transfered over rhe network. A thread ( http://www.garagegames.com/mg/forums/result.thread.php?qt=25552 ) shows this. Though, I realize it can just be increased or countless other things can be done... but why not fix it, and make it more flexible while I'm at it?

I've thought of an interesting way to fix it. My way to fix was to possibly assign the animations that will be used via the player datablock. Since the datablock is transfered at the start, it would have the data right there to use. This also allows the system to be more flexible, as 2 player datablocks can have the exact same model, but completely different animations, and its dealt with on the server side.

Now, I'm almost positive people might see flaws in my logic and how I'm looking at it, which is why I'm posting here. Currently, I have very little knowledge about the whole animation system, as I've never ever touched any part of it. Additionally, from what I've noticed, there isn't many resources to help people understand the animation system. I have a 2 fold question.

1st: Now that you understand what I'm aiming for, is there better ways to do this? If you don't understand, ask me how to clarify and I'll try (I'm worried that I don't make sense because I'm confused on the animation system myself)

2nd: What parts of the engine will I be required to change? Additionally, what parts of the engine should I look at to get a better understanding on how it is dealing with the animations? Better yet, is there any resources that could help me?


Seeing as there isn't too much specific information on the animation system, I'm probably going to do a brief write-up on how the animations are dealt with after I'm done figuring it out. I'm even thinking about posting this solution as a resource as well, incase anyone needs something like this in their game making.

#1
11/26/2005 (2:43 am)
I would find it interesting to see what you come up with.
#2
11/26/2005 (9:01 am)
Actually, I just found this thread: http://www.garagegames.com/mg/forums/result.thread.php?qt=36519

I'll probably look into that as well. Possibly datablocks storing the entirity of animation data?

Lots of stuff to learn... in any case, I have to learn about torque's way to deal with animations...
#3
11/28/2005 (1:57 am)
OKay, I think I know how I'm going to do it now. I've done some looking at the 2nd way (my second post) and decided that it would be best if I didn't mess around with that way just yet. Its possible, but it only seemed to work when I set the "MaskHandsOff" for it... but then the node that I selected (my arm) shot off into space (upper left corner). Basically, the only way I knew it was working was because when I jumped (which, I temporarily changed the coding to set a rotation and position of the arm when I jumped) I saw the arm jump back into its proper location, then promptly shoot into space again.

Now, my original plan looks as good as any... Currently, I'm planning on implimenting it via script with something like... %player.setAnimSeq("root", ".\player_root.dsq");. I'll see if I can find a way to script it so the initialized values are the same as the player.cs in the models folder... Hopefully making it easier to impliment.

It seems like I'll need to change quite a bit to make this new system work, but I feel that it would improve Torque. Additionally, I need it for my project to go forward any :-).

Anyway, I'll post again with progress at the end of the week for those who are silently observing. Additionally, I'll check at least once every day in case anyone has any suggestions on how to do something.
#4
11/28/2005 (3:58 pm)
I dont know exactly what you're trying to do here but it sounds interesting :)
#5
12/01/2005 (5:24 am)
:P Me either, now.

Well, I've been looking through the code and decided its too much for me to redo everything.

So, instead, I'll just modify it so that you have like a console command (eg, %player.modPlayerAnimSet("root", "crouch");) to set each type of animation. So, it'll be able to change things like the root stance, running back and forth, running side to side, head animation (eg, up and down movement of the head), and arm animation (up and down of the arms) ... and such like that.

Hopefully this will be flexable enough without me having to recode half the engine like I was thinking before :P ... I simply don't have a good enough grasp of the engine (plus, every time I sit down to figure it out, I have real-life pop up and demand attention :P)