Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

Is there a minimum FPS a game should run at to have smooth physics?   Mine is hitting 40 to 50 FPS at the moment and physics is very jumpy.  It is even worse in debug mode when fps gets as low as 10.  It's not just lag between frames - physics actually goes haywire.  I'm wondering if it is a result of low FPS or somthing else in my code.

Link to post
Share on other sites

After a bit of testing I think the low FPS is due to multiple things.  1 to 2 million triangles and up to 300 - 400 batches. There is also an algorithm that runs every so often and can eat up to 10ms which drops the frame rate quickly (I think this sudden drop is causing the jerking movements). The physics shape I'm using is 360 polys - too much?

#canwaitforturbo

Link to post
Share on other sites

360 polys for a physics shape if it is all in one place (not a big building or something) is probably going to slow you down.

The number of batches is probably the bottleneck here. New engine is very very good at handling those.

  • Like 1
Link to post
Share on other sites

I'll reduce the poly count and see how that helps then.

Quote

The number of batches is probably the bottleneck here.

Is a batch a group of entities that fall within the frustum?

Quote

New engine is very very good at handling those.

You tease me - I'm thinking about moving over to Turbo now but am worried there might not be enough features yet to make the transition seamless.  Like I know there is no 2D drawing yet... and some commands are missing...

Link to post
Share on other sites

I solved the jittering of the physics object, it was simple.  I was setting the cameras pivot to the heads position each frame instead of parenting it to the head bone (doing that caused the camera to rotate with the bone - which was kinda what I wanted except the bone had weird rotations on top of how it was animated)

auto _headPos = frameManager->GetBonePosition(bones.head, true);
cameraPivot->SetPosition(_headPos, true);

So I just parented the camera's pivot the player entity instead.  Problem-o solved.

problem-solved.jpg.a73a7d3fb52c730839afe7bf573de273.jpg

  • Haha 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...