That's the way it is normally done, but then again, that is how the penality system works in GT4 right now, and its useless. The system that is usually writen looks like this:
//sec1
If car1 hit car2 at < 50mph = nothing
If car1 hit car2 at = / > 50mph = penality
That kind of coding doesn't work, as its too severe and too simple. So you have to incorporate something similar to:
//sec2
if car1 speed dif of car2 is < 10mph = nothing
if car1 speed dif of car2 is = to 10mph = warning
if car1 speed dif of car2 is > 10mph = yellow flag
but then, you have to take into account that the car2 might be at fault for braking too fast. so you add:
//sec3
if car1 impact car2 -- car2 no brakes = check //sec1 -- yes? = Penal -- No? = check //sec2 - yes? = Penal -- No? = warning
if car2 impact car2 -- car2 brake = check //sec1 -- yes? = Penal -- No? = check //sec2 - yes? = Penal -- No? = warning
Then, you can ask... did Car1 brake as well as car2... then you have to start all over again... and that's just for car impact...
There's another thing concerning this kind of coding scheme... you have to take into account the different power the cars... 2 fiat punto will not go at 200mph... so their impact speed might be far lessen then 2 NSX or something else that goes stupidly fast.
SO instead of a simple code like this... you gotta create an algorithem that will make a good mathematical equation, stating what is the overall 'power' of each car, classing it into categories... from there, this will determine what is a safe or not safe speed of impact which would result in penalities or not. (which GT4 doesn't do). So that a Punto will need not to go faster then 20mph to get a penality over braking, but a NSX will need 45 MPH to get the same penality.
But then, this exemple is flawed because every car at low speed can make a serious impact on another car and such, create very real damage (we are talking below 50mph speed limit) so a whole new set of coding must written for that, and again, it requires an algorithm to determine which car fits into that description and which doesn't.
At this point, some people might say: just write the specific code for each car... but that's no good, because that means on a game that runs 25 cars at once, 25 times the codes must be run simulaneously, instead of one code which will make the calculation in real-time, thus taking more time and more CPU power for the same penality system.
Then, if you want damage... the smart way to do this would be to piggyback this equation into the damage level of each car... so that an impact at 20mph will not look like an impact at 35 mph... and so on...
Then, if you want Online or Multiplayer capacity, you have to find a way to incorporate all this information, plus all the relevant car information (current speed, current location, current level of damage...) and find a way to package it and send it through a Network connection/Internet bandwith.
I'm telling you guys, its all nice to have ideas... but finding a way to code it all in one bunch, have it work for 25+ cars at once and ONLINE... is another story... Now i didn't write this to say its impossible, because its really possible. But i wrote this for everyone on this board who 'have an excellent idea' and thinks everything is possible 'if PD only really wants to do it'... its really not that simple... really.
cheers,
note: i'm not a programmer, so this codelines are noway near what real coding means, i just used the C++ "if" style coding to better explain how things work. I've done codes in my time, and i hate it. But i do work in this business, and i've seen a lot of hairgripping maniacs quit their jobs and break windows...