Game Development Community

Damage system question

by Ronald J Nelson · in Torque Game Engine · 11/11/2005 (11:21 am) · 2 replies

I am looking into a realistic damage system.

I wanted it to have realistic damage as in if you crash into car at a certain point in the body it shows damage in that area.

Also, I wanted the system to allow for damage to buildings that is realistic so that if you shot a missle at a certain part of the building, part of the building would be damaged at the contact point.

Finally, I would also like to have realistic damage to glass similar to the damage that you see in Counter Strike Source where if you shoot the glass it makes a real hole and the glass is in several pieces that can be borken away more if a player were to jump through them.

Does anyone have suggestions on what can be done to achieve this? Is there some sort of additional system that needs to be integrated into Torque or can Torque do this?

#1
11/11/2005 (11:52 am)
As far as locational body damage to vehicles, that's a pretty tall order. It could theoretically be done, but IMO would be a herculian artistic effort.

My initial thought would be to simply create several meshes for the vehicle at various states of damage and sawp them out in-game based upon the current damage value.

If you absolutely had to have it be location and condition specific, I'd think you'd have to create your vehicles as modular meshes - think of a car... you'd have a base mesh that you would then have to mount each and every body piece to. Each of these would have to have a number of "damage" meshes that could display crumples in fenders, etc.

At the point of contact, I suppose you'd trigger a mesh change to the appropriate portion of the vehicle based upon your los_col box to determine which portion to change.

Easy? No, but possible? Yes.

As for building, the same holds true, although I'd think as caveat such a system as I described with the car example would preclude you from using *.dif objects, which would leave you with *.dts models. If you're talking about a large number of buildings, that could tax your performance significantly.

Alternatively, you could simply generate "damage decals" on the fly based upon what (masktype) object your missile collided with - if it's a building, generate a static bilboard/ sprite across the surface of the building... bullet holes in windows could be handled in a similar fashion.

Run a serach for decals and/ or decal manager to get some insight into how this is done... and good luck with all that. =\
#2
11/11/2005 (12:21 pm)
Kirby is right about dividing your mesh up into sections. Damage effects are central for the project I'm providing art for. Each vehicle has a core chassis with submeshes representing the various states of damage for a particular part. We have panels that get ejected from the chassis but also 'clean' meshes get swapped out for 'damaged' meshes. So far its been a juggling act trying to balance maintaining the look of the vehicles and keeping the polycount between 2500 and 3000 per model.

I also agree with Kirby about decals. Our system will use start with scorch mark decals, then advance to a particle explosion that ejects a damaged panel then end with another particle explosion that's used to cover the swapout of the clean for damaged submesh. Damaged sections will be linked to onboard systems so if the radar dome is destroyed then your HUD radar shuts down.

Right now each mesh is linked to the start node, not submeshes linked to the core chassis. As long as you stick to a naming convention for the meshes your programmer should be able to make calls to turn off/on the visibility of the swapout meshes.