Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A GC language is a non-starter for a game engine, I thought this was "game development 101" level knowledge. There is a reason every major game engine actually used to make games is written in C++, with some scripting language on top of that for game logic if necessary.




Every game made with Unreal has GC bolted onto it. GC is absolutely viable for shipping games.

I don't think that's quite true. While Unreal has a GC, it's not used for the low-level components, only for the "user-facing" objects.

Which can rapidly exceed in size and count the "non-user-facing" objects.

This objection really needs to die. GC does not instantly mean you can't program games. At most it locks you out of the tip-of-the-tippy-top AAAA games, but if you were trying for that you weren't going to use "someone's GitHub project" anyhow. And most of them probably have meaningful GC in them anyhow.


What’s your definition of tip of the tippy top AAAA games? Because an awful lot of them are using unreal too!

Pretty much everything in unreal aside from the rendering code and platform interaction layers is written in uobject and actor land - which is garbage collected.

The rendering code also isn’t “just” not garbage collected - it eschews all the normal c++ and is written in a totally different way. It might as well be in a different langauge honestly


Why not respond to the author's justification for it, displayed right on the linked page?

The author calls this out and tries to brush it off with FPS figures,

> The current version of the base engine renders extremely fast, faster than most would think a garbage collected language could go. In my testing a release mode build of a game in Unity with nothing but a black background and a cube runs at about 1,600 FPS.

But straight-up FPS is generally not the main concern with GC in a game engine, it's GC pausing which can make an otherwise smooth game feel almost unplayable. I don't know anything about Go so maybe this is less of a concern in that language?



Minecraft.

to be fair minecraft Java edition isn’t exactly known for having great performance. It will run on a potato, but still runs like a potato even on fast hardware.

This is also not mentioning that the by far more popular version of the game (by player count) “Minecraft Bedrock edition” is written in C++ precisely for performance reasons on low end mobile hardware


You're moving the goalposts.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: