Skip to main content
GameDev.net gamedev.net
🔒 Locked

Physics for Game Developers Chapter 6: Projectiles

Started by Myopic Rhino Nov 28, 2001 at 1:22 PM 3 replies 600+ views
johnb
johnb
I found this disappointing, as it is both too theoretical and too simplistic.

The algebraic approach to the problems in the first six pages is valid but it only works for the simplest problems. Game problems are never this simple: a typical object is not a point object falling under gravity onto a flat surface, but is extended, rotating, has drag, maybe lift, and may be about to land on a slope or curved surface or hit another game object.

In a simulation you are far more interested in how it moves than how long it is in the air, as you need to draw it, check it for collisions with other objects, attach a sound to it etc. every frame/game loop. Such problems can be succesfully simulated using equations of motion, but the article only refers to these briefly near the end.

The article goes on to discuss drag, but it is again too theoretical and too simplistic: the discussion of Bernoullis'' equation is too detailed, while a more useful discussion of e.g. the impact of shape/size on aerodynamic behaviour is omitted. The last section on variable mass is very specialised, probably relevant only to precisely simulating chemical fueled space rockets - rarely seen in games as they are too slow for most game purposes.

John
John BlackburneProgrammer, The Pitbull Syndicate
johnb
johnb

> I have been unable to find out how to simple elastic collions,
> even from the tutorials on this site ( last time I checked
> anyways ).

Try posting questions to the maths and physics forum: this forum is too general and has far fewer visitors.
John BlackburneProgrammer, The Pitbull Syndicate
Genre
Genre
Nothing beats a real physic book. Just go and grab one at the library and plow through it.

On a side note, I did not read the chapter myself... I just skimmed through it.

But, I may add that you are right, game physic is never that simple, but what kind of realism are you looking for? If you want to keep your game running properly without clogging (sp?) it with too many calculations that will just impact your objects movement by a few fraction of a m/s, then all that stuff about your object not being a point and all is just relevant for collision purposes.

If I make a game with moving objects I will never use the full equation of motion to calculate anything. I will use the basic Newton's Law and at every pass of the game loop I will set all the forces on the object to a constant using the previous data I had from the previous loop. The only force I will use are a) gravity, drag (air resistance if necessary) and the objects own moving power.

I made a demo in DirectX about this. I could make arbitrary shapes with a certain number of vertices, link them together with springs of variable hook coef and then set charges to the points I wanted; then I could watch the movement. The only forces present were Spring force, electric forces and a small resistance to dampened the movement so it does not go out of bound (blow up) and I used the method in the previous paragraph. I must say I was impressed by the result as it was very similar to what it should have been in the real life. Anyway, if anyone wants to see the code, just email me at Audrie_MM@hotmail.com =)



Edited by - Genre on December 21, 2001 7:01:44 AM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.