4 ms·
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 alrea
by bobajeff 10mo ago
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.
- unclad5968 10mo agoIn 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.
- chekibreki 10mo agoCan you explain? AFAIK Godot uses C++ under the hood which does not have garbage collection. Other languages such as C# and GDScript use bindings.
- giancarlostoro 10mo agoMost people using Godot will be using GDScript or C# to make their games. Funnily enough whilst trying to Google gdscript and godot, I found this post I wrote in 2018 (subcomments mention gdscript and gc). https://news.ycombinator.com/item?id=16673751 https://news.ycombinator.com/item?id=16673751
- jayd16 10mo agoIssue 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.
- tapoxi 10mo agoGDScript 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
- pjmlp 10mo agoReference counting is a GC algorithm from CS point of view, as looking into any worthwhile reference will show.
- furyofantares 10mo agoIt's not what people mean when they say GC though, especially in reference to games, where you care about your peak frame time more than about your average frame time.
- tracker1 10mo agoYou should watch some of the more recent Gamers Nexus videos... the average frame pacing counts for a lot, and they're making a concerted effort to show this, as it does represent the level of "jank" in games very well.
- furyofantares 10mo agoGot a link? I can't work out which ones you're referring to.
- starkparker 10mo agomost recently https://www.youtube.com/watch?v=qDnXe6N8h_c https://www.youtube.com/watch?v=qDnXe6N8h_c on why FPS is flawed specifically for GPU benchmarking most specifically, an ongoing attempt to understand and debunk frame generation (DLSS, etc.) as a performance gain due to introducing latency despite high FPS: https://www.youtube.com/watch?v=Nh1FHR9fkJk https://www.youtube.com/watch?v=Nh1FHR9fkJk, https://www.youtube.com/watch?v=GDvfIbRIb3U https://www.youtube.com/watch?v=GDvfIbRIb3U More broadly than frame pacing, https://www.youtube.com/watch?v=Fj-wZ_KGcsg https://www.youtube.com/watch?v=Fj-wZ_KGcsg is a recent example of one of _many_ interviews going back years on why both frame times and frame rates are all flawed for explaining why some games feel smoother/lag more than others (there are GN videos dating back to 2016 on the subject)
- pjmlp 10mo agoUnreal 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.
- johnnyanmac 10mo ago>The times of pure manual memory management game engines, across all layers of what requires to draw a frame are long gone. That's what makes me curious about Rust engines like Bevy. Could is truly pull it off and bring back that kind of thought to game development? It's not "pure manual memory management", but the mindset of Rust requires that kind of thinking. It will definitely be niche for times to come, since most (non-AAA) games simply aren't going to worry about performance. But it might carve a solid community for those concerned with optimization.
- pjmlp 10mo agoThing is, FPS don't make fun games, what makes games fun is a great design, delivered in a way that overall performance doesn't hinder the experience. That is why games like Minecraft, Roblox, Celeste, Balantro make it big. None of them would have happened if the creators followed the advice 100% C coding (or C++ for that matter) was the only way, and yet their design is what made them shine.
- johnnyanmac 10mo agoYou're not wrong. But consider a different lens: Celeste isn't a game that would need to worry about performance in 2018. It's 2d sprites with box collisions and relatively minimal particle effects. Your toaster can run Celeste. But a game like Factorio with heavy simulations and complex interactions and pathing absolutely needs to consider performance to pull off a seemless experience. Those are the kinds of games I'd hope engines like Bevy could enable farther down the line. Design is still key, but some game types are a larger technical challenge than others.