Box2D Forums

It is currently Wed May 22, 2013 6:21 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Using Box2D for the NDS
PostPosted: Fri Sep 24, 2010 4:39 am 
Offline

Joined: Fri Sep 24, 2010 4:34 am
Posts: 5
Hello all,

I am been struggling for hours now, and cannot get Box2D to work with the NDS lib.

What I have done now:
- Downloaded the Box2D 2.1.2 version
- Adding nds.h as an header
- Trying and modifying the HelloWorld example to run with the nds

Can some, who have a working example to how to use Box2D within an NDS project, give me a hint how to do that?

Thanks in advance,

Regards Delphilynx


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 5:26 am 
Offline

Joined: Fri Sep 24, 2010 4:34 am
Posts: 5
Nobody has experience with Box2D on the NDS?


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 5:40 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
An older version of Box2D was ported to the NDS. You might be able to dig it up from the old SourceForge SVN.


Top
 Profile  
 
PostPosted: Tue Sep 28, 2010 4:46 am 
Offline

Joined: Fri Sep 24, 2010 4:34 am
Posts: 5
Yes i found box2d fixed, but I read elsewhere that it is now supported by Box2D by default?


Top
 Profile  
 
PostPosted: Tue Sep 28, 2010 8:50 am 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
No. Check the FAQ: http://code.google.com/p/box2d/wiki/FAQ. Look under Determinism.


Top
 Profile  
 
PostPosted: Wed Sep 29, 2010 7:23 am 
Offline

Joined: Fri Sep 24, 2010 4:34 am
Posts: 5
Thanks, I have read that. But I should say what I have tried now (my 100th try):

- Downloaded the Box2D 2.0.1 version (with Nintendo DS support)
- Start a makefile project in Visual Studio 2008
- In Visual Studio under VC++ directorys I added "C:\DEV\Box2D\Include" and "C:\DEV\Box2D\Library"
- Using the following code for my hello_world program (copied and edited from the original hello_world of Box2D):

Code:
#define TARGET_IS_NDS
#define TARGET_FLOAT32_IS_FIXED

#include <nds.h>
#include "Box2D.h"
#include <stdio.h>

//---------------------------------------------------------------------------------
int main(int argc, char** argv)
{
   //A big hello_world tekst

   return 0;
}


And get the following error:
Quote:
1>------ Build started: Project: Box2D_project, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>(cd Contrib/freeglut; make)
1>make[1]: Entering directory `/c/DEV/Box2D_project/Box2D_project/Contrib/freeglut'
1>make[1]: *** No rule to make target `freeglut_callbacks.o', needed by `libglut.a'. Stop.
1>make[1]: Leaving directory `/c/DEV/Box2D_project/Box2D_project/Contrib/freeglut'
1>make: *** [all] Error 2
1>Build log was saved at "file://c:\DEV\Box2D_project\Box2D_project\Debug\BuildLog.htm"
1>Box2D_project - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


I think I really need the help of an expert who have already done such NDS project.

Thanks in advance!


Top
 Profile  
 
PostPosted: Fri Oct 01, 2010 5:02 am 
Offline

Joined: Fri Sep 24, 2010 4:34 am
Posts: 5
Nobody have some working code within de NDS with Box2D?


Top
 Profile  
 
PostPosted: Sat Oct 02, 2010 11:32 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
I think you are pretty much alone. Very few people try to work with Box2D on the NDS.


Top
 Profile  
 
PostPosted: Sun Oct 03, 2010 10:03 am 
Offline

Joined: Sun Feb 21, 2010 4:56 am
Posts: 10
I did try on NDS, got the lite version working....

http://forum.gbadev.org/viewtopic.php?t ... 50e924bc09

but no joy with full. Think NDS not powerful enough. My problems were with memory management. I am now just working on PC version.....


Top
 Profile  
 
PostPosted: Sat Jan 22, 2011 8:40 am 
Offline

Joined: Mon Jun 08, 2009 12:21 pm
Posts: 353
it looks like you're building the glut stuff, which probably doesn't compile on the NDS. try just building the Box2D source and making your own debug draw class for the NDS.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group