Advertisement

Physic engine design.

Started by May 07, 2002 07:08 PM
0 comments, last by Nick2048 22 years, 9 months ago
I''m a little curious on how one would go about designing a physics engine. For example, I currently have 2 classes; a 2D vector class (this is a 2D physics system) and an object class. In my object class I have a value for mass and a 2D vector for the object''s current velocity. I''m thinking that forces would be applied to the object per frame. For example, the force of gravity would be applied, passing in a time value (the amount of time the frame is visible for) and that would adjust the current velocity. Other forces like wind resistence would be applied again altering the velocity. Is this the right idea?
I don''t know if you would want to do this, but in my engine so far, I''m using a frame rate-independent system (time-based), providing more constant variables, making the code slightly easier to handle. (And easier to write replay files.) But so far, I think you have the right ideas.

This topic is closed to new replies.

Advertisement