Hacker News new | ask | show | jobs
by aphextron 3289 days ago
> You end up with frequent stop-the-world garbage collection pauses that freeze the screen for seconds at a time. Play any Unity game on the PS4 and you'll see it frequently.

This is a coding problem, not an engine problem. A game should have almost no dynamic resource allocation.

1 comments

Then what about Unity leads everyone who uses it to allocate dynamically, somehow, on every platform but Windows?

If everybody makes the same coding problem, and the common denominator is one of their dependencies, it makes you wonder what's wrong with the dependency.

If you're genuinely interest the developers of Inside have a great presentation on how they hit a stutter free 60fps on all platforms, PS4 included.

https://www.youtube.com/watch?v=mQ2KTRn4BMI

I don't know what projects you're referring to specifically on the PS4 but I'd suspect the difference comes down to hardware spec on the PC masking the issue, it probably being the primary platform and/or lack of time to work on optimisation for the port.

It's the use of C#, which generally written in a manner that creates garbage and lack of experience with programming games that causes many people who use it to go wild with allocations. Both intentionally and by accident. These days you can actually get pretty far before it's ever a problem on a gaming PC. Unity is also incredibly accessible so more people with less technical chops are programming games without even opening the profiler.