Tumle v1.4 irrlicht/newton

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

Did you add the IN source files to the build? In VC++ this is done by adding the files to the project.
Last edited by JonLT on Wed Jun 13, 2007 5:37 pm, edited 1 time in total.
tivi
Posts: 4
Joined: Thu Jun 02, 2005 6:32 am

Post by tivi »

:D Yes, thank you, that was the problem.

Tom
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

still getting stack error, problems with old physics code...

Post by buhatkj »

heya, I still can't get any of your examples to run, I get that same exact stack error I had before at runtime. Also, I upgraded an old physics demo I had written back in 2005 with newton to the newest newton, 1.53, and now that is busted, and I get a null reference exeption when I try to use a tree collision. Im on Vista, with VS 2005 express. has anybody else had any luck at all with this platform using IN? I'm pretty much stumped for the moment....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

strange... :?
I didn't have any trouble when i tried compiling an example in VC++.
Have you tried to use NewtonBodyGetMassMatrix in a smaller context like:

Code: Select all

NewtonWorld *nWorld = NewtonCreate(NULL, NULL);
NewtonCollision *collision = NewtonCreateBox(nWorld, 10, 10, 10, NULL);
NewtonBody *body = NewtonCreateBody(nWorld, collision);
NewtonReleaseCollision(nWorld, collision);
NewtonBodySetMassMatrix(body, 10, 1, 1, 1);
float mass, Ixx, Iyy, Izz;
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
You could also try to initialize the floats individually and check if they where created before calling NewtonBodyGetMassMatrix, like so:

Code: Select all

float mass = 1;
float Ixx = 1;
float Iyy = 1;
float Izz = 1;
if(mass && Ixx && Iyy && Izz && body)
   NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
I don't know why that would work better, but maybe :?
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Post by buhatkj »

Code: Select all

void _cdecl CPhysicsManager::newtonForceAndTorqueCallback(const NewtonBody* body)
is the function in question since I failed to mention it before, the error occurs as the function would be returning.

I tried the second thing you suggest, but no dice. The variables initialize perfectly it seems... I stepped through the function in debug, and everything looked good, it doesnt throw the error until the closing brace at the end of the function, so something must occur during that function that corrupts the stack, but I have no idea what.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

Izz isn't used in the force and torque callback, so in stead of:

Code: Select all

float mass, Ixx, Iyy, Izz;
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
Try this:

Code: Select all

f32 mass = pNode->getMass();
This doesn't solve the problem, but it might be usefull as a workaround.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Post by buhatkj »

OK, no runtime error anymore, but nothing is visible now. If I comment out the pmgr->update(); in the render loop, I see the two nodes, but they are stationary of course. This leads me to think that they are probably transformed offscreen instantly due to some sort of problem.

I dunno what it is, but newton 1.53 and irr1.3+ do NOT seem to play nice on my box, with your code, OR Irrnewt, or even my own updated code from 2005.....
this sucks....
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

JonLT wrote:
And I've added Q and A tags in the initial post for you midnight :)
8)
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

I dunno what it is, but newton 1.53 and irr1.3+ do NOT seem to play nice on my box
Does 1.3+ mean that you have updated via SVN? Irrlicht 1.3 has a bug: The ISceneNode::getType() always returns ESNT_UNKNOWN, IN uses this function, so if you haven't updated via SVN try it out.
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

IN is renamed to Tumle (tumble in danish), and i've updated a few things, among others, the update timestep should now be correct. See http://www.jonlt.frac.dk/tumle/changes.txt for more info
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

For me examples lag as hell :|

BTW nice name ;]
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

Hmm.. :? All of them? After i made the timestep change(thanks for the link :) ), the examples ran much more smooth on my pc.
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

Not all, Level.exe, Controllable.exe and Camera.exe. Firstly they ran slow as hell, now they just crash my PC :shock: I get PAGE_FAULT_IN_NONPAGED_AREA error. This should be caused by irrlicht i gues, usualy faulty driver or hardware causes it so irrlicht might be guilty. However, other irrlicht projects run ok.

Also while implementing timestep thingy into my own project i experienced same lag but it was caused by very stupid ( :oops: ) main loop control. Maybe your examles has problems there too, but im too lazy to check :P

And one more thing. Could you add visual studio project files plz? :)
RobbyRob
Posts: 21
Joined: Fri Mar 02, 2007 4:30 pm
Location: Germany

tumle Newton Physics engine

Post by RobbyRob »

Hello JonLT,

I tried to use "tumle" code for linking newton to irrlicht; seams very interesting and simple to use, but..
when I run the "hello world" program integrated in code blocks, I got the following message:
Linking console executable: Irrlicht.exe
main_1.obj : error LNK2019: unresolved external symbol "class tumle::IPhysicsManager * __cdecl tumle::createPhysicsManager(class irr::IrrlichtDevice *)" (?createPhysicsManager@tumle@@YAPAVIPhysicsManager@1@PAVIrrlichtDevice@irr@@@Z) referenced in function _main
Irrlicht.exe : fatal error LNK1120: 1 unresolved externals
Process terminated with status 1 (0 minutes, 0 seconds)

I linked the source file with all the stuff in the build options, but always the same message, do you have an idea what goes wrong ?

thanks for your help

Robert
koller202
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

Post by koller202 »

i m error

Code: Select all

c:\documents and settings\numxyz\desktop\tumle\include\icamerafpsphysicsnode.h(24) : error C2555: 'tumle::ICameraFPSPhysicsNode::getIrrlichtNode' : overriding virtual function differs from 'tumle::IPhysicsNode::getIrrlichtNode' only by return type o
r calling convention
        c:\documents and settings\numxyz\desktop\tumle\include\iphysicsnode.h(19) : see declaration of 'IPhysicsNode'
i use 1.3.1 newton 1.53 and vc 6.0 thank you
________
Percodan Rehab Advice
Last edited by koller202 on Thu Feb 17, 2011 1:17 am, edited 1 time in total.
Post Reply