box2d Module - v2.3.0 rev(247)
BlitzMax Forums/BlitzMax Programming/box2d Module - v2.3.0 rev(247)
| ||
Hi Since the box2d module from Brucey is outdated, last week I started to port the last svn to BlitzMax. http://code.google.com/p/arme-mod/ Only a few class and the Hello World example are currently ported. It's "working" but unfortunately I do not get the expected result when running that example. The example create a ground object and a dynamic box over it. Normally the box should collide when falling but he's not (pass through). I think it's coming from the fixtureDef.SetShape(dynamicBox) line. Using a fixture is another way to create a body. If I use the same method with ground for my box, collision is happening. But using a fixture won't work and fixtureDef.GetShape() return null so I guess SetShape isn't really working the way it should. If somebody can help me to figure out what's going on, I could continue my work on this. Thank you ! |
| ||
YES ! I found my error :D My bmx_b2fixturedef_create declaration was returning an :Object while it should return a :byte ptr (since it's the only way to operate with C++ Objects). The compiler never report a single warning for that kind of error, this making the task more difficult, but it's doable :) Last edited 2012 |
| ||
Nice thing that you're working on that module Armitage! Are you gonna make it open source? |
| ||
Yeah probably, only if I get something decent and complete. That way C++ Guru will be able to improve, rectify mistakes and update from the original library. It's going to be long so don't hold your breath ;) |
| ||
I successfully port 2 testbed examples with debug draw and all. Erin adds so many Callback, Class, Struct, Enum and undocumented stuff everywhere that I'm seriously loosing myself in this library :( I'm currently bugging at the implementation of the b2QueryCallback. For some complex behaviors like pre-solving or world query you need to double the amount of code and worst : since you need object callback everywhere, there is so much "bridge" between C++ and BlitzMax that I wondering if it won't be slower than the current one. There is a few nice new additions in the current version of Box2d rev 250 but it's starting to get too complicated for a physics library... Already around 8000 lines and I only ported roughly 10% of the whole libs... piouff Last edited 2012 |