SMALL_DEMO(Need Testers) [UPDATE 18_OCTOBER]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

sio2 wrote:You mean my Doom3 code?
Yes, i want to try myself with it and see if i can get it to work
with my current framework.

Please, if you find the time check if you have "stuck in stairs" problem
also i have small camera glitch happen (on about every second quick "blipp")
when walking forward or strafing , but not see it on my friends PC.

Thanks in advance.

Belfegor.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Stairs are perfectly OK if I walk straight up and down. If I crouch I can't climb. :wink: Walking at an angle (cutting across the stairs) is more difficult and very difficult to get up the last step at an acute angle. These are all down to the height of the stairs though and not what I would call getting stuck, I think. I haven't actually got stuck where I can't move either. Frame rates are in the 600's here BTW.

BTW I didn't see the "blipp" issue.
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

sio2 wrote:Stairs are perfectly OK if I walk straight up and down. If I crouch I can't climb. Wink Walking at an angle (cutting across the stairs) is more difficult and very difficult to get up the last step at an acute angle. These are all down to the height of the stairs though and not what I would call getting stuck, I think. I haven't actually got stuck where I can't move either. Frame rates are in the 600's here BTW.
Ok, it should not be much of a problem to solve.
sio2 wrote:BTW I didn't see the "blipp" issue.
I have recently changed driver for my gfx card.
Might be problem with it because i didnt see it before and i can also see it
in HL2 :shock: now, but i havent tried other games because i am strugling with
space on my HD.

Thanks for testing.

Belfegor.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
agi_shi
Posts: 122
Joined: Mon Feb 26, 2007 12:46 am

Post by agi_shi »

