Increasing game performance

Let’s get some information down on the dev forums as well about low performance.

So the game seems to drop to low FPS after playing for quite a while. Even dropping to single digit FPS. I’ve already reduced the game entity limit from 1000 to 300, but even that doesn’t fully help, but seem to at least postpone the problem a bit.

I’ve done C# profiling:

And native code profiling:

Here’s the raw numbers:

I wrote some instructions on profiling here: Thrive/ at master · Revolutionary-Games/Thrive · GitHub

Note that you should disable auto-evo in background and set worker threads to 1 in options to get cleaner profiling numbers.

I’ve tried disabling AI, rendering microbe graphics other than the player, and disabling microbe sound. Those have no impact on the performance. It seems that around 30% of total time is taken up by physics and Godot scene tree updates, with 10% being our C# physics callbacks. So yeah I don’t have any easy ideas at this point other than further restricting the number of game entities.


Other than reducing the number of entities I can only think of using Godot’s Servers: Optimization using Servers — Godot Engine (stable) documentation in English

1 Like

While I can’t make a fancy graph like this I could provide you with a rough estimate of the perfomance of Thrive on my system:

PC Configuration:
CPU: AMD FX-8320
GPU: AMD Radeon R7 250 2GB VRAM (Display Resolution: 1920x1080)

Thrive Settings:
FPS Limit: 120
Vsync: OFF
MSAA: Disabled
Clouds simulation: 250 ms
Auto-Evo during gameplay: OFF
Used Threads: 8


Main Menu and Patch Map Perfomance: 120 (usually it is around 211 FPS)

Auto-Evo Report: around 100 FPS probably due to the graphs

Editor: around 90 FPS

Membrane Tab: between 60-70 FPS

During gameplay for the current save the FPS is around 2-12. The save is created in Freebuild Mode and it’s on generation 16. I managed to increase the perfomance (probably) due to 5 or 6 extinctions which I managed to create in my patch. Currently it have 10 species with various populations (including mine of course) and the FPS is back to around 30-40.

And here are a few of the things which I wrote in Discord earlier today, I will just leave them as a quote:

I’m starting to get suspicious what causes the game lagging so much because the moment when I’m either saving or waiting for the auto-evo to finish, my FPS goes from 3-7 at generation 16 with a freebuild cell to 50-80:

  1. The rendering of the clouds probably have an good impact but does it really? At the beginning of the game you can easily see a lot of clouds and my FPS won’t drop so dramatically (49-to FPS at the lowest).
  2. The number of objects around me is probably way more FPS intensive and causes spikes and FPS drops but still around my cell the objects shouldn’t be over 20-30 at best. But then it came to my mind that every cell have 3D objects in it and the tip of he iceberg is that they (the organelles) are animated as well.
    2.1. Does Thrive uses occlusion culling? This should solve most of the problems in my opinion?
    2.2 Could we add an option to the Perfomance tab which disables the organelle animations?
    2.3 When zooming out there is no point in animating the internal cell organelles anyway. If the animations are automatically disabled at a certain zoom level this would help for the perfomance of the game.

For the occlusion culling, Godot does not support that feature like other engines. The organelles shader could indeed be made much more performative.

I don’t think we use ambient occlusion, if you are talking about the render effect.
From my profiling results it doesn’t seem like that sending rendering commands to the GPU is the bottleneck, nor is waiting for GPU to process the current frame.

I meant occlusion culling, my bad. It’s an important method for really weak or older gpu but as you say, rendering isn’t the bottleneck.

1 Like