IrrNewton animator

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I'm glad to see that this stuff is developed :D
BTW - This works well with borland compiler too :lol:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

In demo, I get player moving or jumping only for the first several seconds, after loading of level??
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

etcaptor wrote:In demo, I get player moving or jumping only for the first several seconds, after loading of level??
Same here. Seems like a collision problem with that playernode. It gets stuck at some places (almost everywhere).
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

Code: Select all

	void IrrNewtonWorld::UpdateWorld()
	{
		if( m_World && m_Device->isWindowActive())
		{
			// first update
			if( m_LastUpdate == 0)
			{
				m_LastUpdate = m_Device->getTimer()->getTime();
			}
			else if( (m_LastUpdate + m_UpdateRate) >  m_Device->getTimer()->getTime())
			{
				NewtonUpdate( m_World, m_UpdateRate); 
				m_LastUpdate = m_Device->getTimer()->getTime();
			}   
			else
			{
			}  
		}  
	} 
The problems seems to be here:

Code: Select all

		if( m_World && m_Device->isWindowActive())
Ill debug it. Thanks for testing.
Please send me an e-mail instead of a private message.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

yeh i got that too

Post by buhatkj »

yeh mine gets stuck too. Also i dunno if anybody mentioned this part: once your stuck, it instead of shooting seems to just place the box a certain distance away in whatever direction you were facing rather than "shooting" it.
I will attempt to help debug it too, but likely schick will find it first since he is of course the most familiar with this code :-)
cheers all
(looking forward to pluggin' this nifty little animator into my game engine)
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Guest

Post by Guest »

Here is working perfect I am getting 240 fps at work and over 190 at home, the camera is very responsive.
Maybe some gravity and a skin to the shot boxes will make more interesting.
Roberto
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Hi schick,
Any news from your project?
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

Projects news:

Updated to 2.2:

- links against newton 1.30 (be sure you have upgraded)
- bug fixes
- more bug fixes
- some minor changes to the IrrNewtonWorld and the IrrNewtonAnimator interface

ToDo:
- add joints (there is a vehicle joint available)
- add missing rigid bodies
- add all raycast functions

I please you to use the code and test it. I am currently working on another project, too. Therefore my testing time is, give it 3 runs if it works ok :-). Not that good i know.

You can download the demo (well, just a fps camera and some shooting) and the current source here:
http://www.bluffel.de.vu/

The documentation was also updated here:
http://www.bluffel.de.vu/IrrNewton/Docu/

Best regards,

Schick
Please send me an e-mail instead of a private message.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Ok, thanks.
I still have the same problems with movements like by version 0.2
Wolf Dreamer
Posts: 121
Joined: Tue Feb 10, 2004 6:39 am
Location: the land of chaotic dreams
Contact:

Post by Wolf Dreamer »

Compiling...
main.cpp
d:\NewtonSDK\sdk\Newton.h(16) : error C2146: syntax error : missing ';' before identifier '_NEWTON_USE_LIB'
d:\NewtonSDK\sdk\Newton.h(16) : error C2501: 'declare' : missing storage-class or type specifiers
d:\NewtonSDK\sdk\Newton.h(16) : error C2144: syntax error : 'int' should be preceded by ';'
d:\NewtonSDK\sdk\Newton.h(16) : error C2501: '_NEWTON_USE_LIB' : missing storage-class or type specifiers
IrrNewton - 4 error(s), 0 warning(s)
I have the latest Newton, and read the readmefirst.txt that came with it, copying what it told me to into the code, but still I get those four errors.

In the newton txt file for the new version is reads
- To link with libraries you will need to declare _NEWTON_USE_LIB before you include newton.h in your project
- if you are linking visual with VS 6. You will need to declare the following in any of you C or C++ modules

#if (_MSC_VER >= 1300)
//VC7 or later, building with pre-VC7 runtime libraries
//defined by VC6 C libs
extern "C" long _ftol (double);
extern "C" long _ftol2( double dblSource )
{
return _ftol( dblSource );
}
#endif
Any suggestions? I got a lot more errors before reading that .txt file and copying over what it says to.

----
When I run the example of your program, I notice that movement speed is very slow. Is that done on purpose?

Shooting the boxes outward is odd since they stop after a certain distance, frozen in midair. I assume it is suppose to do that. I'd rather have each object with a variable called range, which would destroy it after it went a certain distance, so if ever you miss your target, it doesn't keep track of the projectiles movement is it sails off to the end of the massive world most games would have, or hit someone on another continent.

"Those scoundrels! Here we are enjoying a day at the beach, and they send a horde of bullets over at us!"
"Uh... didn't you stand on the beach a few minutes ago and say, hey, check out how cool my new weapon is, then shoot over in their direction first?"
"Curse these weapons with their unlimited range, and the devestation they will surely reek upon our world... then again, I can now slay all monsters from an insane distance."

*yawn* its too early in the morning to be funny. I know its just alpha so that'll probably change.

Artillary shells would be affected by gravity, and arch downward to the ground, while regular bullets/magic fireballs/arrows etc. would fire straight ahead a certain distance before vanishing.

Nice work so far though.
The last sane human being in a world gone mad

http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

If you like to link to the static library you need that compiler #define for the msvc6. The new static library, not tested myself, but could be be linked under linux, too.

If you link against the dll library, there is no problem linking with msvc6.

The demo is not supposed to be a game demo. It just shows what can be done easily. You only need a few function calls and the hole physic stuff is working.

Cheers,

Schick
Please send me an e-mail instead of a private message.
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

New release of IrrNewton. If you are using IrrNewton, please upgrade.

The random crashing of Newton was fixed.

Grab the source of IrrNewton here: http://www.bluffel.de.vu/

Cheers,

Friedrich Schick
Please send me an e-mail instead of a private message.
Kaneda

Post by Kaneda »

JoeWright
Posts: 74
Joined: Mon Dec 08, 2003 3:51 pm

Post by JoeWright »

Friedrich,

Just started using IrrNewton. Great work, thanks.

I've got a problem with the freeing up of resources. IrrNewtonAnimator::StopIrrNewtonAnimator keeps re-entering via the NewtonDestroyBody call so that eventually there is a stack overload.

Not too sure what the problem is, maybe you could have a look.

Thanks

Joe
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

I reworked the material system to work with int instead of string. Furthermore, i patched some functions to accurate the speed.

Yeah, you could "fix" the bug just by setting the Newton Body to NULL instead of calling StopIrrNewtonAnimator(). That bug remained from the last Newton SDK, which had some bugs itself and i had to do a workaround.

Code: Select all

m_NewtonBody = NULL;
Cheers,

Schick
Please send me an e-mail instead of a private message.
Post Reply