Which 2d physics library?

BlitzMax Forums/BlitzMax Programming/Which 2d physics library?

Retimer(Posted 2008) [#1]
I would like to move forward and add some actual physics into my engine, rather then only supporting simple server-side tile collision detection.

I haven't used too much of box2d/chipmunk/farseer, so i'm just curious from the people who have, if there is any randomization to any of the physics, and if there's any major bugs I should know about these libraries before investing any effort with them.

I have no specific use with these, as the games generated with my engine could be of any genre. So i'm just looking for something practical.

Suggestions, tips?


Hotcakes(Posted 2008) [#2]
Hmm, I'm currently about to start using SSwift's Sprite system with it's physics... but not sure on the speed of the system yet. The way it runs in the demo does not inspire confidence in the performance in a real environment.

EDIT : I should point out that the demo is based on an old version of his physics/sprite system and when I hastily plugged it into the newer version things ran badly, but that is just as likely to be my fault than Shauns code per se. I'm yet to test it on my current project.

EDIT EDIT : The sprite system itself is freakin awesome. =]

EDIT EDIT EDIT : After testing, I can't recommend it for any complex games that use more than a hundred sprites.


Retimer(Posted 2008) [#3]
I wasn't aware of sswifts sprite system, or that it has a physics library, but from your review I think I would avoid it. I also like being able to manipulate source code if needed, as I doubt I would be able to with that.


tonyg(Posted 2008) [#4]
... if you want a lightweight, Bmax written, source code providing, 2D Physics library then check out Physlite


markcw(Posted 2008) [#5]
I didn't know Physlite was available.
Licenses are not available at this time. Please check back at a future date.



tonyg(Posted 2008) [#6]
I didn't know Physlite was available.

Licenses are not available at this time. Please check back at a future date.


Hmmm, that's news to me. No mention in the forums (although there's been nothing in there for 6 months+).
I also notice Oddball's forum post count is currently 666... a bit disturbing.
<edit> P.S. Pixiedust looks interesting.


Yahfree(Posted 2008) [#7]
Chipmunk's quite good, there's just a problem with elastic shapes stacking.

Box2d is slightly more complex then chipmunk but doesn't suffer from the stacking issue.


Retimer(Posted 2008) [#8]
... if you want a lightweight, Bmax written, source code providing, 2D Physics library then check out Physlite


Another I haven't heard of, and it mentions to be open source as well, but no news for 6 months? meh =(

Chipmunk's quite good, there's just a problem with elastic shapes stacking.

Box2d is slightly more complex then chipmunk but doesn't suffer from the stacking issue.


This is the exact information I was looking for. Thanks. I actually had an eye on Box2d. I suppose i'll narrow my options down to these two and do some benchmarks.
Farseer is amazing, but I find it oh so slow.


Oddball(Posted 2008) [#9]
markcw said:
I didn't know Physlite was available.
Physlite has previously been on sale. However, as I only get a limit amount of computer time a week, sometime only an hour/week, I was unable to deal with delivery/support as the module became more popular. I'm looking to get it back on sale as soon as possible, as every day it's unavailable equals lost sales. So I guess I'm saying watch this space.

tonyg said:
Hmmm, that's news to me. No mention in the forums (although there's been nothing in there for 6 months+).
I also notice Oddball's forum post count is currently 666... a bit disturbing.
<edit> P.S. Pixiedust looks interesting.
Hi tonyg, hope your still enjoying PhysLite. My limited computer time, this is the first PC I've seen in two weeks, also means I spend very little time on this forum, but I do check the PhysLite forum as often as I can, so all posts there will be answered. I've not really officially announced PixieDust. The page on my site is merely a placeholder for now. It's still a long way off.

Retimer said:
[The PhysLite site] mentions to be open source as well, but no news for 6 months? meh =(
Just feel I need to clear something up. PhysLite is not open source. The source is provided and you can make any modifications you wish, but those changes will not be supported or adopted by me, and releasing any PhysLite code, modified or not, is strictly prohibited.

And to actually add to the original topic, Chipmunk, Box2D, and Farseer are all very capable and free. I'd always recomend spending some time with them yourself before making a final choice. After all, only you know what works best for you.


slenkar(Posted 2008) [#10]
box2d is pretty dang complicated


Retimer(Posted 2008) [#11]
It's pretty simple - like anything else, once you get the hang of it. It's flexibility vs complexity.

and you can make any modifications you wish, but those changes will not be supported or adopted by me


I wouldn't dream of changing public source anyways, and I don't understand people who do - It bloats things and makes them far too difficult to work with when 5 different styles of code/features are placed into the same project.

and releasing any PhysLite code, modified or not, is strictly prohibited


Considering it's a 'product', I think one can already assume that.

After all, only you know what works best for you.


True, and it usually ends up that way anyways ;-)
but I value my short time spent developing, and while i'm looking for advice on something, there is usually someone who wants to share their experiences at the same time.


Hotcakes(Posted 2008) [#12]
The source is provided and you can make any modifications you wish, but those changes will not be supported or adopted by me, and releasing any PhysLite code, modified or not, is strictly prohibited.

That makes it open source, just not free.


Oddball(Posted 2008) [#13]
Hotcakes said:
That makes it open source, just not free.
No it doesn't.


siread(Posted 2008) [#14]
Any chance of getting Physlite?


CodeGit(Posted 2008) [#15]
I'm also interested in purchasing a copy of Physlite. When will be available?


Oddball(Posted 2008) [#16]
Okay PhysLite licenses are once again available for sale. I am still swamped with work at the moment so don't be worried if it takes me a couple of days to deliver the source. So I guess come and get it.