Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
small fps with physic #48155
06/20/05 21:36
06/20/05 21:36
Joined: May 2005
Posts: 22
Hun
Cube Offline OP
Newbie
Cube  Offline OP
Newbie

Joined: May 2005
Posts: 22
Hun
Hi!

I use this code to a box object:

Code:
 action box_grav
{
phent_settype(my,PH_RIGID,PH_box);
phent_setmass(my,23,PH_box);
phent_setfriction(my,25);
phent_setelasticity(my,50,5);
phent_setdamping(my,50,90);
ph_setgravity( vector(0,0,-386) );
}



If I take this action on more than 10 object then it clogged, i think the fps will be smoll.

Where can I show the fps and how can I optimize?

I hope you can understand, sorry for my english.

Last edited by Cube; 06/20/05 21:54.

Sorry for my English
Re: small fps with physic [Re: Cube] #48156
06/21/05 10:01
06/21/05 10:01
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Hit F11 for the debug stats.

Yes, physics do eat the CPU, however you should be able to manage more than ten. What are your system specs?

Re: small fps with physic [Re: A.Russell] #48157
06/21/05 12:14
06/21/05 12:14
Joined: May 2005
Posts: 22
Hun
Cube Offline OP
Newbie
Cube  Offline OP
Newbie

Joined: May 2005
Posts: 22
Hun
Intel P4 3.0 GH, 512mb ddr, gf6600gt

I had watch the fps and it's about 59, but my characer hopped.
If I don't use any physic object my character work good.


Sorry for my English
Re: small fps with physic [Re: Cube] #48158
06/21/05 12:23
06/21/05 12:23
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Quote:

but my characer hopped.





Heīs hopping? Try to decrease the elasticity.

phent_setelasticity(my,10,5);

or

phent_setelasticity(my,0,5);

Maybe that will help.

Last edited by fogman; 06/21/05 12:25.

no science involved
Re: small fps with physic [Re: fogman] #48159
06/21/05 12:38
06/21/05 12:38
Joined: May 2005
Posts: 22
Hun
Cube Offline OP
Newbie
Cube  Offline OP
Newbie

Joined: May 2005
Posts: 22
Hun
I had try but isn't good.
I had tested that: I take 20 domino object one after another. If i dont jog the domino my player work good, but if I jog the first domino my character start to hop.


Sorry for my English
Re: small fps with physic [Re: Cube] #48160
06/21/05 13:01
06/21/05 13:01
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline
Senior Member
Andreas C  Offline
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Hi,

just a note ... I thought that it would make more sense to use ph_setgravity and related functions (that effect the physics engine as a whole) in a general routine (e.g. main()) instead of setting it in an entity action.

Can anyone confirm this ?

BTW, I have tested with about 20 objects and while I have other problems with the PhysicsEngine, FPS reduction was NOT one of them.

Also, there is a script you can include for writing a logfile that captures performance statistics (incl. MS used on physics engine activities). That should also give you a good indication where your level code is "spending its time".

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: small fps with physic [Re: Cube] #48161
06/21/05 14:10
06/21/05 14:10
Joined: May 2005
Posts: 22
Hun
Cube Offline OP
Newbie
Cube  Offline OP
Newbie

Joined: May 2005
Posts: 22
Hun
I had take about 50 domino to the map and i had pushed the first domino. If the last domino was fall over too then my character was worked again good.
The fps was all the time about 59.
What is the problem? Why is my character hopping?


Sorry for my English
Re: small fps with physic [Re: Cube] #48162
06/21/05 14:15
06/21/05 14:15
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Just to clear up... is your player also a physic entity?

Dammn, I got (only ? ) COM, so I canīt use more
physicobjects then one.
So Iīm really interested to help you, but I canīt
simulate your problem on my machine


no science involved
Re: small fps with physic [Re: Cube] #48163
06/21/05 14:20
06/21/05 14:20
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline
Senior Member
Andreas C  Offline
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Cube,

what data is being displayed when you use the F11-debug information ? Or the performance log - is there anything in there that uses up a lot of time ?

Normally, your character (player) should be able to move concurrently with the dominos falling over. Does this happen too when you have 20 dominos ?

Does your ACTION code for the physic entities include WAIT statement ?

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: small fps with physic [Re: fogman] #48164
06/21/05 14:22
06/21/05 14:22
Joined: May 2005
Posts: 22
Hun
Cube Offline OP
Newbie
Cube  Offline OP
Newbie

Joined: May 2005
Posts: 22
Hun
Yes, My player is a physic entity too.


Sorry for my English
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1