Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.87k stars 506 forks source link

Investigate Godot Node multithreaded processing for potential more performance #5042

Open hhyyrylainen opened 7 months ago

hhyyrylainen commented 7 months ago

I just tried setting all of the ECS nodes to use background processing and quite expectedly that crashes.

Still it seems like the full feature is not done yet in Godot: https://github.com/godotengine/godot-proposals/issues/6424

And also there's probably more that could be attempted on our side to see if performance can be gained. Verifying if it could give more performance would be the first step for us, as our node processing doesn't really do the heavy lifting so if for example rendering or sound stream state update doesn't happen in multithreaded way with this option, it's pretty much useless for us.

hhyyrylainen commented 7 months ago

Today with .NET 8 I just pulled in so good benchmark numbers that I'm no longer worried about the performance at all. But if this feature becomes available in Godot it would be nice to try anyway.

Benchmark results for MicrobeBenchmark v1
Stationary microbes score: 624.549
AI microbes score: 756.647
Spawns until no 60 FPS: 1460
Microbe stress average FPS: 213.834
Microbe stress min FPS: 43
Alive microbes: 775
Waiting for microbes to die: 169.204
Microbe deaths minimum FPS: 50
Remaining microbes: 300
Total test duration: 400.9
CPU: AMD Ryzen 9 5950X 16-Core Processor (used tasks: 16, native: 8, sim threads: True)
GPU: AMD Radeon RX 7900 XTX (RADV NAVI31)
OS: Linux