Page 1 of 3

Newton/Irrlicht Character Controller Demo update 10/28/05

Posted: Wed Jun 01, 2005 3:42 pm
by dhenton9000
I'm working on a widget demo with the following features, using Newton and Irrlicht.

I've finished the following:

FPS Camera
Following Camera
Jump, Crouch
Stairs
Elevators (Mounted and to-floor)
Trigger Areas
Sliding Doors

Source and Demo are available at

http://webpages.charter.net/hentond/images/newirr.zip

Comments/suggestions appreciated!

Posted: Wed Jun 01, 2005 10:34 pm
by Omberon
That is a great demo! The elevators need a little work because they tend to bounce or go too far but for the most part you've done a great job. I think the only thing that's lacking now is strafing pretty much. It's also great how you have sound in this demo. This is one of the first irrlicht demos with sounds I've seen besides the tech demo. Good job.

Posted: Thu Jun 02, 2005 12:41 am
by trekker
Hi,

Very nice! The level/sounds remind me of StarTrek Voyager: Elite Forces. All that is missing are the borg :)

-trek

Posted: Thu Jun 02, 2005 10:21 am
by puh
Good job, dhenton9000!

Posted: Sat Jun 04, 2005 8:59 pm
by Guest
has anyone gotten the source to compile in Dev-C++? no matter what i do, i cant get it to run correctly...

Posted: Sun Jun 05, 2005 1:07 am
by dhenton9000
Anonymous wrote:has anyone gotten the source to compile in Dev-C++? no matter what i do, i cant get it to run correctly...
Heres a newton discussion that might be relevant

http://www.physicsengine.com/forum/view ... sc&start=0

Posted: Sun Jun 05, 2005 4:30 am
by Pr3t3nd3r
Nice demo but i have to say one think:
MOUSE CONTROL! o well more:
make "E" key to open and ctrl for Crouch. (meybe i.m playing a little too much :D)

Posted: Mon Jun 06, 2005 10:17 am
by puh
Pr3t3nd3r, did you try to hold left mouse button for MOUSE CONTROL? 8)

Posted: Wed Aug 10, 2005 7:42 pm
by Globil
GREAT DEMO AND CODE!!!!

can you do a little tutorial with the genreal ideas??

how create an elipse for player?
How create jumps, stairs?

genreal idea of what apis we must use

Posted: Thu Aug 11, 2005 12:40 am
by dhenton9000
Well thanks for the flattery!

I'm looking over it now and I'll put together a pdf soon. I think I can ramble enough that you might find something useful.

Posted: Fri Aug 12, 2005 2:34 am
by dhenton9000
First draft at:

http://www.sendmefile.com/00042869

Will add more if there's interest.

Posted: Fri Aug 12, 2005 2:45 am
by Globil
Great great work!!!! it is a good tutorial with good explications
congratulations!!! it give us new possibilities

give us more!! give us more!!! :D :D :D PLEASE

Posted: Fri Aug 12, 2005 6:07 am
by zOrt
I have a question. Why in Control of Player you use 10.0f for gravity and when the player JUMP you use the variable "timestep" ?

Posted: Fri Aug 12, 2005 8:51 am
by dhenton9000
zOrt wrote:I have a question. Why in Control of Player you use 10.0f for gravity and when the player JUMP you use the variable "timestep" ?
In the Newton simulator, you have to tell it what forces apply to your objects at all times. So gravity is applied to all objects. -10 is about the true gravitational constant. Negative for pointing down. Its defined in CNewtonBase and used everywhere. CNewtonBox shows a simple application of gravity in its ApplyForceHandler.

The timestep variable is used to calculate the force that is needed to jump a certain distance.

Code: Select all



		jumpvector.Y = mass* (PLAYER_JUMP_SPEED - velocity.Y)/timestep;
		NewtonBodyAddForce(body,&jumpvector.X);
		m_keyMap[8].state = false;
		m_canJump = false;

In case you are wondering why timestep is needed at all for jumping (why not just use an aribtrary force) I used it here just because I wanted to think in terms of jumping at a certain velocity, it really isn't necessary. I just as easily could have put in

Code: Select all

         jumpvector.Y = ARBITARY_CONSTANT;
HTH

Posted: Sun Aug 14, 2005 8:54 am
by Globil
hello dhenton9000, are you goint to more tutorials and demos? i think in some union type mecanic for plataforms games (sorry my english :D )