Game Development Community

Has anyone tried this?

by Robert Rice · in Torque Game Engine · 05/24/2004 (9:17 am) · 8 replies

Just a curiosity. Has anyone, or is anyone currently, attempted to create 'transformable' player characters in Torque? (i.e. Transformers, Robotech, etc) My assumption is that this would be a significant technical challenge, but that it could indeed be done. Any thoughts?

#1
05/24/2004 (9:43 am)
Ironically, just before bed, I was toying with this very idea. (Been playing too much Transformers Armada on the PS2...) Unfortunately, you've got the issue with datablocks. Swapping out the player can be easily done on a dynamic basis, but unfortunately you lose all state tracking information once you zap the player's object and switch its datablock. Of course, in Tribes you swapped armors without losing state information, so this is probably the easiest to figure out. Could just be as simple as setting a new value.

The only other way I could see this working would be to create one combined datablock type -- FlyingVehicle/WheeledVehicle/etc. plus a normal player. That'd be ugly though.

Dunno, haven't attempted this. I was just thinking about how to implement it.
#2
05/24/2004 (10:27 am)
David
Good! Glad I'm not the only one interested in this idea! I'm still looking into it and it will take some time, but if I come up with something I'll let you know. If you ever want to collaborate, drop me a line.
#3
05/24/2004 (10:28 am)
There is a node hiding/showing resource for DTS shapes in the resource section that could be used to help with the visual part of this, instead of swapping models, you hide/show different nodes.
And you can change datablocks on the fly : I've seen a demo of this done with a vehicle, that would switch from wheeled, to flying, all done in scripts, no need to touch the codebase
#4
05/24/2004 (10:30 am)
Nicolas,
Don't suppose you remember where you saw this datablock demo, do you? In any case, it is good to know it's been done! Thanks!
#5
05/24/2004 (10:50 am)
I kind of been thinking about this same thing. Except in my case I want the player to have the ability to swap pieces of "armor". My thoughts were to do something like what Nicolas suggested and have the players avatar already wearing every piece of armor that had been created but make them visible or invisible based on a use flag. Hopefully that will work. :)
#6
05/24/2004 (11:04 am)
So different datablocks for the various modes, and then they all just share the same model? Using variable visible portions for the different transformations?

Though, now that I think about it, if you modeled your robot/spaceship/car/etc. right, all you would need to do would be just shift the bones around. Just hide the wheels and whatnot when it transforms back to robot mode.
#7
05/24/2004 (11:05 am)
Robert : I do know where I saw it, just not sure it's my place to mention when and where, as it's not a public resource :)

As for the node hiding and showing resource, it's here

Sorry I can't be of more help regarding the transforming vehicle, but as you remarked, knowing it can be done, is certainly an encouragement.

Edit: Looks like I was mistaken, the demo I saw did use some modifs to the C++ codebase.

I can add that the switching of datablocks was done by a keypress, and could be done while the vehicle was in movement.
#8
05/24/2004 (11:32 am)
David,
I thought of that bone-shifting idea as well, but you'd have to be sure it stops trying to animate its appendages when it is in its non-bot mode :)