Box2D (v2.2.0)

19 replies [Last post]
by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
by: Grun
Status: Offline
Joined: 2010-09-01
Points: 1800
Has anyone managed to use it

Has anyone managed to use it flawlessly in a project?

by: Grun
Status: Offline
Joined: 2010-09-01
Points: 1800
Hello? I'm getting a weird

Hello? I'm getting a weird error on CreateBody while debugging on GCC ARM.

Anybody reading?

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
Hi Grun, I replied to your

Hi Grun, I replied to your email around a week ago. Guess it didn't arrive!

Try bd.position.Set(x, y);
Or did I misunderstand the error?

by: Grun
Status: Offline
Joined: 2010-09-01
Points: 1800
Thanks for answering blitter.

Thanks for answering blitter. And yay, it ain't in my inbox (yet)

Well, I've tried that but still get the same sigtrap just after CreateBody.

IwAssert failure:
Channel: S3E
File: iwcrt_common.cpp
Line: 822
Expression: false
Message: application aborted

Callstack:
(empty callstack)

by: Grun
Status: Offline
Joined: 2010-09-01
Points: 1800
I have a feeling it might

I have a feeling it might have something to do with the new (mem) stuff.

by: Grun
Status: Offline
Joined: 2010-09-01
Points: 1800
Was the b2Asserts on b2Body's

Was the b2Asserts on b2Body's constructor!

Taking them off is a bit...unpolite, if you will, but sure it works now.

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
Hi iainprice, I've just

Hi iainprice, I've just pushed an example project for you.

It uses Iw2D, I normally use raw GL but Iw2D allowed to keep things relatively simple for the example.

by: iainprice
Status: Offline
Joined: 2011-11-02
Points: 160
Hi, I have used box2d on

Hi,

I have used box2d on win32 and NDS but I am new to Marmalade. I am having poblems setting the environment. Does anyone have a simple Hello World that links the Box2D libs? Thanks.

by: iainprice
Status: Offline
Joined: 2011-11-02
Points: 160
Thank you

Thank you

by: iainprice
Status: Offline
Joined: 2011-11-02
Points: 160
I build the library, I build

I build the library, I build the solution but it hangs on the emulator. I have added a flush and a swap buffer but still hangs, am I missing something?

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
Can you confirm that other

Can you confirm that other examples are working correctly, for example Iw2DTransfomsSubPixel.mkb

by: iainprice
Status: Offline
Joined: 2011-11-02
Points: 160
Ahhh, graphics driver

Ahhh, graphics driver problem.....

by: pugmartin
Status: Offline
Joined: 2011-01-11
Points: 200
Hi Blitter, Where is the

Hi Blitter,

Where is the example project mentioned?

Compiling the library seems to work, I just need something to get me started on which to build.

Has anyone any tutorials that start with grabbing the above through to implementing a basic Hello World style testbed?

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
Hi pugmartin The example is

Hi pugmartin

The example is in the "HeyBox2D" folder!

by: JimmyDeemo
Status: Offline
Joined: 2012-01-11
Points: 80
Blitter (or anyone). I'm

Blitter (or anyone).

I'm trying to get this example to run, but I can't seem to get a Box2d_d.lib to compile it with. I've tried grabbing the Box2d with the same version number as the one you have bundled here, but I seem to only be able to output release versions of the .lib.

What did you (or others) do to get hold of an appropriate Box2d_d.lib?

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
Hi Jimmy, just build required

Hi Jimmy, just build required library by running box2d.mkb and hitting compile for each solution configuration (x86 debug, arm...).
After that you only need to use the box2d_library.mkf as a sub-project in your normal app.

Or you could just use the other .mkf and compile direct to your project - that would actually be for advanced cases where you wanted to tweak around with b2Settings.h (not recommended for most cases).

by: JimmyDeemo
Status: Offline
Joined: 2012-01-11
Points: 80
Blitter, Ah thanks for

Blitter,

Ah thanks for that.

Perhaps it was because I was new to both Marmalade and the C++ version of Box2D, but it was unclear to me that I had to build the libs I needed first, from your code.

In hindsight I can see that was a little silly of me but might a suggest a little step by step, getting started guide to building and running the example?

Thanks again for the project as a whole.

Edit: Also Blitter, just out of interest, how do you set up this ready for new projects? Do you just copy and paste the the .mkf and files into a fresh project? Perhaps you can place the needed files into 'C:\Marmalade\5.2\modules' or similar to have it run like other sub projects?

Jimmy.

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
You're welcome Jimmy. Like

You're welcome Jimmy.

Like I said, you only build the libs when you are not planning to edit the (box2d) sub-project. But you don't have to build them if you don't mind re-compiling each time you edit your main mkb (for example). Actually I just did a similar thing to Bullet (also on GitHub) as i could make a coffee in half the time it was taking to compile!

As for the example program, I should have used IwGL1/2 (1 for examples).

I used to copy the sub-projects to the appropriate Marmalade folder, so that a sub-project could be included with just-one-word, but after updating Marmalade SDK every few weeks I soon started to store them in my project's parent folder...so now I just point to them with a ../ at the start. Little things like that add up to a smooth experience where the computer is always waiting for me and never the other way around.

by: Jez Hammond
Status: Offline
Joined: 2010-10-11
Points: 20130
'Olilanz'

'Olilanz' (https://github.com/olilanz) has updated this Box2D project to v2.2.1 https://github.com/blitter/Box2D-for-Marmalade - However, I always have a little trouble with the hub and see that the Marmalade folder still links to the older v2.2.0 version. Does anyone know how to amend this please?

Also, I have uploaded v2.79 of *BULLET* Physics Library! (for Marmalade)...Again I'm having difficulty attempting to request this update to the older version, in the Marmalade section of GitHub. The old version was created by 'gameslovin' but there is no contact email or forum thread? If I try to Fork it then a rename is requested.
So here's a link to Bullet-for-Marmalade v2.79 (note that I didn't go for the brand new v2.8 yet as it's mostly for the new desktop GPUs)...
https://github.com/blitter/Bullet-for-Marmalade
(I will make a seperate thread when the above is resolved:)

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810