-
[WIP] 2d rigid body physics engine
demo: http://lab.generalrelativity.org/foam/friction
i started work a few weeks ago on a rigid body physics engine. mostly because it's challenging and fun for me, though i will be releasing it all open-source.
there are currently no optimizations in place and there's a ton i'd like to add. it's built with the idea of being very extensible and has some sexy stuff going on- i'm happy to share with anyone interested
a lot of the physics engines out there dont' seem to portray weight appropriately- same with friction so those were 2 of my main goals.
anyway, i'm interested in your thoughts. thanks!
sorry for the enormous dimensions...
-
Senior Member
Really neat demo! I like pulling the pentagons around on the ground with the mouse - sometimes they slide and sometimes they spin like wheels, depends upon how gently you tug them. Very satisfying emergent behavior. What kind of integration does it use? Seems very stable.
I think another neat primitive would be a polyline mass/spring system or something - to make flexible chains that are articulated. I suspect this is easy to do. I would think you could compose them out of multiple point masses and interconnecting springs. For the point masses inside the chain, I would make them ineligible for collision detection and don't even render them to screen - so it still looks like 1-pixel rope, but it's bendy rope.
If those two tethers that held up the platform were decomposed into chains, I think you would get really neat emergent behavior when you dropped a mass onto it from a high height - the recoil back up could slacken the chains and make it form interesting shapes other than just straight lines.
It's very fun.
EDIT: added an old example AS2 .swf that models a mass-spring polyline thing. (left/right/up moves the ship, pick up the block with the tow cable, space releases the block).
Last edited by rachil0; 01-07-2008 at 04:51 AM.
-
Elvis...who tha f**k is Elvis?
Very nice engine, newblack
-
Senior Member
Very nice indeed, what are you using as 3.0 or as 2.0?
Just a detail, could it be possible you added some walls to keep the objects from leaving the scene? I ran out of objects because I keep tossing them outside the screen.
-
Script kiddie
All I get is a blank grey screen, the window is titled 'Flash Player Installation-", and I have the very latest Flash Player.
-
Game Player - Developer
I have some problems loading the page
"I love to make them as I love to play them"
-
Senior Member
Wow! I was very impressed. I will be interested to look at your code when you release it.
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
thanks everyone
@rachil0-->
cool constraint demo- i plan on adding lots of different constraints: bungee cords, rope etc. this demo uses a Runge Kutta numerical integrator. i modeled the ordinary differential equation/solvers after "open source physics": http://www.opensourcephysics.org/ which allows for easy switching of solvers.
@AzraelKans-->
it's AS3. i'll share a new demo when there's new stuff to show
@VENGEANCE/scheletro-->
sorry- no idea why... out of laziness it's the canned *everything* flash player detection that comes with an ActionScript project in Flex Builder. faulty player detection is a huge pet peeve of mine, so i'll look into it when i get home from work.
-
Game Player - Developer
now I can see it!
Very impressive, of course i want to know how is been made, wow
"I love to make them as I love to play them"
-
M.D.
-
5+5=55
Wow. This is an amazing demo I can't wait to see what can be made with this. Great job!
-
FK founder & general loiterer
Really nice work, I can't wait til you release it!
-
Nice, are you planning on turning into a general engine? It eats my CPU at the moment...
-
Like rje it consumes about 95% of my CPU. Thats not good news at all really. Unless you plan to only do technical demonstrations with it. But its extremely impressive nonetheless.
-
crashed my browser at home , runs ok here at uni but lots of CPU consuming. If I were to improve it then it would be 90% of the resources for good performance
-
Originally Posted by newblack
there are currently no optimizations in place
there's tons that needs to and will be done for performance
-
Senior Member
Keep up the good work. I can see doing a physics game maybe as my third game (wow, talk about getting ahead of myself!!) and the more engines out there the more likely I will find one that will work for me and that I can comprehend!
I love playing with physics games. Not sure if my math is up to snuff enough to make them though. Funny that I got straight A's all through my physics courses, straight A's through Calculus all the way through Calc4 (linear equations I think? The one with all the fourier transforms). Okay, I got a B in calc 2. I suck at integrals. And now I don't remember ANYTHING about that stuff. Use it or lose it is true I guess.
-
Originally Posted by Cortana
Unless you plan to only do technical demonstrations with it.
I don't know how much flash devs really use physics engines... my guess is that a large percentage of the time a custom solution is implemented. I'd like this project to be an extremely well-documented, well-commented, open-source reference. the math/physics/geometry involved has been pieced together from a wide variety of sources- none of which are well documented/straightforward (though i've never studied physics, so maybe i just don't get it!). basically i'm attempting to build what i would have wanted to find when starting out.
Some of the stuff I'm doing is purposefully not optimized so as to be extensible and applicable to a wider range of problems.
-
rachil0: Thats really cool that chain thing, I like that a lot. Neat! A also like the physics engine, neat.
-
that is really really really awesome i hope you are done soon.
you should also add circles
also i found a glitch with the sticks, you can pick them up from anywhere as long as the mouse is on the same _y level as it.
Last edited by jasonpeinko; 08-30-2007 at 08:41 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|