Custom Physics Engine

Posted by Gamer3D on Sept. 13, 2007, 3:01 p.m.

Not long ago, I was wondering what to add to a re-birth of one of my old projects. I decided to make a rigid-body physics engine. The result was immediate. The boxes I used as test objects didn't work right. They still don't work perfectly, but they do work well enough for most games.

Things it includes:

  • Impulse-based collision response.

  • Friction

  • Elasticity

  • Density able to be set

  • Real-time collision detection

  • Angular velocity

    Things it needs that I have identified:

  • Better impulse response

  • Improvement of collision detection engine (again, one I made by myself)

  • Prevent stacked objects from pushing into other objects.

    Link to current demonstration (as of 09132007):

    Download (195 Kb)

    Note: Click to add a new box to the simulation.

    <a href="http://64digits.com/users/Gamer3D/PhysicsScreen0000.png"><img src="http://64digits.com/users/Gamer3D/PhysicsThumb0000.png"></a>


    I would appreciate any praise, bug reports, helpful (and even a reasonable amount of unhelpful) criticism, and advice.
  • Comments

    mazimadu 17 years, 3 months ago

    will this be featured on the examples section?

    Gamer3D 17 years, 3 months ago

    @All the GMPhysics comments - I know it isn't as good as GMPhysics. GMPhysics utilizes AGEIA's PhysX engine.

    @Shork - Good idea. I'll see what I can do.

    @mazimadu - It might be when it's done.

    paul23 17 years, 3 months ago

    lol nicely done :) - I wonder how you build your collision detection any chance you give a (small) hint? :P

    poultry 17 years, 3 months ago

    Am I really THAT negative?

    Gamer3D 17 years, 3 months ago

    @paul23 - Here's your hint: <a href="http://en.wikipedia.org/wiki/Separating_axis_theorem">Separating Axis Theorem</a>

    @ChIkEn - Yes, you really are that negative.

    Dom 17 years, 3 months ago

    its nice but it easily gets stuffed up