Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
FPS Issue (Help Plz) #61477
01/01/06 12:50
01/01/06 12:50
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Ok so I have been playing around with the Physics and created a scene that uses 13 balls, wizzing around in a bowl...

The problem I am having is a difference in performance when switching from Window to Fullscreen modes. This is mostly noticable on TFT systems, like mine, where fullscreen is limited to 70fps....

So how do I ensure physics performance works the same in either mode? I have read the FAQ that talks about FPS max and PH MAX settings, but I am at a loss for how to set this up, settings max fps to 150 is useless when a TFT is in fullscreen. (Is there a way to fix this 70fps issue?)

In short do I need to set any game that uses physics to a max of 70fps???

Thanks for any help / advice you can give me


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61478
01/04/06 11:48
01/04/06 11:48
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi indi,
Did you try to set the fps_max to a value and locked it?
example:
fps_max = 60;
fps_lock = on;

witht those settings, your game should run always with the same speed.
Another solution for you could be a time based code. Check the variable "time",
its value will change when you go from windowed mode into fullscreen. Now you can compensate your speed lose in calculating your forces new dependent on your time value. Its kinda tricky but once I used such a code to make my game playable on very old graphic cards and it worked out.

I hope this work for you...

cheers

Zwecklos

Re: FPS Issue (Help Plz) [Re: zwecklos] #61479
01/04/06 17:22
01/04/06 17:22
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Yes, I can set the FPS to 70 which means it will play same on TFT screens as well as all others, but simply that 70 is the fastest it will run at...

I was hoping there was a fix for the TFT 70fps issue.

As I am using physics based objects for my movement, I would need a time based code that adapted the forces according to time...and in fairness my current function is just a temp peice of code, so as you point out, it may end up working itself out.

Thanks for the response, gives me things to think about. Cheers


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61480
01/17/06 12:36
01/17/06 12:36
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
What I am finding now is that if the screen is a little busy, in other words trying to more than the PC can handle comfortably, you get FPS dropage, and when this happens my physics items are performing strangly, resulting sometimes in slow objects speeding up dramtically and visa versa.

Of course I am taking steps to try to free up FPS, in other words LOD, lower poly models and other standard stuff, but I am still concerned about this.

While the TFT 60hz XP bug is a problem, the title does not require FPS above this, so limiting will solve a large part of this problem. Fiddling around trying to fix this has got my attention on exactly how the FPS effects physics objects...

I have a redementary system for adding force to the models, that quite frankly is poorly coded, although as far as I can see it is using 'time' variable correctly so I am still struggling with why the FPS is such an issue.

I know there are other variables that can be set to adjust the accuracy of physics but every thing I have experimented with so far has not resolved the issue. I am aiming to create a physics based movement system that runs on the server, and updates clients as to their actual positions according to physics, i.e they influence the physics objects to move their player. So regardless of FPS issues I have to ensure that the balls all end up in the right places, and dont wizz around at faster than possible speeds etc...

So while I continue to experiment and re-visit the manuals and tutorials available, any help and advice you could give I would be very grateful for. I have 13 physics spheres in a small area, and at most I would only have 16.

Oh and a final question: I have noticed that gravity is a linear force, in other words objects dont seem to get faster and faster until reaching terminal velocity. Is there a formula or code to adjust gravity to work more realisticly? Thanks again


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61481
01/18/06 03:14
01/18/06 03:14
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Quote:

Oh and a final question: I have noticed that gravity is a linear force, in other words objects dont seem to get faster and faster until reaching terminal velocity.


It's quadratic, not linear. Having damping set to large values might hide that fact. There's no terminal velocity though.

Re: FPS Issue (Help Plz) [Re: Marco_Grubert] #61482
01/18/06 12:14
01/18/06 12:14
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Hmmm ok, sorry for wrong terminoligy, just the movement I get seems to be very linear, in that it falls at a fixed rate.

the bits of my code for the ball...
Code:

phent_settype(my, PH_RIGID, PH_SPHERE);
phent_enable(my, 1 );
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my,50);
phent_setdamping(my,10,10);
phent_setelasticity(my, 25,0);
phent_setmaxspeed( my, 15000, 5000);



..and then in its while loop I have...

Code:

phent_getvelocity(my, mySpeed, nullvector);
if (vec_length(mySpeed)>90)
{
// too fast ? yank up damping for a while
phent_setdamping(my, 90, 90);
} else {
// 10 percent damping by default
phent_setdamping(my, 10, 10);
}
}


Pretty much straight out of the manual...
Gravity is set at -386 yet the ball falls very, very slowly...?

Please point out my stupidity


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61483
01/18/06 20:54
01/18/06 20:54
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
For testing purposes set phent_setmaxspeed to 90000 each and comment out the phent_setdamping(my,90,90) line.

Re: FPS Issue (Help Plz) [Re: Marco_Grubert] #61484
01/18/06 21:27
01/18/06 21:27
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
I have taken all damping references out and set max speed as you suggest, I was setting it much higher, anyway.

I also commented out the above pull up speed, and the result I get is much faster movement along the x & y axis, but the z remains the same. Fall is still slow.

I have a resource availble although it is pass protected for NDA reasons, if you have time to look at it it would be greatly appreciated.

I increased gravity by a factor of 10 and get faster downwards movement, but then the forces needed to move anything are beyond the 7 digit scope.... not to mention that it ends up forcing its way through the mesh beneath...

My movement code is a fast and dirty influence that adds central forces to move the balls around, so you can run up a ramp and launch into the air, then letting go physics should drop the player, but it doesn't....

I will PM you link and pass, presuming you don't mind that its NDA bound due to client confedentiality. Thanks Marco.


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61485
01/18/06 21:58
01/18/06 21:58
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
I have run your demo and see the problem, but don't know if I can be of much help. Trying out other physics demos, gravity is working as expected, so I am suspecting that something in your script counters the gravity. This could be an upward force, the aforementioned damping, max. speed, a reduced PH_FPS_MAX_LOCK value, a missing skybox, etc. You will have to strip your script to its bare essentials (e.g. no players, just a ball created somewhere) and then add functions until it breaks.

Re: FPS Issue (Help Plz) [Re: Marco_Grubert] #61486
01/18/06 22:27
01/18/06 22:27
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Thanks Marco, I will continue to hunt for the reason.

Thanks for your time


The Art of Conversation is dead : Discuss
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