Irrlicth-Newton Demonstration with Irrlicht 1.4, Newton 1.53

A forum to store posts deemed exceptionally wise and useful
paksan
Posts: 3
Joined: Tue Feb 12, 2008 3:46 am

Post by paksan »

Hi,

I tried the codes posted by gbutcher and added the modifications on omega by fabregot. The codes compiled anf linked but while running the program, it was looking for a "wood.jpg" file. No boxes were drawn in hte game window when the left mouse button was clicked.

Did anyone faced the same problem?

Your help is deeply appreciated.

Thanks
PakSan
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

i get the same message "couldn't load texture wood.jpg" but it works to me :D

and even if you don't have textures, you should see white boxes...
maybe the newton is bad to you too?

i had a problem before.. try to extend your newton world

Code: Select all

	// set the newton world size based on the bsp size
	float boxP0[3]; 
	float boxP1[3]; 
	float matrix[4][4]; 
	NewtonBodyGetMatrix (g_newtonmapbody, &matrix[0][0]); 
	NewtonCollisionCalculateAABB (g_newtonmap, &matrix[0][0],  &boxP0[0], &boxP1[0]); 

	boxP0[0] -= 500; 
	boxP0[1] -= 500; 
	boxP0[2] -= 500; 
	boxP1[0] += 500; 
	boxP1[1] += 500; 
	boxP1[2] += 500; 
	NewtonSetWorldSize (nWorld, (float*)boxP0, (float*)boxP1);
paksan
Posts: 3
Joined: Tue Feb 12, 2008 3:46 am

Post by paksan »

Thanks for the reply B@z, I tried changing the values from 5 - 1000000 but the boxes did not appear. My codes are:

float boxP0[3];
float boxP1[3];
float matrix[4][4];

NewtonBodyGetMatrix (g_newtonmapbody, &matrix[0][0]);
NewtonCollisionCalculateAABB (g_newtonmap, &matrix[0][0], &boxP0[0], &boxP1[0]);

boxP0[0] -= 1000;
boxP0[1] -= 1000;
boxP0[2] -= 1000;
boxP1[0] += 1000;
boxP1[1] += 1000;
boxP1[2] += 1000;

NewtonSetWorldSize (nWorld, (float*)boxP0, (float*)boxP1);

Did I do anything wrong?

Thanks
paksan
Posts: 3
Joined: Tue Feb 12, 2008 3:46 am

Post by paksan »

I managed to get it to work at last. The problem lies with newton.dll that was supplied with the Newton Game Dynamics download. I came across a post :

http://irrlicht.sourceforge.net/phpBB2/ ... 236a9ab73c

that mention the corrupted dll file and download the correct dll from:

https://sourceforge.net/project/showfil ... _id=501255.

Everything is work fine now.

As for the wood.jpg, I simply placed a "dummy" wood.jpg file in the data sub-directory as well as in the directory where the executable will be run and there was no more errors.

Again thanks for your help.

PakSan
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

ohh.. corrupt dll :D
yeah, i'm glad! ^^v
c.h.r.i.s
Posts: 41
Joined: Mon Jan 22, 2007 8:38 pm

Post by c.h.r.i.s »

hi! I checked out the code from gbutcher. I copyed it to Dev C++ (4.9.9.2) and compiled...i started the program and recognized the wood texture error...but this is no problem ... console says, that physicstest.bsp was loaded but i cant see the level... the only thing i can see are two boxes. one is stucking in the air and the second is falling to an non visible ground...if i click the mouse button the MakeCube() is passed but the new box spawns within the air-stucking one...i dont know whats is going wrong...i copyed the code directly from this post and updated my newton.dll how paksan describes...iam using the originally bsp and 3ds files from the originally newton-irrlicht tutorial...any ideas?
stevend
Posts: 114
Joined: Sat Mar 01, 2008 7:18 pm

Post by stevend »

i have tried this code, i actually used the old version and fixed it. then i gave up and redid my project with this code.

here is my problem, i cannot solve it!

i take the code from your example and use it on a character model inside a quake2/3 map.

the model is dragged by gravity though the floor into oblivion.

has anybody had this problem?

i cannot get collision to work and its tottally stopped my development of my game.
kai$er
Posts: 4
Joined: Wed Apr 23, 2008 7:50 pm

Post by kai$er »

c.h.r.i.s wrote:hi! I checked out the code from gbutcher. I copyed it to Dev C++ (4.9.9.2) and compiled...i started the program and recognized the wood texture error...but this is no problem ... console says, that physicstest.bsp was loaded but i cant see the level... the only thing i can see are two boxes. one is stucking in the air and the second is falling to an non visible ground...if i click the mouse button the MakeCube() is passed but the new box spawns within the air-stucking one...i dont know whats is going wrong...i copyed the code directly from this post and updated my newton.dll how paksan describes...iam using the originally bsp and 3ds files from the originally newton-irrlicht tutorial...any ideas?
I have the same precise problem with the same configuration (float omega fixed, dll fixed, devc++ 4.9.9.2)... anyone knows?
kai$er
Posts: 4
Joined: Wed Apr 23, 2008 7:50 pm

Post by kai$er »

I solved: the problem was because the .bsp could not find the textures file, because I used a directories' structure different from the original one. By using the same structure as the original one (.exe in /binary), the map was there!
Post Reply