Newton's law...

Started by
24 comments, last by ogracian 22 years, 6 months ago
quote:Original post by grhodes_at_work
Perhaps g = 9.8 m/s2 will be close enough for games?


Why use meters in games anyway? I usually stick to units/second or pixels/second for velocities.

Dirk =[Scarab]= Gerrits
Advertisement
It´s much easier to convert to pixels or whatever after calculating everything you need. This way you can just apply physics in an easier way (newton and others have thought of the formulas already ;-) ), the only thing you need to do is to apply these formulas. Otherwise you would have to come up with new measuring units (pixels per second) for velocity, pixels per second per second for acceleration, and kg.pixels.s^-2 for force. So with all these new units, how would you call them? Force is easy (call it after yourself .. newton did! :-)), but for the others you''ll have to come up with other names to keep things clear.
I admit, it is possible to do it that way, but it´s not the easiest way to go.
You don''t need new names for units. No-one stores velocities as 100 ms^-1 anyway, they just store it as 100. As long as you use the same unit of length for everything, the mathematics is exactly the same as with metres. The same if you use frames instead of seconds, ''weight units'' instead of kilograms (I know that doesn''t really add up ), or anything else. Constants will need to be recalculated, of course, but you can use trial and error until they look right if you don''t feel like working them out.
I agree with Dracoliche except on using frames as a measure of time. This is only valid if the game runs at a fixed framerate.
Dirk =[Scarab]= Gerrits
Oops, good point Scarab0.
All right, You don´t need new names for units. But I still think it´s much more clear to use "real" units, and to perform a conversion at the end of the processing of each frame.

This topic is closed to new replies.

Advertisement