advanced 2D physics engine?
Started by Seriema, Dec 28 2004 11:46 AM
16 replies to this topic
#1 Members - Reputation: 628
Posted 28 December 2004 - 11:46 AM
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
Sponsor:
#2 Members - Reputation: 430
Posted 28 December 2004 - 01:28 PM
Its not exactly an engine, but whenever I need physics code I just take it from http://www.magic-software.com/SourceCode.html. Also, if you own the book Game Physics by David Eberly, you can download the entire Wild Magic Engine with Physics support for free.
It may not be exactly what you want, but as far as code for 2D Physics, this is the best I have found. There is source code for 2D and 3D geometry. If anyone else knows of an actual engine I would be interested in this too.
It may not be exactly what you want, but as far as code for 2D Physics, this is the best I have found. There is source code for 2D and 3D geometry. If anyone else knows of an actual engine I would be interested in this too.
#3 Members - Reputation: 628
Posted 28 December 2004 - 11:27 PM
thank you wyrzy for the tip. I just got two concerns about that lib, 1) it's still focused on 3d even though it supports 2d in some places. 2) this:
// Magic Software, Inc.
// http://www.magic-software.com
// http://www.wild-magic.com
// Copyright © 2004. All Rights Reserved
//
// The Game Physics source code is supplied under the terms of the license
// agreement http://www.magic-software.com/License/GamePhysics.pdf and may not
// be copied or disclosed except in accordance with the terms of that
// agreement.
And when reading that license, the first thing is:
"(a) You must own a copy of The Book (“Own The Book”) to use The Software. Ownership of one
book by two or more people does not satisfy the intent of this constraint."
Since I don't have the book it would be wrong to use the code, even thought it's right there and I can almost smell it! :P
// Magic Software, Inc.
// http://www.magic-software.com
// http://www.wild-magic.com
// Copyright © 2004. All Rights Reserved
//
// The Game Physics source code is supplied under the terms of the license
// agreement http://www.magic-software.com/License/GamePhysics.pdf and may not
// be copied or disclosed except in accordance with the terms of that
// agreement.
And when reading that license, the first thing is:
"(a) You must own a copy of The Book (“Own The Book”) to use The Software. Ownership of one
book by two or more people does not satisfy the intent of this constraint."
Since I don't have the book it would be wrong to use the code, even thought it's right there and I can almost smell it! :P
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
#4 Members - Reputation: 348
Posted 29 December 2004 - 06:15 AM
I'm writing a 2D only physics engine. My belief is that while the 3d physics engines are just starting to get into good user/environment interaction, there is already plenty of horsepower in the newer computers to do realtime liquid, mass objects physics if it is limited to 2D.
What are your reasons for wanting 2D only?
What are your reasons for wanting 2D only?
#5 Members - Reputation: 628
Posted 29 December 2004 - 07:52 AM
Quote:
Original post by pTymN
What are your reasons for wanting 2D only?
My game is in 2D :) I don't need the z-axis for anything. I'm making a platform kind of game.
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
#6 Members - Reputation: 723
Posted 29 December 2004 - 08:42 AM
After little Googling I've found this one:
http://www.aidspan.org/alec/projects/
there are some 2d physics demos + source code, it could be worth to look at it.
I second that - if anyone could share some good links to 2d physics engines (though I think such ones don't exist) or even completed 2d game's engines, that use 2d physics, I would also be greatly interested in it - from experience I know that writing 2d algorithms based on 3d versions isn't just dropping out z axis :-)
EDIT:
wow, look what I've found (following one of the links in above URL): http://physical.alecrivers.com/
Looks very interesting...
http://www.aidspan.org/alec/projects/
there are some 2d physics demos + source code, it could be worth to look at it.
Quote:
If anyone else knows of an actual engine I would be interested in this too.
I second that - if anyone could share some good links to 2d physics engines (though I think such ones don't exist) or even completed 2d game's engines, that use 2d physics, I would also be greatly interested in it - from experience I know that writing 2d algorithms based on 3d versions isn't just dropping out z axis :-)
EDIT:
wow, look what I've found (following one of the links in above URL): http://physical.alecrivers.com/
Looks very interesting...
#7 Members - Reputation: 628
Posted 30 December 2004 - 01:29 AM
Yes I found those links on my google run too. But they aren't that well documented. And the PHYSICAL thingie is some kind of game maker, with physics.
Someone should really make a 2D ODE *cough* *cough* ;)
Someone should really make a 2D ODE *cough* *cough* ;)
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
#8 Members - Reputation: 184
Posted 31 December 2004 - 12:06 PM
you can try my 2d engine, kyc-bats.sf.net (~30meg .rar chronodoll download, and click on the screenshots link for an idea of how it looks).
I plan on rewriting it sometime after finishing my current game, but that may be a few months from now.
If you decide to take a look, make sure you check out all of the different builds. Also some of the binaries are not representative of the sources, so rebuild if you can. You can also change the map files and change the springiness and masses, etc... A noteworthy build is chronobeast (it's just cool heh).
Btw the *.msp files are project files for the MinGW Developer Studio IDE, google.
I plan on rewriting it sometime after finishing my current game, but that may be a few months from now.
If you decide to take a look, make sure you check out all of the different builds. Also some of the binaries are not representative of the sources, so rebuild if you can. You can also change the map files and change the springiness and masses, etc... A noteworthy build is chronobeast (it's just cool heh).
Btw the *.msp files are project files for the MinGW Developer Studio IDE, google.
#11 Moderators - Reputation: 1500
Posted 13 June 2006 - 07:56 AM
Quote:I've been meaning to try it out, but have been postponing the effort until Tao moves to .NET 2.0 and we get a Mono binary of Physics2D working....
Original post by BioSlayer_
you can try out my 2D physics engine.
http://physics2d.sourceforge.net/
#13 Members - Reputation: 172
Posted 29 October 2006 - 01:45 AM
Quote:
There should be some 2D physics engine that's capable of some rigid bodies, ropes, collision detection, friction, etc. Right?
This is a really important discussion. For us not capable for different reasons an easy-to-use 2D physics library with these features is just what we need. I got several amazing ideas I could make with a library like this is my hands.
The closest thing I found was this but it is discontinued due to the developer running out of time, but it looks really promising. The complex demo is just awesome and shows some of what you can do with the power of 2d physics:
http://flatland.sourceforge.net/
If there's anything better or easier, please let me know!
#14 Members - Reputation: 139
Posted 29 October 2006 - 05:17 PM
http://www.gphysics.com/archives/18 seems pretty good, rigid body with joints.
#15 Members - Reputation: 122
Posted 13 December 2006 - 03:11 PM
There a few pretty good 2d physics engines written in flash, so you could port the open source ones over to whatever programming language you use and even use them as a starting point for your own engine.
Flade (Flash Dynamics Engine) - http://cove.org/flade/
This engine is not in development anymore (see next section), but it's still very good, especially since it's open source.
APE (Actionscript Physics Engine) - http://www.cove.org/ape/
The continuation to Flade, APE is still in the early alpha stage, so it doesn't have as many features as Flade, but it shows very much promise for the future. It's also open source, so you can tinker around with it :P
Others
The Fisix Engine(http://www.fisixengine.com/) isn't open source, but there will be tutorials posted on the site.
The Motor Flash Physics(http://lab.polygonal.de/) is another engine, I'm not sure if it's open source or not.
Flade (Flash Dynamics Engine) - http://cove.org/flade/
This engine is not in development anymore (see next section), but it's still very good, especially since it's open source.
APE (Actionscript Physics Engine) - http://www.cove.org/ape/
The continuation to Flade, APE is still in the early alpha stage, so it doesn't have as many features as Flade, but it shows very much promise for the future. It's also open source, so you can tinker around with it :P
Others
The Fisix Engine(http://www.fisixengine.com/) isn't open source, but there will be tutorials posted on the site.
The Motor Flash Physics(http://lab.polygonal.de/) is another engine, I'm not sure if it's open source or not.
#16 Members - Reputation: 247
Posted 13 December 2006 - 08:46 PM
I think I've ranted about just using plain ODE for 2D physics before, but I'll happily do it again :)
To my experience, plain ODE works perfectly for 2D. Just keep all your Z-values zero, and everything just stays perfectly in the XY plane. Furthermore, only do rotations and torques around <0,0,1>. Voila. A very good 2D physics engine, no need for any modifications/extensions to ODE.
This is the approach used by xmoto. The primary downside to this is the heavier computational requirements: a strict 2D physics approach would lower these quite a lot.
To my experience, plain ODE works perfectly for 2D. Just keep all your Z-values zero, and everything just stays perfectly in the XY plane. Furthermore, only do rotations and torques around <0,0,1>. Voila. A very good 2D physics engine, no need for any modifications/extensions to ODE.
This is the approach used by xmoto. The primary downside to this is the heavier computational requirements: a strict 2D physics approach would lower these quite a lot.
#17 Members - Reputation: 150
Posted 05 August 2008 - 08:36 PM
Again: Rise from your grave!
Ok, you are wondering: Why you ressurected a THAT old topic?
It is because after some time with the same problem (since 2005 btw), this topic helped me much, and now finally I can contribute back!
The thing is still new, but it works well (and it suits well my game in particular, since I do not need soft-bodies, ropes, liquids and that sort of thing that still is not done), Chipmunk: http://wiki.slembcke.net/main/published/Chipmunk
Ok, you are wondering: Why you ressurected a THAT old topic?
It is because after some time with the same problem (since 2005 btw), this topic helped me much, and now finally I can contribute back!
The thing is still new, but it works well (and it suits well my game in particular, since I do not need soft-bodies, ropes, liquids and that sort of thing that still is not done), Chipmunk: http://wiki.slembcke.net/main/published/Chipmunk







