Decision on Engine

Started by
0 comments, last by serumas 10 years, 9 months ago

Well I'm currently making a physics engine for learning purposes and as something I can show on my resume. Currently I am considering using circles and doing continuous collision detection. Though I would only be able to use moving circles and static edges and would need to use multiple circles to define more complex shapes. A box would be defined by 4 circles, so obviously there will be some noticeable clipping of sprites.

The other option I am considering is the iterative method, though it will not be continuous more complex shapes can be used. For what I know of the iterative method, the engine moves in steps and every step it looks for overlapping objects, if any are found they are handled as collisions and are moved to a more preferable state in which the objects aren't overlapping. As well constraints and such would be possible in this solution, as far as I know it would be difficult to add to the circle solution while also achieving continuous collision. Not sure how difficult it would be to implement continuous collision for convex shapes, I would imagine maybe some sort of test per edge basis and using the velocity you could reduce the edges tested to half.

So I'm not sure which method I would learn the most out of but at the same time put forward something to show potential employers.

Advertisement

Last year I was makeing simple physics engine just like you and I made it like this:

1. First I made everything with single circles. Becouse its very easy to check and resolve collision. So it was more work with broadphase collisions, time steps and so on.

2. Made complex forms with several circles. So it was more work with contstrains and worious hacks.

3. Made shapes without circles. It was more work with near phase algorithms gjk or sat and friction...

4. Optimization....

So what is your curient problem?

This topic is closed to new replies.

Advertisement