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 2 of 2 1 2
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61487
01/18/06 23:02
01/18/06 23:02
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
Could this be a scale issue? I mean if my objects are huge? would this effect things?

The Game area is maybe 10000x5000x5000 quats ( I think), with models standing 500 high? Im at a loss for what it might be...

I commented out all FPS related variables, added a ball with just
Code:

phent_settype(my, PH_RIGID, PH_SPHERE);
phent_enable(my, 1 );
phent_setmass(my, 10, PH_SPHERE);
phent_setmaxspeed( my, 90000, 500);



Still it falls at a slow rate.....

I agree it must be something in my code as I am pretty sure I didnt get this in another test scene unrelated to this project...

Could you (or someone else), please explain to me what would be good settings, like FPS_MAX and so forth, to get a consistant performance and to elliminate this from the reason for slow fall speeds.

TIA - Sorry if I am being a pain, im still very new to Physics with A6


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61488
01/19/06 19:34
01/19/06 19:34
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 think the problem is related to my settings for FPS max and so forth, when I commented out the restrictions I had the models fell at the correct rate, but other problems become apparent, some that I had before, with models getting faster/slower in low/high FPS areas...

Am I trying to do something that the physics engine cant do here? Should I be trying to code this the old fashioned way??? i.e without physics?

What would the optimum settings be for smooth consistant physics?

Thanks for any help you can give


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61489
01/20/06 21:58
01/20/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
This can happen if you force the refresh rate to be higher than what your CPU can handle. E.g. if you set fps_max=200 (good idea) and then call fps_lock=on (bad idea) you would force 200 visual updates per second while an average PC might only be able to handle 100 per second. As a result everything will be moving at half speed.

Re: FPS Issue (Help Plz) [Re: Marco_Grubert] #61490
01/21/06 08:03
01/21/06 08:03
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
From what I can tell, and I posted this question in the Engine topic, the 70fps bug is part of my problem, running TFT screens here.

With only 12 player models 2000tri's one ball 350tris and a 2000tri bowl, im dropping FPS all over the place, as low as 5-10fps in places...

Each of the models is linked to a physics object to provide solution for movement, but maybe this is not a good approach. You have seen what we am trying to achieve, may I ask, would you use physics in this way or return to a c_move based system?

At the moment it's looking like the combination of 70fps bug combined with the need to lock FPS down to use physics, makes this impossible on the A6 engine. As the physics objects move at different rates dependant on the FPS, with all 12 models on screen, the movement balls become unstable and unpredictable...

Disapointed about this. IF all the above is not resolvable, do you know of another solution to this problem or should I be shopping for a new engine? TIA for all your help


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61491
01/21/06 11:41
01/21/06 11:41
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 now installed the public beta 6.4 after completely uninstalling A6 from my PC.

I also posted a question about the 70fps limit in fullscreen mode that I was experiencing and got some help on that so part of the problem I believe is now resolved. I believe it was my V-Synch Card settings preventing this...

I have removed my player models and replaced them with a simple pin model, far less polies, and the movement is now consistant in both modes. However A6 is now refusing to run at all, so I can not test this more at the present time.

EDIT: I rebooted and re-tweaked my catalyst again, Disabling Catalyst AI was a bad move, and totally screws up WED and MED and so forth. Anyway I digress.

I commented out the player code and simply added all the models, including the ones that wouldn't be seen, straight into the map all in the same space, guys running through all the animations and so forth. I get a solid 69fps, right up to the max fps I have set. So it's not a question of the number of polies on screen, but the amount of thinking power needed to manage 13 physics spheres as well as the polies.

I have run another test with physics crates and can get anything from 30-60 of them bounding around before the physics drops off. I presume sphere physics require a lot more CPU to handle as I am only using 13...

I am hopefully confident that this is down to my code and not the limitations of the physics engine. Sorry that I seem to be spamming this subject, but its a fundemental part of the title, unless I can re-create the same effect with c_move....

Any ideas anyone?

Last edited by indiGLOW; 01/21/06 14:49.

The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61492
01/23/06 21:02
01/23/06 21:02
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
Sphere collision require a lot less CPU calculations than polys or boxes.

