[pythian] Re: Physics Library

  • From: Darryl Long <dlong@xxxxxxxxxxxxx>
  • To: pythian@xxxxxxxxxxxxx
  • Date: Fri, 9 May 2003 08:58:16 -0400

> So we can basically give all our models "rag doll" physics? 
> That would be pretty cool... is it necessary for our Project 
> though? I'm not too sure it is.

Wow!  It's pretty cool that you are even thinking about this from such a
practical viewpoint.  So let's discuss...

> Someone being cut down by a sword will die, for the most 
> part, much less dramatically than someone being shot by a 
> gun.

Really?  I think the momentum behind a bastard sword is probably higher than
that behind a bullet.  Ok, I researched it, and while trying to find the
numbers I needed for masses, velocities and the rest, I found this:

"To find the force acting on the target, we use the relation that FDt=mDv.
Assume the penetration takes place over 1/100 of a second, that is over
1/25th of the cutting arc, which for a sword of 0.7 meter length is 6
centimeters. We are modeling a cut that stops not that deep in the skull. So
F = 100mDv = 100 x 4.4 = 440 kg m/s2 = 440 Newtons. Pressure is force per
unit area, so assuming the kissaki of the blade had a surface area of .03m x
.001m = .00003 m2 , then the pressure exerted on the skull would be about
14.6 million Pascal. 

For comparison purposes, a 100 gram bullet fired at a 400 meters per second
velocity (over the speed of sound), with a diameter of 1 centimeter, has a
momentum associated to it of 40 kg m/s, and an energy of 8000 Joules.
Assuming the impact times were the same, the surface area of the bullet head
(assuming it flattened like a .45ACP round), is 0.0007 m2. The pressure
exerted by the bullet is then 5.7 million Pascal."

at http://www.uoguelph.ca/~kataylor/97jjsa.htm  (Isn't the web great?!)

To summarize, a sword imparts about 2.5 times as much force as a bullet
(from what I read elsewhere, a sub-machine gun fires at about 650+ m/s, so
it might be a bit less of a difference, but still significant).  Given these
numbers, I'd say the potential for ragdoll physics and cool reactions is
MUCH higher in our game than in any FPS with guns.

To give another supporting example, when someone got nailed by one of those
big, fat arrows they used to use, they literally flew back.  If you got hit
in the chest, your chest caved in and the sword would go most of the way
through you, shattering bone on its way.  If you're thinking Boromir in
LOTR, think again.  The only way you live through an arrow hit is if it gets
you in the shoulder or extremeties, and even then, it'll flip you around
just like a rag doll.

That said, it doesn't necessarily make good game play (except on NPCs!!)

> This physics library might allow us to create realistic 
> missle weapons, like throwing rocks, slings, and bows and 
> arrows.

Actually, that's really easy.  Our physics engine handles this already...
ever tried shooting the bow in our game?

> Also destructable Fortresses perhaps, with working 
> seige equipment that lobs huge boulders into a wall of 1000 
> stone slabs, that all come crashing to the ground. <-Idea

That would be really cool!!!!  (but unlikely)

> 1. Do we plan on allowing the player to move objects around?

Yes.  One thing I keep thinking, and have been for a long time, is it would
really add to our game to let the player push boulders over a cliff onto his
enemies.

> 2. Do we want the player, and other objects,  to fall from 
> heights realisticly?

Again, this is simple physics.  We have no problems here and it works in the
engine. It's just the bouncing/colliding part of falling that would be
gained by a better physics lib.

> 3. Are there going to be times when real physics will play a 
> large part in the gameplay?

Except for the example I have in 1, and perhaps the seige idea you had... I
don't know.

> 4. What effect will such physics have on the gameplay, if any?

IF we go with a cool physics engine like this, we can make our game to take
advantage of real-world physics, and add to our gameplay beyond what is
otherwise possible.  People could make elaborate plans on how to solve
problems, capture cities, etc., that include physics (like catapults,
ballistas, flooding the plain, and more) that we couldn't do otherwise.

Not saying I'm sold on it, but it's something to think about. I don't see
myself implementing this for a long time, but if it's "cool" and interesting
enough to get another coder involved in our project, then it is worth it to
me.

Darryl

Other related posts: