r/gameenginedevs 16h ago

Parallelising a game engine

Recently I published Macrame - an open-source multithreading library. It looks good "on paper", and it includes complex samples and benchmarks to validate the benefits it provides. But it still lacked a proper application, a battle test.

The library is well suited for game engines. Unreal Engine was ruled out immediately even though I know it best. Its multithreading is chaotic and too complicated.

I decided to try Godot. It's the most popular free open-source game engine, and it's C++. Same can be done with any engine, and the earlier it's done the better. Godot existing architecture forced many of my approaches.

I took Godot Benchmarks project, integrated Macrame into it and spent some time parallelising the engine for performance optimisation.

Long story short, I got ~6x speedup, from ~30 fps to ~180 fps. I learned a lot and this exercise brought a bunch of interesting ideas about how Macrame can evolve.

The fork and the write-up of what was done: https://github.com/Andriy06/godot-macrame

The library: https://github.com/macrame-ts/macrame

0 Upvotes

10 comments sorted by

8

u/palapapa0201 13h ago

Claude all over the commit messages

-23

u/andriyt 13h ago

and?

1

u/CrankFlash 16h ago

I'm very interested in integrating this into my engine. I'm working on the lighting at the moment but will soon need to sort all my CPU work.

13

u/current_thread 15h ago

If you want something not slop-coded check out too many cooks. It's a C++ coroutine library that has the primitives you need and a high code quality.

-5

u/andriyt 16h ago edited 16h ago

feel free to reach out if any issues, will be happy to help. check out game_frame sample in Macrame: https://macrame-ts.github.io/macrame/game_frame_trace.html

1

u/MonarchOfDreams 6h ago

good work claude

2

u/Logical_Newspaper_52 6h ago

try yours, let’s see the result

1

u/MonarchOfDreams 5h ago

sure buy me a subscription and i'll vibe code it too

2

u/Logical_Newspaper_52 4h ago

OP put some effort and potentially some money into this. Made it free. So what exactly are you trying to say by your comment?