Comment by willtemperley
4 months ago
Java is incredibly productive - it's fast and has the best tooling out there IMO.
Unfortunately it's not a good gaming language. GC pauses aren't really acceptable (which C# also suffers from) and GPU support is limited.
Miguel de Icaza probably has more experience than anyone building game engines on GC platforms and is very vocally moving toward reference counted languages [1]
He would vouch as great as he might be, he has a bias, and Mono GC was never a great implementation.
Also here is how great his new Swift love performs in reality against modern tracing GCs,
https://github.com/ixy-languages/ixy-languages
Interesting link, but that's a nearly 7 year old version of Swift (4.2) running on Linux.
I wonder how the performance would be with Swift 6.1 which has improved support for Linux.
Probably much better, given the improvements on the Swift optimizer, but just goes to show "tracing GC" bad, "reference counting GC" good isn't as straighforward as people make it to be, even if they are renowned developers.
6 replies →
> GC pauses aren't really acceptable
Java has made great progress with low-pause (~1 ms) garbage collectors like ZGC and Shenandoah since ~5 years ago.
People have 240hz monitors these days, you have a bit over 4ms to render a frame. If that 1ms can be eliminated or amortised over a few frames it's still a big deal, and that's assuming 1ms is the worst case scenario and not the best.
I don’t think you need to work in absolutes here. There are plenty of games that do not need to render at 240hz and are capable of handling pauses up to 1ms. There’s tons of games that are currently written in languages that have larger GC pauses than that.
What about the C# garbage collector? Is it much better? Because Unity is in C#, right?
1 reply →
Yes and it's impressive.
For the competitive Minecraft player, I suspect starting their VM with XX:+UnlockExperimentalVMOptions is normal.
A casual gamer is however not going to enjoy that.
Are you sure that enabling ZGC or Shenandoah requires UnlockExperimentalVMOptions ?
1 reply →