Game Development Community

Get 50$ by helping me solving a box2d integration problem

by Sebastian Krogull · in iTorque 2D · 03/29/2011 (3:35 pm) · 5 replies

Hello :)



I started to integrate Box2D as explained in Michael Woeristers bachelor thesis. After solving several issues on my own i am now at a point where i cannot move on with, because i don't know better. But first of all let me explain to you what I did:

setup

First of all i downloaded the Box2D version 2.01 and copied the Box2D.h into the Source folder which i renamed to Box2D. After that i had to modify the content of the header file and updated the includes so the paths patched. Now I copied the folder into:
'/Applications/iTorque2D_1_4_1/engine/lib/'.

I Downloaded the Cpp Folder which can be found in the sources section of code.google.com/p/tgb-box2d-integration/ which i moved into
'/Applications/iTorque2D_1_4_1/engine/source/T2D'.

integration

Through iTGB I was creating a new project and started working with the iTorque2D XCode4-Project where I did all the steps from 'Compiling and Linking TGB and Box2D together' in Michaels Thesis and I imported the Box2D and the Cpp folder into the project.
Some Changes had to be made by way: In the XCode Project there is no 'winmemory.cc' so i changed the 'iphonememory.mm' like explained in 'Disabling Torque's Memory Manager'.

issues

Now when I try to build the project i get 2 or 3 errors like this one:
declaration of 'void* operator new(size_t, void*) throw ()' throws different exceptions

I am imagining that the problem is still the memory manager, but i don't know for sure.
Also there seems to be an issue with the right place of the behaviors folder, because if i put it in the scripts folder behaviors aren't found by iTGB.


The guy who can help me with this or even shows me how to integrate chipmunk physics gets 50$ via Paypal. And if we can get it to work in 48 hours from now, i put 10 bucks upon it.

Thanks for reading and sorry for my bad english.





About the author

Recent Threads


#1
03/29/2011 (5:27 pm)
Hi Sebastian, I have done what you're talking about. I'm not really interested in the money, but it sounds like you're not too far off. If I remember correctly you are having issues with the TORQUE_DISABLE_MEMORY_MANAGER code. Here is what my iphoneMemory code looks like:

#ifndef TORQUE_DISABLE_MEMORY_MANAGER
void* FN_CDECL operator new(dsize_t dt, void* ptr)
{
   return (ptr);
}   
#else
#include <new>
#endif

and i also modified platformMacCarb with the same:
#ifndef TORQUE_DISABLE_MEMORY_MANAGER
void* FN_CDECL operator new(dsize_t dt, void* ptr)
{
   return (ptr);
}
#else
#include <new>
#endif
#2
03/29/2011 (5:29 pm)
To answer your question about the correct scripts folder, it is projectFiles/game/scripts/behaviors.
#3
03/30/2011 (2:37 am)
Thank you for your response Chris :)


Where is the platformMacCarb stuff? I just edited the iPhone-XCode project. I tried the replacements in iPhoneMemory - same issues. And what I see is that if i put the behaviors in the script folder like you mention it, iTGB doesn't list them.

Here is the full error Stuff:

Declaration of 'void* operator new(size_t, void*) throw ()' throws different exceptions
In file included from - engine/source/T2D/Box2D/Box2dBodyRef.cc
In file included from - engine/source/T2D/Box2D/./Box2dBodyRef.h
In file included from - engine/lib/Box2D/Box2D.h
In file included from - engine/lib/Box2D/./Dynamics/b2Body.h
In file included from - iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/memory
In file included from - iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/bits/allocator.h

...and so on

Hope this helps more.

Hey chris maybe we just share thoughts via skype or msn, icq, facebook, email whatever.
Just write me an email to get started: hybrid.art@live.de
#4
03/31/2011 (10:40 am)
Noone can help me with this? Chris, please write me a message via email adress i posted above
#5
04/01/2011 (6:40 am)
Hey. It's me. :)