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

    poultry 17 years, 2 months ago

    not bad, not bad.

    Misconstruct 17 years, 2 months ago

    Quite impressive! Reminds me of LittleBigPlanet for some reason… rofl

    Gamer3D 17 years, 2 months ago

    @ChIkEn - Hmm… I think that's the first time I've heard a positive comment from ChIkEn.

    poultry 17 years, 2 months ago

    Next time you might get a good.

    wazu 17 years, 2 months ago

    Sounds interesting… but isn't there already GMPhysics?

    FireflyX 17 years, 2 months ago

    This appears to be quite a smooth running engine, well done.

    Quote:
    Hmm… I think that's the first time I've heard a positive comment from ChIkEn.
    Correction you're the first person to get a positive comment from chicken :p

    marbs 17 years, 2 months ago

    Wow, that's much better than any of my attempts at a physics engine, however I think I will stick with GMphysics =P

    LoserHands 17 years, 2 months ago

    Cool, but not as good as GMPhysics.

    Crane-ium 17 years, 2 months ago

    It's pretty good, but the rectangular box is really glitchy. It's fun to toss up the boxes and let them rain down.

    Also, that's not really a positive comment, but it's probably the first non-negative comment given by ChIkEn.

    Shork 17 years, 2 months ago

    If you can properly mimic field forces, you will have an awesome engine. I have yet to figure out how to accuratly model gravity and electromagnetism in GM. I can get an interaction between two objects adequatly, but I haven't been able to get a multiple object system to work, they run into each other, bounce off, and become so fast that they fly away, which would never happen in real life.