How to improve the performance of 3D game in GDevelop 5

My computer specifications are good; I can run the Unreal Engine and its demanding games, but when I create a game on GDevelop 5 and use lighting, the frame rate drops to 40.


My game isn’t very demanding; I only use cubes and some low-quality 3D models.
What is the solution to these problems, given that I have reduced the lighting and shadow quality to the lowest levels?

Are your events organised? I like to put events that are easy to check at the top of a event block (key pressed, booleans, numbers), so that things like raycasting, distance, collisions get rarely checked.

have you tried running the profiler? what does it say?

Tbh I kinda saw the same thing. My first procedural generated 3d dungeon using just 1 pixel 3d box cubes would lag when creating 20-25+ rooms. And this was basically with no graphics. And nothing else. Just simple movement and simple camera extensions for testing.

I had to split dungeon creation/topology out from rendering so gdevelop isn’t doing any thinking.

I am overly concerned that gdevelop 3d engine is only using 1 core and 1 thread.

Are there any problems with the statistics and how can I fix them?

There’s no performance issues in your profiler unless you didn’t include the full profiler detail.

You have a total of less than 3 milliseconds and 60fps is 16ms. You have massive headroom.

Keep in mind that even if you have massive headroom, GDevelop is Vsync locked. So if you have an odd refreshrate monitor (like 75hz or 144hz) with a max FPS of 60, vsync will bump you down to the nearest divisor that it can properly fit into both. So you’d probably see something weird like 45 or 30 fps (or lower).

What about rendering, which takes more than 75% of the performance?

The game runs at 60 fps for me, but I want to improve its performance for low-end phones and computers.

Yes. Rendering is 75% of your profiler total…which is 3ms. 75% of 3 ms is nothing.

3 milliseconds means that your game could run at over 300 fps currently if your monitor was capable of it.

It is extremely unlikely you’re going to optimize more than that.

Thank you for your help

to do that you need to see how it runs on phones silly

why would he? if even his “good” PC (running unreal engine smoothly) can’t even run his game?

full 3D scenes are very new to gdevelop. IMO, its GD not being optimized for 3d. GD is not a 3d game engine

(I might be sooo sooo wrong here)

I did a little research and discovered something important about basic drawing techniques.
GDevelop 5 uses a basic graphics technology called WebGL, which is considered less efficient because it focuses on creating lightweight browser games. In contrast, basic graphics technologies like Vulkan and OpenGL are much smoother and are used in game engines like Unity, Unreal Engine, and Godot 4.


This is what makes the performance of 3D games in GDevelop 5 weak.

IMO, its a mistake that gdevelop contributors went for full 3d games because gdevelop is meant to be able to compile for all platforms in a single click (including browsers). As such they were obligated to use WebGL (though i can’t really say).

either:

1: they should make it so that there is a new project type called “3D game” that only compile for desktop, and make it use vulkan.

or 2: they make it so that there is an option to use another graphic technology, in project setting.

both of these seem like a ton of work.

Every GDevelop game is a web game.

The output code is Javascript, which is a web technology. It just gets wrapped in electron to make an exe in Windows or other Desktop/Mobile OS.

Also, to be very clear: unless you aren’t including something else from the profiler, your rendering is taking less than 3ms per frame. Over 300 fps is possible at your current rendering performance.

Whatever performance impact you are seeing doesn’t appear to have any relation to the renderer, and could be anything from event logic to the OS deciding not to use WebGL at all. Neither of which would be related to ThreesJS, which is the 3D renderer.