Quote:

Each of the models is linked to a physics object to provide solution for movement, but maybe this is not a good approach. You have seen what we am trying to achieve, may I ask, would you use physics in this way or return to a c_move based system?


I would continue to use physics for the ball but c_move for players.

Re: FPS Issue (Help Plz) [Re: Marco_Grubert] #61493
01/24/06 00:56
01/24/06 00:56
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
heya there!
Im not sure if this helps but I'll gonna try it anyway

its totaly improvised and I have no idea if it helps against this tft screen bug. it should be a mark/pointer to another solution...maybe

before your physic entity moves, save the value “time“ in a variable
(var balance_fps_1 = time;).
then do your physical movement dependent on the variable “balance_fps_1”.
now when the physic-movement is done, safe the value “time” again in another variable (var balance_fps_2 = time;).

Code:

var balance_fps_1;
var balance_fps_2;
var balance_fps_3;
var standard_force[3] = what ever;
var diffrence;

//calculate the diffrence
If(balance_fps_1 > balance_fps_2)
{
balance_fps_3 = balance_fps_1 - balance_fps_2;
diffrence = 1;
}

//calculate the diffrence
If(balance_fps_2 > balance_fps_1)
{
balance_fps_3 = balance_fps_2 - balance_fps_1;
diffrence = 2 ;
}



now you can make your next physic-movement dependent on the variable balance_fps_3 which has saved the diffrence between the first physic move ever and the point of time which you gonna use another physic movement.

Code:

If(diffrence == 1)
{
phent_addforcelocal (entity, standard_force+balance_fps_1 - balance_fps_3, vecpoint );
}

If(diffrence == 2)
{
phent_addforcelocal (entity, standard_force+balance_fps_1 + balance_fps_3, vecpoint );
}



You probably would do that thing in a while(), to get sure that you ALLWAYS have the diffrence between the movements.
this needs a bit testing/exploring but Im sure a code like this would solve your fps issue.
I would really help you out a bit more efficiently but this is not a “Here is the code” problem and I also dont know exactly what/how your game should work Im afraid.

for your slow falling problem, I would recommand you to use phent_addforcelocal to force your entity down while its not touching the ground. If you want more velocity in the falling, make the force dependant to a variable that increase its value while falling. Use traces to find out if your entity is touching a ground or not.

Another hint...I dont know exactly how your game works but try to disable physic objects when they are not in use as often as possible. Ive made good experience in saving performance with that.

cheerio

Zwecklos

Last edited by zwecklos; 01/24/06 02:01.
Re: FPS Issue (Help Plz) [Re: zwecklos] #61494
02/27/06 15:54
02/27/06 15:54
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
@Marco:
Quote:

I would continue to use physics for the ball but c_move for players.



..yes this is my thinking also now, infact I may not even use it for the ball, as much of the time it will be carried or being thrown.

Disapointing that 13 spheres would make such a massive difference to the FPS, and now I have a lot more coding to do to get them to move correctly. I dread to think how it handles more complicated physics like ragdolls. Is 10-15 physics objects about the average maximum if the objects are spheres or more complicated still?

Is this a case like dynamic lighting or turning off physics outside a certain range from the camera and controlling scenes to have very limited physics on screen at any one time?

Oh and finally, presuming that with 13 balls in play, the engine was struggling, causing the strange speeding up and freezing of players, and slow fall rates. in other words pushing the physics makes it inacurate. For reference, how many is the maximum number of physics objects you should you aim to have on screen at any one time. That blows the snooker game idea out the window! lol

Can Newton handle more? Do you know if this has the same limitations?

TIA for any help and advice you can give


The Art of Conversation is dead : Discuss
Re: FPS Issue (Help Plz) [Re: indiGLOW] #61495
03/30/06 17:37
03/30/06 17:37
Joined: May 2005
Posts: 155
C:\Program files\GStudio6
alphaindigo Offline
Member
alphaindigo  Offline
Member

Joined: May 2005
Posts: 155
C:\Program files\GStudio6
there is a very good woking snookwer example as one of the newtron tutorials


beware the sock! - tLempoary...
Page 2 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