Jump to content

Improving performance in my game


mangualmanuel
 Share

Recommended Posts

I am learning babylon.js and I am encountering a problem with my graphics performance. When I run my game the frame rate drops from 50 or so to 19 fps. In addition, when I move my character around the frames drop even more (so from 20 or so fps it drops to 5 fps) and I don't know what to do. Does babylon come with a set of tools that help improve performance like occlusion? I also looked into octrees but for some reason that does not seem to aid my cause. Or maybe I am not instantiating it right. Can anyone help me understand what I need to do in order to increase the performance in my game? Many thanks in advance!

Link to comment
Share on other sites

Hello, 

 

It will be hard to answer you without a little bit of knowledge of your project. Is it filled with a lot of mesh ?

Maybe the number of triangle is too much, and no optimisation method wil help you.

Maybe your code is not well written.

Maybe you have too much shadows.

 

It can be linked to a lot of things.

 

Can you share a demo of your game ? 

 

Thanks

Link to comment
Share on other sites

It's not clear to me what you are trying to render, but would conditionally managing octree depth help in this case?  It can in some circumstances.

 

And would managing visible and hidden instances help limit your scene overhead and potentially improve refresh rate (frame rate?)

 

 

DBawel

Link to comment
Share on other sites

Another problem could be simply your computer. My dad's old laptop could barely run my game, (15 fps) but my new laptop I just got it's nearly perfect (56-60fps)

 

So yeah, posting your code or even your project would be very useful.

 

Also: use mesh impostors whenever possible.

Link to comment
Share on other sites

There has large thing to optimize a scene.

  • The instances
  • octree (mesh static, mesh dynamic, collision, ground) 
  • SceneOptimizer
  • LOD
  • Avoid too many texture on models and reduce their weight, dimention (image 512 * 512 is good)
  • Do not be with code heavy calculates in the rendering loop
  • Avoid using physical when we can do otherwise.

short, numerous track to earn performance.

Link to comment
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...