Deformable scenery & programming
by Llewellyn Collins · in Torque Game Engine · 09/27/2001 (8:57 pm) · 5 replies
I wasn't sure where this should go, so it ended up here.
Firstly I was wondering how I can go about implementing deformable scenery, preferably buildings & structures.
I dont want something like red faction in which you can blow bits out of almost anything.
What I was thinking of was being able to assign a health value to certain sections of a structure,
eg, walls have 100 health, floor is invicible, and roof has 50 health.
So a large explosion doing 80 damage would cause the roof to "die" and spawn a rubble field. Or a falling beam, concrete etc.
Is it possible to do this with .dif files, or would I have to make entities so the roof was similar to a monster/player?
Secondly, I was interested to know the amount of programming experience required to start coding with Torque. I have 3 years of Uni level C++ programming, but most of that was theory with VERY little practical experience. So in effect I know a lot of theory behind it, but I'm pretty bad at actually coding things.
I have had some experience with coding small mods, and patches for quake1-3. Is this a similar difficulty level, or should I just leave the coding to my programmers?
Thanks.
Firstly I was wondering how I can go about implementing deformable scenery, preferably buildings & structures.
I dont want something like red faction in which you can blow bits out of almost anything.
What I was thinking of was being able to assign a health value to certain sections of a structure,
eg, walls have 100 health, floor is invicible, and roof has 50 health.
So a large explosion doing 80 damage would cause the roof to "die" and spawn a rubble field. Or a falling beam, concrete etc.
Is it possible to do this with .dif files, or would I have to make entities so the roof was similar to a monster/player?
Secondly, I was interested to know the amount of programming experience required to start coding with Torque. I have 3 years of Uni level C++ programming, but most of that was theory with VERY little practical experience. So in effect I know a lot of theory behind it, but I'm pretty bad at actually coding things.
I have had some experience with coding small mods, and patches for quake1-3. Is this a similar difficulty level, or should I just leave the coding to my programmers?
Thanks.
About the author
#2
One problem you have with being able to blow up buildings etc., is their collision/bsp info must be removed/altered when they are being destroyed. It is possible to update the collision and bsp in real-time, but there are penalties to doing so.
David
09/28/2001 (1:27 am)
Hi,One problem you have with being able to blow up buildings etc., is their collision/bsp info must be removed/altered when they are being destroyed. It is possible to update the collision and bsp in real-time, but there are penalties to doing so.
David
#3
That way I would build the ruined building as one .dif, then add the "breakable" .dif segments till the building looked intact. That way the collision detection wouldn't need to be updated, as long as the breakable .difs were removed from the scene.
Looks like I'll need to wait a while before I start the code for it though.
09/28/2001 (2:24 pm)
Yes I realise the issues with collision, thats why I was thinking along the lines of building seperate .dif files for the "breakable" regions.That way I would build the ruined building as one .dif, then add the "breakable" .dif segments till the building looked intact. That way the collision detection wouldn't need to be updated, as long as the breakable .difs were removed from the scene.
Looks like I'll need to wait a while before I start the code for it though.
#4
If you look at it from this approach then it is more than feasible. The only things you would have to find out are:
1) What effect on performance will this have
2) How to stop the 'repair' of these models
3) Health values
4) Spawning debris
09/29/2001 (1:53 pm)
You could, as was suggested, use a .dts model instead. Something similar to a vehicle pad for instance, but has the mesh of a part of a building, stairs, so forth. If you look at it from this approach then it is more than feasible. The only things you would have to find out are:
1) What effect on performance will this have
2) How to stop the 'repair' of these models
3) Health values
4) Spawning debris
#5
I'll post again when I get something working.
Cheers,
Llewellyn
09/30/2001 (8:04 pm)
Thanks for the info guys, I'm on it..I'll post again when I get something working.
Cheers,
Llewellyn
Torque Owner Tyler Frans
As it stands now, the Game Description File (fgd) doesn't support this in WorldCraft. So you have two options:
1. Code in a function similar to func_breakable used in Half-Life, so that flagged brushes are destroyable. (Don't know if the Torque supports something like this).
2. Make a .dts file instead and use it as a 'filler' for the area to be destroyed or as the complete object with a 'destroyed' sequence.
Either way, it won't be a quick fix, per se. We'll have to see what the GG guys come up with, but that's been my approach so far. Any ideas Rick or Tim?