Sign in to follow this  
Raeldor

Comtemplating Rolling My Own Physics Engine. Questions.

Recommended Posts

Raeldor    254
Hi All, So I am contemplating rolling my own simple physics engine as an educational exercise. I am brushing up on my algebra and calculus in parallel to starting to read a little more about the physics involved. I wanted to run my preliminary thoughts by people here make sure I am on the right track. My thoughts at the moment are to add objects to the simulation, each object comprising of one or more bounding volumes (probably spheres to start for simplicity). I am thinking to implement basic rigid body dynamics with collision detection, but excluding rotational dynamics to start. I would assign each object a mass and then have the physics engine deal with the velocity and acceleration. Objects would move by an API call that could be used to apply a force to an object. Does this sounds reasonable, or am I way off track here? Thanks for any insight.

Share this post


Link to post
Share on other sites
Antimode Siker    146
Sure it sounds pretty reasonable. It turns out that collision detection is probably among the harder things you will have to do though. Collision detection between spheres is easy but you won't be able to stop there. Eventually, you will want the objects affected by your physics engine to actually rest on floors, bounce on tables, etc. And then you'll get into collision detection between spheres and polygons or whatever makes up the static world in your simulation.

Even as an educational experience, these things might be worth thinking about. When I wrote Bouncy Hunters, which of course involved a bunch of bouncy physics, writing the basic collision detection between the main bouncy ball and the world took weeks and that was before I even started to optimize it. Not that I want to discourage you. :) Just thinking that you shouldn't simplify things too far.

Share this post


Link to post
Share on other sites
Raeldor    254
Thanks for the replys. I will definitely keep the engine open to make it easily enhancable for other bounding volume types. I am getting the feeling that this is going to be a bit of a pandoras box.

Thanks for the link to the game physics articles. Looks to be very well written, I will have a thorough read. Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this