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.
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).
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.
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.
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.