logoalt Hacker News

bobajeffyesterday at 3:34 PM5 repliesview on HN

About garbage collection:

Are there a lot of Unity/Godot devs unaware that their engines are using GC? I would assume they'd have accepted the cost of GC already.

Unreal devs I can understand having an issue with it though.


Replies

pjmlpyesterday at 4:11 PM

Unreal devs have Unreal C++ dialect with GC, Blueprints and soon Verve to worry about.

The times of pure manual memory management game engines, across all layers of what requires to draw a frame are long gone.

Naturally someone is going to point out some game engine using compiled C dynamic libraries for scripting, those are the exception.

show 1 reply
tapoxiyesterday at 4:08 PM

GDScript in Godot doesn't use GC, it uses reference counting and doesn't "stop the world".

Other languages that bind into the engine do this too, (C++, SwiftGodot, Rust-Godot)

C# obviously does, Miguel de Icaza actually started SwiftGodot because he (ironically) ended up hating GC pauses after promoting C# for so long

show 3 replies
jayd16yesterday at 3:50 PM

Issue isn't about game devs it's about non-game devs backseat programming.

If you spend a week in these engines you're well aware of the garbage collector.

unclad5968yesterday at 3:48 PM

In my experience, when using Unity, I became acutely aware of creating garbage and how to avoid it. I used to see a lot of object pooling which is basically a makeshift arena allocator.

chekibrekiyesterday at 3:49 PM

Can you explain? AFAIK Godot uses C++ under the hood which does not have garbage collection. Other languages such as C# and GDScript use bindings.

show 1 reply