belfegor wrote:[...]
Sorry man, been a bit busy (haven't coded, too much crappy school-work).

What do are all the line variables for (EndLine, etc.)? From a look at your code, seems like you have a lot of unneeded things in there.

Here's a quick idea of what I'm doing:

Code: Select all

Ogre::Vector3 hop = heldObject->getPosition();
// make the held object go to us
Ogre::Vector3 vel = getHoldPosition() - hop;
// make the object go there faster
const float HOLD_STRENGTH = 18.75;
heldObject->setDesiredVelocity(vel * HOLD_STRENGTH);
It simply checks where the object is, and the velocity is the difference of the desired position from the object's position (how you determine the desired position is up to you - I see you have some code in there for it already).

setDesiredVelocity() simply sets a member variable called dvel to whatever you pass into the function (it also enables the "desired velocity" effect if disabled).

Then, in the force and torque callback (for the held object):

Code: Select all

void Object::cb_fat() {
[...]
        float _tmass, _tix, _tiy, _tiz;
        NewtonBodyGetMassMatrix(newtBody, &_tmass, &_tix, &_tiy, &_tiz);
        float ts = NewtonGetTimeStep(PhysicsManager::singleton()->gWorld());

        if (dvelEnabled) {
            Ogre::Vector3 cvel = getVelocity();
            addForce(_tmass * (dvel - cvel) / ts);
        }
[...]
}
... and that's pretty much it. addForce does a standard NewtonBodyAddForce(), getVelocity() return's the object's velocity (NewtonBodyGetVelocity()), and gWorld() returns the global newton world.

(the result is something like this: http://www.youtube.com/watch?v=YYGsJ88xsm4 - the video is a bit long, but the effect is seen in the first few seconds, so it shouldn't make a difference - note how it doesn't have that spring-effect - I used to have that, too, if you look at one of my older videos :lol:)

Note: there's an annoying little side-effect. The force seems to be too strong and even at high mass ratios a massive object gets easily pushed by a not-so-massive object. I believe manual dampening of the force (not via the mass) fixes this.

BTW, while we're sharing ideas and code :lol:, mind giving me a pointer (no pun intended :lol:) as to how you've achieved jumping for the character? How do you check whether the character should be able to jump? I can't come up with a solid method for this. Also, how did you do the 0-bounce for the character? It's really neat! (If I set my character to 0-bounce, he'll usually end up half-way in the ground.)
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

agi_shi wrote:[...]
Thanks for ideas, ill see with what i can came up with.
agi_shi wrote:How do you check whether the character should be able to jump?
Just check body normal i am standing on in material callbaks
(I think second one "ContactProcessCallback").
And for jumping itself i just NewtonBodyAddForce(...).
agi_shi wrote:Also, how did you do the 0-bounce for the character?
Its all in material properties. Next time i come back i could give you
their setup.

BTW.Seems you are using Ogre?
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
agi_shi
Posts: 122
Joined: Mon Feb 26, 2007 12:46 am

Post by agi_shi »

belfegor wrote:
agi_shi wrote:[...]
Thanks for ideas, ill see with what i can came up with.
Cool. I've also implemented rotating whatever you're holding and what-not, so if you ever want more code/ideas... just ask :D (then again, the rotating of the object is pretty straight forward [no pun intended, haha])
agi_shi wrote:How do you check whether the character should be able to jump?
Just check body normal i am standing on in material callbaks
(I think second one "ContactProcessCallback").
And for jumping itself i just NewtonBodyAddForce(...).
Oh. Interesting.
agi_shi wrote:Also, how did you do the 0-bounce for the character?
Its all in material properties. Next time i come back i could give you
their setup.
I see... well, then I'm a bit clueless. A 0 restitution for my character (I'm using a uni-lateral material system, bi-lateral like NewtonGD's default is way too long-winded to set up) allows him to jump and fall half-way into the ground.
BTW.Seems you are using Ogre?
Yeah. I used to use Irrlicht and eventually switched. I still lurk these forums, and when I see a thread about something in common (aka, this :D), I post :D.
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Well, i tried your idea (it doesnt bouncy float in air) but barrels penetrate
walls (about 1/3 of the barrel) when carrying it. I still playing with my
holding code, have small improvements, but not finished yet.

About player bounciness. I set friction and elasticity to 0 and also
apply high gravity force (not found better way yet):

Code: Select all

Force.Y = -Mass * 2000.0f;
Belfegor.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
agi_shi
Posts: 122
Joined: Mon Feb 26, 2007 12:46 am

Post by agi_shi »

belfegor wrote:Well, i tried your idea (it doesnt bouncy float in air) but barrels penetrate
walls (about 1/3 of the barrel) when carrying it. I still playing with my
holding code, have small improvements, but not finished yet.

About player bounciness. I set friction and elasticity to 0 and also
apply high gravity force (not found better way yet):

Code: Select all

Force.Y = -Mass * 2000.0f;
Belfegor.
They shouldn't penetrate anything :shock: The above is simply a method of constant velocity via forces. Are you setting the omega directly, by any chance? That's what will cause penetrations. You'd need to use torque (constant omega via torque), instead.
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

Post by Revan1985 »

...

very very nice work...
the shaders are good, fps also is big whit shader at maximum...
they are not too used, true?

now, only a thing...
i think you will not release the code...
but...

the menu?
only the code of menu...
i'm becaming idiot to do a thing like it... 8)
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

I can hardly understand what you are telling.

Did you mean: "Release whole code for menu"?

Sorry I cant do that, its prety hard to chop it out of my code (and its to messy now and iam prety busy at work and with my project to spend time for it right now).
However i could chop something specific about menu that you are interested in, maybie. Ask here or send me PM.

Belfegor.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
strelkin7
Posts: 9
Joined: Mon Apr 20, 2009 3:20 pm

Post by strelkin7 »

belfegor
Hi. Can you upload source's jf this demo?
3D Ace
Posts: 66
Joined: Sun Oct 04, 2009 8:47 am
Location: Swakopmund, Namibia
Contact:

Post by 3D Ace »

If someone uploads source. I'd be very happy. :wink:
Everything is possible, IF you know how.
Checkout my website for my upcoming game.(Currently on hold!)
http://www.projectbattle360.webege.com
Image
Post Reply