Low Framerate Problem in Simple 3D Game
Asked Answered
F

4

0

Hi everyone! I'm pretty new to Godot (migrating from Unity). My game is comprised of mostly Sprite3Ds and is generally pretty simple. However, I'm only getting 30-35 FPS and my game looks choppy, whereas I used to get 100+ FPS in Unity with the same game. I've figured out that the issue is with the GPU rendering taking too long, but I'm not sure why that's happening or how to fix it. Is there some setting or step that I missed to optimize my game? I'm using Godot 4.1.

This is my first time posting a question on the forum, so please let me know if I need to provide more info or screenshots!

Forepaw answered 16/11, 2023 at 0:9 Comment(0)
H
0

Forepaw My game is comprised of mostly Sprite3Ds and is generally pretty simple.

Can you tell us a little more about what is going on in your game? Is it like Doom with everything billboarding?

Check out Optimizing 3D performance. Those first two points in particular on culling and transparency are probably relevant to you.

Homothallic answered 16/11, 2023 at 0:47 Comment(0)
F
0

Homothallic Here's a screenshot!

There are tiles made of box meshes and components made of non-billboarded Sprite3Ds. I also have omni lights on some components and a glow effect on the whole scene. All of the sprites are marked transparent, but they don't look right when I uncheck that box.

Forepaw answered 16/11, 2023 at 1:0 Comment(0)
W
0

Forepaw use multimeshinstance for multiple non moving meshes. reuse meshes and materials. DON'T USE THE GODOT DEFAULT MESHES, make your own and export it. the default meshes are for prototyping.
combine your non-moving meshes into a single supermesh. put your multiple colliders into single physics objects.
use alpha-Scisor whenever possible (if you don't need transparency). avoid using pure alpha.
make lights and decals small.

Forepaw on some components

Godot doesn't have components

Forepaw glow effect on the whole scene

what else is active?

if you don't need PBR, change your materials to lambert or unshaded.

what is your PC? GPU and memory? Godot has greater requirements than unity, unity is said to work with 2Gb, godot requires at least 4. Godot is a more modern engine that takes advantage of Vulkan and GLES3, while unity's obsolete renderer was opengl-direct9, so also try changing to compatibility or mobile if your PC is too old.

also Godot is very different from unity (it's better) so something made for unity will need to be rethink-ed to make in Godot, since Godot uses nodes and scenes. This is a very common mistake of people migrating their entire games from unity. while you CAN change a few lines of code and get it to work, it will never work optimally.

Wacky answered 16/11, 2023 at 1:19 Comment(0)
R
0

Forepaw Use Godot's built-in profiler to determine potential bottleneck sources. Otherwise it's just guesswork.

Riot answered 16/11, 2023 at 1:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.