I'm attempting to build Box2D under Android NDK for a game I'm
planning to write.. and for science I guess.
Currently I'm experiencing an issue with a few missing includes. These
are:
- #include <memory>
- #include <climits>
- #include <cstring>
- #include <cstdlib>
I was wondering if anyone could guide me on either enabling support
for these includes under the NDK, or replacing their usage with
something NDK friendly.
Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
background.
> I'm attempting to build Box2D under Android NDK for a game I'm > planning to write.. and for science I guess. > Currently I'm experiencing an issue with a few missing includes. These > are: > - #include <memory> > - #include <climits> > - #include <cstring> > - #include <cstdlib>
Thanks! Got it compiling and hacked out a ball bouncing test. Time
stepping etc. feels a bit wrong.. i.e. too slow, but the performance
is *so* much better than JBox2D (thanks to the whole no garbage
collection thing).
Here are my slop projects if anyone is looking to do this.
> > I'm attempting to build Box2D under Android NDK for a game I'm
> > planning to write.. and for science I guess.
> > Currently I'm experiencing an issue with a few missing includes. These
> > are:
> > - #include <memory>
> > - #include <climits>
> > - #include <cstring>
> > - #include <cstdlib>
I didn't I guess. At most I replaced STL includes with equivalent
standard headers. My fixes were:
- What Tim Hutt said ;) (changing includes from <climits> to
"limits.h" and so on)
- Adding #include <new> to some files that weren't building.
- Adding a method b2Min(int32 a, int32 b) { ... } because the current
b2Min(T a, T b) was not being found for some reason.
All seems to be working, or at least compiling.
On Jun 28, 4:20 am, ogi <ogi.andr...@gmail.com> wrote:
Your code works for sure. The latest Box2D source I've got from the
repository uses #include <algorithm> and I weren't able to compile it,
so I used your version and made a nice game. I guess you use some
previous version.
Don't tell anyone.. but all I did was remote the #include <algorithm>
lines.. they don't seem to be used?
I mean I'm not great at C++ or anything, but if you don't have an
#include it's relying on it shouldn't compile right?
On Jun 28, 9:48 pm, ogi <ogi.andr...@gmail.com> wrote:
> Your code works for sure. The latest Box2D source I've got from the
> repository uses #include <algorithm> and I weren't able to compile it,
> so I used your version and made a nice game. I guess you use some
> previous version.
Now that's a great thing you did, I would probably never think of it
myself :) Anyway, I'm so glad to have Box2D on Android and it seems
you're one of the first to do it. It handles so many objects without
lagging and runs so smooth. The closest thing in performance I've
tested is Simpull, but it has very limited functionality.
On Sun, Jun 28, 2009 at 11:46 PM, ogi <ogi.andr...@gmail.com> wrote:
> Now that's a great thing you did, I would probably never think of it
> myself :) Anyway, I'm so glad to have Box2D on Android and it seems
> you're one of the first to do it. It handles so many objects without
> lagging and runs so smooth. The closest thing in performance I've
> tested is Simpull, but it has very limited functionality.
> Thanks! Got it compiling and hacked out a ball bouncing test. Time
> stepping etc. feels a bit wrong.. i.e. too slow, but the performance
> is *so* much better than JBox2D (thanks to the whole no garbage
> collection thing).
> Here are my slop projects if anyone is looking to do this.
> > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > planning to write.. and for science I guess.
> > > Currently I'm experiencing an issue with a few missing includes. These
> > > are:
> > > - #include <memory>
> > > - #include <climits>
> > > - #include <cstring>
> > > - #include <cstdlib>
On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com> wrote:
> Hey,
> I'm attempting to build Box2D under Android NDK for a game I'm
> planning to write.. and for science I guess.
> Currently I'm experiencing an issue with a few missing includes. These
> are:
> - #include <memory>
> - #include <climits>
> - #include <cstring>
> - #include <cstdlib>
> I was wondering if anyone could guide me on either enabling support
> for these includes under the NDK, or replacing their usage with
> something NDK friendly.
> Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
> background.
> ah you know there is android port of that engine right?
> On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com> wrote:
> > Hey,
> > I'm attempting to build Box2D under Android NDK for a game I'm
> > planning to write.. and for science I guess.
> > Currently I'm experiencing an issue with a few missing includes. These
> > are:
> > - #include <memory>
> > - #include <climits>
> > - #include <cstring>
> > - #include <cstdlib>
> > I was wondering if anyone could guide me on either enabling support
> > for these includes under the NDK, or replacing their usage with
> > something NDK friendly.
> > Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
> > background.
> On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > ah you know there is android port of that engine right?
> > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com> wrote:
> > > Hey,
> > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > planning to write.. and for science I guess.
> > > Currently I'm experiencing an issue with a few missing includes. These
> > > are:
> > > - #include <memory>
> > > - #include <climits>
> > > - #include <cstring>
> > > - #include <cstdlib>
> > > I was wondering if anyone could guide me on either enabling support
> > > for these includes under the NDK, or replacing their usage with
> > > something NDK friendly.
> > > Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
> > > background.
Ah, the android port of the JBox2D test bed?
Either way I've fiddled with JBox2D under android with horribly laggy
results. The garbage collection runs constantly causing major UI lag.
Too many temporary object creations (Vec2 especially).
Either way I think a nice JNI layer on top of Box2D (C++) is the way to go
at the moment.
On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
<email.nex.softw...@gmail.com>wrote:
> I believe he is referring to an Android port of JBox2D.
> On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > No? Are you talking about JBox2D?
> > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > ah you know there is android port of that engine right?
> > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> wrote:
> > > > Hey,
> > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > planning to write.. and for science I guess.
> > > > Currently I'm experiencing an issue with a few missing includes.
> These
> > > > are:
> > > > - #include <memory>
> > > > - #include <climits>
> > > > - #include <cstring>
> > > > - #include <cstdlib>
> > > > I was wondering if anyone could guide me on either enabling support
> > > > for these includes under the NDK, or replacing their usage with
> > > > something NDK friendly.
> > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
> > > > background.
I've been playing around with your project (awesome that you posted
it, by the way) and have gotten pretty good results from it. I am not
doing anything fancy but I was able to place a hundred balls (and
blocks) and still get decent performance. I'm not experienced with C
or C++ (or Box2D) but this seems to be a good way to learn haha. I am
not going to try some other things from the testbed, for my own
learning purposes and my ultimate goal is to create a nice little
game. Thanks for the head start. That break-out type game in the
Market that is using JBox2D would, I think, greatly benefit from using
this approach.
On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> Ah, the android port of the JBox2D test bed?
> Either way I've fiddled with JBox2D under android with horribly laggy
> results. The garbage collection runs constantly causing major UI lag.
> Too many temporary object creations (Vec2 especially).
> Either way I think a nice JNI layer on top of Box2D (C++) is the way to go
> at the moment.
> On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
> <email.nex.softw...@gmail.com>wrote:
> > I believe he is referring to an Android port of JBox2D.
> > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > No? Are you talking about JBox2D?
> > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > ah you know there is android port of that engine right?
> > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > wrote:
> > > > > Hey,
> > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > planning to write.. and for science I guess.
> > > > > Currently I'm experiencing an issue with a few missing includes.
> > These
> > > > > are:
> > > > > - #include <memory>
> > > > > - #include <climits>
> > > > > - #include <cstring>
> > > > > - #include <cstdlib>
> > > > > I was wondering if anyone could guide me on either enabling support
> > > > > for these includes under the NDK, or replacing their usage with
> > > > > something NDK friendly.
> > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a Java
> > > > > background.
Glad you got some use out of it :)
It can be done a lot cleaner, that code is just my initial hack and slash to
see if I can get it working. But yeah it's a starting point.
I'm also fairly new to C/C++, I've done the odd modification and can read
it, but yeah I've learnt a fair bit playing with the NDK so far.
Currently writing a game using this, and at the same time writing a layer of
Java sitting on top of NDK Box2D so the Android Java code is clean. Will
probably release it when done (writing with a friend so will have to speak
to him).
I noticed the break out style game, emailed the developer (Aki) and linked
him here. Seems to be making progress, he modified his JBox2D tests to also
be run under native Box2D and put it into a demo app. The performance
differences are pretty crazy.
JBox2D started going into crazy garbage collection whenever multiple balls
are added (I'm assuming because of the way it handles contacts), Box2D NDK
stayed fast up to the limit of balls the demo supported (46) the only thing
that dropped a little was FPS.
So definately worth using if you want a game with real physics.
Anyway, have fun with it. Let me know if you have any success stories or
find something cool :)
Lots of possibilities with a proper physics engine.
On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
<email.nex.softw...@gmail.com>wrote:
> I've been playing around with your project (awesome that you posted
> it, by the way) and have gotten pretty good results from it. I am not
> doing anything fancy but I was able to place a hundred balls (and
> blocks) and still get decent performance. I'm not experienced with C
> or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> not going to try some other things from the testbed, for my own
> learning purposes and my ultimate goal is to create a nice little
> game. Thanks for the head start. That break-out type game in the
> Market that is using JBox2D would, I think, greatly benefit from using
> this approach.
> On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > Ah, the android port of the JBox2D test bed?
> > Either way I've fiddled with JBox2D under android with horribly laggy
> > results. The garbage collection runs constantly causing major UI lag.
> > Too many temporary object creations (Vec2 especially).
> > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> go
> > at the moment.
> > On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
> > <email.nex.softw...@gmail.com>wrote:
> > > I believe he is referring to an Android port of JBox2D.
> > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > No? Are you talking about JBox2D?
> > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > ah you know there is android port of that engine right?
> > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > wrote:
> > > > > > Hey,
> > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > planning to write.. and for science I guess.
> > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > These
> > > > > > are:
> > > > > > - #include <memory>
> > > > > > - #include <climits>
> > > > > > - #include <cstring>
> > > > > > - #include <cstdlib>
> > > > > > I was wondering if anyone could guide me on either enabling
> support
> > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > something NDK friendly.
> > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> Java
> > > > > > background.
> Glad you got some use out of it :)
> It can be done a lot cleaner, that code is just my initial hack and slash to
> see if I can get it working. But yeah it's a starting point.
> I'm also fairly new to C/C++, I've done the odd modification and can read
> it, but yeah I've learnt a fair bit playing with the NDK so far.
> Currently writing a game using this, and at the same time writing a layer of
> Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> probably release it when done (writing with a friend so will have to speak
> to him).
> I noticed the break out style game, emailed the developer (Aki) and linked
> him here. Seems to be making progress, he modified his JBox2D tests to also
> be run under native Box2D and put it into a demo app. The performance
> differences are pretty crazy.
> JBox2D started going into crazy garbage collection whenever multiple balls
> are added (I'm assuming because of the way it handles contacts), Box2D NDK
> stayed fast up to the limit of balls the demo supported (46) the only thing
> that dropped a little was FPS.
> So definately worth using if you want a game with real physics.
> Anyway, have fun with it. Let me know if you have any success stories or
> find something cool :)
> Lots of possibilities with a proper physics engine.
> On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
> <email.nex.softw...@gmail.com>wrote:
> > I've been playing around with your project (awesome that you posted
> > it, by the way) and have gotten pretty good results from it. I am not
> > doing anything fancy but I was able to place a hundred balls (and
> > blocks) and still get decent performance. I'm not experienced with C
> > or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> > not going to try some other things from the testbed, for my own
> > learning purposes and my ultimate goal is to create a nice little
> > game. Thanks for the head start. That break-out type game in the
> > Market that is using JBox2D would, I think, greatly benefit from using
> > this approach.
> > On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > > Ah, the android port of the JBox2D test bed?
> > > Either way I've fiddled with JBox2D under android with horribly laggy
> > > results. The garbage collection runs constantly causing major UI lag.
> > > Too many temporary object creations (Vec2 especially).
> > > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> > go
> > > at the moment.
> > > On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
> > > <email.nex.softw...@gmail.com>wrote:
> > > > I believe he is referring to an Android port of JBox2D.
> > > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > No? Are you talking about JBox2D?
> > > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > > ah you know there is android port of that engine right?
> > > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > > wrote:
> > > > > > > Hey,
> > > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > > planning to write.. and for science I guess.
> > > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > > These
> > > > > > > are:
> > > > > > > - #include <memory>
> > > > > > > - #include <climits>
> > > > > > > - #include <cstring>
> > > > > > > - #include <cstdlib>
> > > > > > > I was wondering if anyone could guide me on either enabling
> > support
> > > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > > something NDK friendly.
> > > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> > Java
> > > > > > > background.
> This thread really help me.
> Thanks for sharing code and info
> On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > Glad you got some use out of it :)
> > It can be done a lot cleaner, that code is just my initial hack and slash to
> > see if I can get it working. But yeah it's a starting point.
> > I'm also fairly new to C/C++, I've done the odd modification and can read
> > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > Currently writing a game using this, and at the same time writing a layer of
> > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > probably release it when done (writing with a friend so will have to speak
> > to him).
> > I noticed the break out style game, emailed the developer (Aki) and linked
> > him here. Seems to be making progress, he modified his JBox2D tests to also
> > be run under native Box2D and put it into a demo app. The performance
> > differences are pretty crazy.
> > JBox2D started going into crazy garbage collection whenever multiple balls
> > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > stayed fast up to the limit of balls the demo supported (46) the only thing
> > that dropped a little was FPS.
> > So definately worth using if you want a game with real physics.
> > Anyway, have fun with it. Let me know if you have any success stories or
> > find something cool :)
> > Lots of possibilities with a proper physics engine.
> > On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
> > <email.nex.softw...@gmail.com>wrote:
> > > I've been playing around with your project (awesome that you posted
> > > it, by the way) and have gotten pretty good results from it. I am not
> > > doing anything fancy but I was able to place a hundred balls (and
> > > blocks) and still get decent performance. I'm not experienced with C
> > > or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> > > not going to try some other things from the testbed, for my own
> > > learning purposes and my ultimate goal is to create a nice little
> > > game. Thanks for the head start. That break-out type game in the
> > > Market that is using JBox2D would, I think, greatly benefit from using
> > > this approach.
> > > On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > > > Ah, the android port of the JBox2D test bed?
> > > > Either way I've fiddled with JBox2D under android with horribly laggy
> > > > results. The garbage collection runs constantly causing major UI lag.
> > > > Too many temporary object creations (Vec2 especially).
> > > > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> > > go
> > > > at the moment.
> > > > On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
> > > > <email.nex.softw...@gmail.com>wrote:
> > > > > I believe he is referring to an Android port of JBox2D.
> > > > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > No? Are you talking about JBox2D?
> > > > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > > > ah you know there is android port of that engine right?
> > > > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > > > wrote:
> > > > > > > > Hey,
> > > > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > > > planning to write.. and for science I guess.
> > > > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > > > These
> > > > > > > > are:
> > > > > > > > - #include <memory>
> > > > > > > > - #include <climits>
> > > > > > > > - #include <cstring>
> > > > > > > > - #include <cstdlib>
> > > > > > > > I was wondering if anyone could guide me on either enabling
> > > support
> > > > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > > > something NDK friendly.
> > > > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> > > Java
> > > > > > > > background.
> I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> to call CreateBox2 the application crashed.
> Createbox2 creates a dynamic body.
> Also I'm not able to recompile the lib because I did not succes to
> install the NDK tool yet.
> If anybody can help it could be great. I reached so many difficulties
> to install correctly make and cygwin in windowsXP.
> A clear tutorial will be winderful :)
> Thanks a lot.
> On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
> > This thread really help me.
> > Thanks for sharing code and info
> > On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > > Glad you got some use out of it :)
> > > It can be done a lot cleaner, that code is just my initial hack and slash to
> > > see if I can get it working. But yeah it's a starting point.
> > > I'm also fairly new to C/C++, I've done the odd modification and can read
> > > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > > Currently writing a game using this, and at the same time writing a layer of
> > > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > > probably release it when done (writing with a friend so will have to speak
> > > to him).
> > > I noticed the break out style game, emailed the developer (Aki) and linked
> > > him here. Seems to be making progress, he modified his JBox2D tests to also
> > > be run under native Box2D and put it into a demo app. The performance
> > > differences are pretty crazy.
> > > JBox2D started going into crazy garbage collection whenever multiple balls
> > > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > > stayed fast up to the limit of balls the demo supported (46) the only thing
> > > that dropped a little was FPS.
> > > So definately worth using if you want a game with real physics.
> > > Anyway, have fun with it. Let me know if you have any success stories or
> > > find something cool :)
> > > Lots of possibilities with a proper physics engine.
> > > On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
> > > <email.nex.softw...@gmail.com>wrote:
> > > > I've been playing around with your project (awesome that you posted
> > > > it, by the way) and have gotten pretty good results from it. I am not
> > > > doing anything fancy but I was able to place a hundred balls (and
> > > > blocks) and still get decent performance. I'm not experienced with C
> > > > or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> > > > not going to try some other things from the testbed, for my own
> > > > learning purposes and my ultimate goal is to create a nice little
> > > > game. Thanks for the head start. That break-out type game in the
> > > > Market that is using JBox2D would, I think, greatly benefit from using
> > > > this approach.
> > > > On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > Ah, the android port of the JBox2D test bed?
> > > > > Either way I've fiddled with JBox2D under android with horribly laggy
> > > > > results. The garbage collection runs constantly causing major UI lag.
> > > > > Too many temporary object creations (Vec2 especially).
> > > > > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> > > > go
> > > > > at the moment.
> > > > > On Sun, Jul 5, 2009 at 12:06 AM, nEx.Software
> > > > > <email.nex.softw...@gmail.com>wrote:
> > > > > > I believe he is referring to an Android port of JBox2D.
> > > > > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > > No? Are you talking about JBox2D?
> > > > > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > > > > ah you know there is android port of that engine right?
> > > > > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > > > > wrote:
> > > > > > > > > Hey,
> > > > > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > > > > planning to write.. and for science I guess.
> > > > > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > > > > These
> > > > > > > > > are:
> > > > > > > > > - #include <memory>
> > > > > > > > > - #include <climits>
> > > > > > > > > - #include <cstring>
> > > > > > > > > - #include <cstdlib>
> > > > > > > > > I was wondering if anyone could guide me on either enabling
> > > > support
> > > > > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > > > > something NDK friendly.
> > > > > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> > > > Java
> > > > > > > > > background.
> hi,
> you means apps/box2dtest/project in zip file dont work?
> I think it work without ndk.
> On 7月22日, 午後11:32, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > Hi,
> > I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> > to call CreateBox2 the application crashed.
> > Createbox2 creates a dynamic body.
> > Also I'm not able to recompile the lib because I did not succes to
> > install the NDK tool yet.
> > If anybody can help it could be great. I reached so many difficulties
> > to install correctly make and cygwin in windowsXP.
> > A clear tutorial will be winderful :)
> > Thanks a lot.
> > On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
> > > This thread really help me.
> > > Thanks for sharing code and info
> > > On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > > > Glad you got some use out of it :)
> > > > It can be done a lot cleaner, that code is just my initial hack and slash to
> > > > see if I can get it working. But yeah it's a starting point.
> > > > I'm also fairly new to C/C++, I've done the odd modification and can read
> > > > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > > > Currently writing a game using this, and at the same time writing a layer of
> > > > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > > > probably release it when done (writing with a friend so will have to speak
> > > > to him).
> > > > I noticed the break out style game, emailed the developer (Aki) and linked
> > > > him here. Seems to be making progress, he modified his JBox2D tests to also
> > > > be run under native Box2D and put it into a demo app. The performance
> > > > differences are pretty crazy.
> > > > JBox2D started going into crazy garbage collection whenever multiple balls
> > > > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > > > stayed fast up to the limit of balls the demo supported (46) the only thing
> > > > that dropped a little was FPS.
> > > > So definately worth using if you want a game with real physics.
> > > > Anyway, have fun with it. Let me know if you have any success stories or
> > > > find something cool :)
> > > > Lots of possibilities with a proper physics engine.
> > > > On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
> > > > <email.nex.softw...@gmail.com>wrote:
> > > > > I've been playing around with your project (awesome that you posted
> > > > > it, by the way) and have gotten pretty good results from it. I am not
> > > > > doing anything fancy but I was able to place a hundred balls (and
> > > > > blocks) and still get decent performance. I'm not experienced with C
> > > > > or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> > > > > not going to try some other things from the testbed, for my own
> > > > > learning purposes and my ultimate goal is to create a nice little
> > > > > game. Thanks for the head start. That break-out type game in the
> > > > > Market that is using JBox2D would, I think, greatly benefit from using
> > > > > this approach.
> > > > > On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > Ah, the android port of the JBox2D test bed?
> > > > > > Either way I've fiddled with JBox2D under android with horribly laggy
> > > > > > results. The garbage collection runs constantly causing major UI lag.
> > > > > > Too many temporary object creations (Vec2 especially).
> > > > > > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> > > > > go
> > > > > > at the moment.
> > > > > > > I believe he is referring to an Android port of JBox2D.
> > > > > > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > > > No? Are you talking about JBox2D?
> > > > > > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > > > > > ah you know there is android port of that engine right?
> > > > > > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > > > > > wrote:
> > > > > > > > > > Hey,
> > > > > > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > > > > > planning to write.. and for science I guess.
> > > > > > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > > > > > These
> > > > > > > > > > are:
> > > > > > > > > > - #include <memory>
> > > > > > > > > > - #include <climits>
> > > > > > > > > > - #include <cstring>
> > > > > > > > > > - #include <cstdlib>
> > > > > > > > > > I was wondering if anyone could guide me on either enabling
> > > > > support
> > > > > > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > > > > > something NDK friendly.
> > > > > > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> > > > > Java
> > > > > > > > > > background.
> Yes when I tried to compile your sources and calling createBox2, the
> application crashed.
> Each time I tries to create a dynamic box, the application crashed.
> Do you know how can i fix it?
> Thanks a lot.
> On Jul 22, 11:24 pm, Aki <akxuc...@gmail.com> wrote:
> > hi,
> > you means apps/box2dtest/project in zip file dont work?
> > I think it work without ndk.
> > On 7月22日, 午後11:32, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > > Hi,
> > > I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> > > to call CreateBox2 the application crashed.
> > > Createbox2 creates a dynamic body.
> > > Also I'm not able to recompile the lib because I did not succes to
> > > install the NDK tool yet.
> > > If anybody can help it could be great. I reached so many difficulties
> > > to install correctly make and cygwin in windowsXP.
> > > A clear tutorial will be winderful :)
> > > Thanks a lot.
> > > On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
> > > > This thread really help me.
> > > > Thanks for sharing code and info
> > > > On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > Glad you got some use out of it :)
> > > > > It can be done a lot cleaner, that code is just my initial hack and slash to
> > > > > see if I can get it working. But yeah it's a starting point.
> > > > > I'm also fairly new to C/C++, I've done the odd modification and can read
> > > > > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > > > > Currently writing a game using this, and at the same time writing a layer of
> > > > > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > > > > probably release it when done (writing with a friend so will have to speak
> > > > > to him).
> > > > > I noticed the break out style game, emailed the developer (Aki) and linked
> > > > > him here. Seems to be making progress, he modified his JBox2D tests to also
> > > > > be run under native Box2D and put it into a demo app. The performance
> > > > > differences are pretty crazy.
> > > > > JBox2D started going into crazy garbage collection whenever multiple balls
> > > > > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > > > > stayed fast up to the limit of balls the demo supported (46) the only thing
> > > > > that dropped a little was FPS.
> > > > > So definately worth using if you want a game with real physics.
> > > > > Anyway, have fun with it. Let me know if you have any success stories or
> > > > > find something cool :)
> > > > > Lots of possibilities with a proper physics engine.
> > > > > On Mon, Jul 6, 2009 at 11:03 PM, nEx.Software
> > > > > <email.nex.softw...@gmail.com>wrote:
> > > > > > I've been playing around with your project (awesome that you posted
> > > > > > it, by the way) and have gotten pretty good results from it. I am not
> > > > > > doing anything fancy but I was able to place a hundred balls (and
> > > > > > blocks) and still get decent performance. I'm not experienced with C
> > > > > > or C++ (or Box2D) but this seems to be a good way to learn haha. I am
> > > > > > not going to try some other things from the testbed, for my own
> > > > > > learning purposes and my ultimate goal is to create a nice little
> > > > > > game. Thanks for the head start. That break-out type game in the
> > > > > > Market that is using JBox2D would, I think, greatly benefit from using
> > > > > > this approach.
> > > > > > On Jul 5, 3:56 pm, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > > Ah, the android port of the JBox2D test bed?
> > > > > > > Either way I've fiddled with JBox2D under android with horribly laggy
> > > > > > > results. The garbage collection runs constantly causing major UI lag.
> > > > > > > Too many temporary object creations (Vec2 especially).
> > > > > > > Either way I think a nice JNI layer on top of Box2D (C++) is the way to
> > > > > > go
> > > > > > > at the moment.
> > > > > > > > I believe he is referring to an Android port of JBox2D.
> > > > > > > > On Jul 4, 6:36 am, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > > > > No? Are you talking about JBox2D?
> > > > > > > > > On Jul 2, 1:19 am, Fred Grott <fred.gr...@gmail.com> wrote:
> > > > > > > > > > ah you know there is android port of that engine right?
> > > > > > > > > > On Sat, Jun 27, 2009 at 1:23 AM, Danny Brain <tehdan...@gmail.com>
> > > > > > > > wrote:
> > > > > > > > > > > Hey,
> > > > > > > > > > > I'm attempting to build Box2D under Android NDK for a game I'm
> > > > > > > > > > > planning to write.. and for science I guess.
> > > > > > > > > > > Currently I'm experiencing an issue with a few missing includes.
> > > > > > > > These
> > > > > > > > > > > are:
> > > > > > > > > > > - #include <memory>
> > > > > > > > > > > - #include <climits>
> > > > > > > > > > > - #include <cstring>
> > > > > > > > > > > - #include <cstdlib>
> > > > > > > > > > > I was wondering if anyone could guide me on either enabling
> > > > > > support
> > > > > > > > > > > for these includes under the NDK, or replacing their usage with
> > > > > > > > > > > something NDK friendly.
> > > > > > > > > > > Bear in mind I'm a bit of a C++ newbie and come primarily from a
> > > > > > Java
> > > > > > > > > > > background.
I also tried to build your AndroidBox2dTest, but Eclipse project was
showing the following error message.
Description Resource Path Location Type
Conversion to Dalvik format failed with error 1 AndroidBox2dTest
Unknown Android ADT Problem
Project 'AndroidBox2dTest' is missing required Java project:
'JBox2DRev' AndroidBox2dTest Build path Build Path Problem
The project cannot be built until build path errors are resolved
AndroidBox2dTest Unknown Java Problem
The below is how I compiled c libraries. Seems the compilation went
okay. Let me know if there are anything obvious I did wrong.
$ echo $ANDROID_NDK_ROOT
/Applications/android-ndk-1.5_r1
$ cd $ANDROID_NDK_ROOT
$ make APP=hello-jni
Android NDK: Building for application 'hello-jni'
Install : libhello-jni.so => apps/hello-jni/project/libs/
armeabi
> On 7月24日, 午後8:02, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > Aki,
> > Yes when I tried to compile your sources and calling createBox2, the
> > application crashed.
> > Each time I tries to create a dynamic box, the application crashed.
> > Do you know how can i fix it?
> > Thanks a lot.
> > On Jul 22, 11:24 pm, Aki <akxuc...@gmail.com> wrote:
> > > hi,
> > > you means apps/box2dtest/project in zip file dont work?
> > > I think it work without ndk.
> > > On 7月22日, 午後11:32, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > > > Hi,
> > > > I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> > > > to call CreateBox2 the application crashed.
> > > > Createbox2 creates a dynamic body.
> > > > Also I'm not able to recompile the lib because I did not succes to
> > > > install the NDK tool yet.
> > > > If anybody can help it could be great. I reached so many difficulties
> > > > to install correctly make and cygwin in windowsXP.
> > > > A clear tutorial will be winderful :)
> > > > Thanks a lot.
> > > > On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
> > > > > This thread really help me.
> > > > > Thanks for sharing code and info
> > > > > On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > Glad you got some use out of it :)
> > > > > > It can be done a lot cleaner, that code is just my initial hack and slash to
> > > > > > see if I can get it working. But yeah it's a starting point.
> > > > > > I'm also fairly new to C/C++, I've done the odd modification and can read
> > > > > > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > > > > > Currently writing a game using this, and at the same time writing a layer of
> > > > > > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > > > > > probably release it when done (writing with a friend so will have to speak
> > > > > > to him).
> > > > > > I noticed the break out style game, emailed the developer (Aki) and linked
> > > > > > him here. Seems to be making progress, he modified his JBox2D tests to also
> > > > > > be run under native Box2D and put it into a demo app. The performance
> > > > > > differences are pretty crazy.
> > > > > > JBox2D started going into crazy garbage collection whenever multiple balls
> > > > > > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > > > > > stayed fast up to the limit of balls the demo supported (46) the only thing
> > > > > > that dropped a little was FPS.
> > > > > > So definately worth using if you want a game with real physics.
> > > > > > Anyway, have fun with it. Let me know if you have any success stories or
> > > > > > find something cool :)
> > > > > > Lots of possibilities with a proper physics engine.
> > > > > > > I've been playing around with your project (awesome that you posted
> > > > > > > it, by the way) and have gotten pretty good results from it. I am not
> > > > > > > doing anything fancy but I was able to place a hundred balls (and
> > > > > > > blocks) and still get decent performance. I'm not experienced with C
> > > > > > > or C++ (or Box2D)
> I also tried to build your AndroidBox2dTest, but Eclipse project was
> showing the following error message.
> Description Resource Path Location Type
> Conversion to Dalvik format failed with error 1 AndroidBox2dTest
> Unknown Android ADT Problem
> Project 'AndroidBox2dTest' is missing required Java project:
> 'JBox2DRev' AndroidBox2dTest Build path Build Path Problem
> The project cannot be built until build path errors are resolved
> AndroidBox2dTest Unknown Java Problem
> The below is how I compiled c libraries. Seems the compilation went
> okay. Let me know if there are anything obvious I did wrong.
> $ echo $ANDROID_NDK_ROOT
> /Applications/android-ndk-1.5_r1
> $ cd $ANDROID_NDK_ROOT
> $ make APP=hello-jni
> Android NDK: Building for application 'hello-jni'
> Install : libhello-jni.so => apps/hello-jni/project/libs/
> armeabi
> On Jul 24, 2:35 pm, Aki <akxuc...@gmail.com> wrote:
> > Tuan
> > Unfortunatelly I have no idea about that.
> > I reccoment you compile hello-jni which include NDK first.
> > because there are many topics about that and many exprets will answer
> > your problem.
> > On 7月24日, 午後8:02, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > > Aki,
> > > Yes when I tried to compile your sources and calling createBox2, the
> > > application crashed.
> > > Each time I tries to create a dynamic box, the application crashed.
> > > Do you know how can i fix it?
> > > Thanks a lot.
> > > On Jul 22, 11:24 pm, Aki <akxuc...@gmail.com> wrote:
> > > > hi,
> > > > you means apps/box2dtest/project in zip file dont work?
> > > > I think it work without ndk.
> > > > On 7月22日, 午後11:32, "Tuan.B" <tuan.b...@gmail.com> wrote:
> > > > > Hi,
> > > > > I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> > > > > to call CreateBox2 the application crashed.
> > > > > Createbox2 creates a dynamic body.
> > > > > Also I'm not able to recompile the lib because I did not succes to
> > > > > install the NDK tool yet.
> > > > > If anybody can help it could be great. I reached so many difficulties
> > > > > to install correctly make and cygwin in windowsXP.
> > > > > A clear tutorial will be winderful :)
> > > > > Thanks a lot.
> > > > > On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
> > > > > > This thread really help me.
> > > > > > Thanks for sharing code and info
> > > > > > On 7月7日, 午前8:20, Danny Brain <tehdan...@gmail.com> wrote:
> > > > > > > Glad you got some use out of it :)
> > > > > > > It can be done a lot cleaner, that code is just my initial hack and slash to
> > > > > > > see if I can get it working. But yeah it's a starting point.
> > > > > > > I'm also fairly new to C/C++, I've done the odd modification and can read
> > > > > > > it, but yeah I've learnt a fair bit playing with the NDK so far.
> > > > > > > Currently writing a game using this, and at the same time writing a layer of
> > > > > > > Java sitting on top of NDK Box2D so the Android Java code is clean. Will
> > > > > > > probably release it when done (writing with a friend so will have to speak
> > > > > > > to him).
> > > > > > > I noticed the break out style game, emailed the developer (Aki) and linked
> > > > > > > him here. Seems to be making progress, he modified his JBox2D tests to also
> > > > > > > be run under native Box2D and put it into a demo app. The performance
> > > > > > > differences are pretty crazy.
> > > > > > > JBox2D started going into crazy garbage collection whenever multiple balls
> > > > > > > are added (I'm assuming because of the way it handles contacts), Box2D NDK
> > > > > > > stayed fast up to the limit of balls the demo supported (46) the only thing
> > > > > > > that dropped a little was FPS.
> > > > > > > So definately worth using if you want a game
Apart from these two instructions, did you do anything extra to port C/
C++ library for NDK use? Let me know if you have any tips porting C/C+
+ libraries via NDK in general.
If anyone also knows other documents/blogs/instructions related to
porting third party C/C++ library into Android via NDK, please let me
know.
Thanks.
Makoto
On Jul 28, 6:24 am, Aki <akxuc...@gmail.com> wrote:
> My Project need JBox2D for demo.
> Remove JBox2DRev from Build path,
> and remove all source code using jbox2d.
> On 7月28日, 午前7:49, Makoto <inoue...@googlemail.com> wrote:
> > Hi, Aki san.
> > I also tried to build your AndroidBox2dTest, but Eclipse project was
> > showing the following error message.
> > Description Resource Path Location Type
> > Conversion to Dalvik format failed with error 1 AndroidBox2dTest
> > Unknown Android ADT Problem
> > Project 'AndroidBox2dTest' is missing required Java project:
> > 'JBox2DRev' AndroidBox2dTest Build path Build Path Problem
> > The project cannot be built until build path errors are resolved
> > AndroidBox2dTest Unknown Java Problem
> > The below is how I compiled c libraries. Seems the compilation went
> > okay. Let me know if there are anything obvious I did wrong.
> > $ echo $ANDROID_NDK_ROOT
> > /Applications/android-ndk-1.5_r1
> > $ cd $ANDROID_NDK_ROOT
> > $ make APP=hello-jni
> > Android NDK: Building for application 'hello-jni'
> > Install : libhello-jni.so => apps/hello-jni/project/libs/
> > armeabi
> > On Jul 24, 2:35 pm, Aki <akxuc...@gmail.com> wrote:
> > > Tuan
> > > Unfortunatelly I have no idea about that.
> > > I reccoment you compile hello-jni which include NDK first.
> > > because there are many topics about that and many exprets will answer
> > > your problem.
> > > > > > I'm trying to have fun with the ndk lib sent by Aki. But when I tried
> > > > > > to call CreateBox2 the application crashed.
> > > > > > Createbox2 creates a dynamic body.
> > > > > > Also I'm not able to recompile the lib because I did not succes to
> > > > > > install the NDK tool yet.
> > > > > > If anybody can help it could be great. I reached so many difficulties
> > > > > > to install correctly make and cygwin in windowsXP.
> > > > > > A clear tutorial will be winderful :)
> > > > > > Thanks a lot.
> > > > > > On 7 juil, 04:27, Aki <akxuc...@gmail.com> wrote:
My c++ codes come from Dannys's work which in this topic.
Without his help I couldnt make this.
So sadly I'm not familiar with that.
I wrote C++ codes with TextEditor.