Re:Minecraft arrives on the Nintendo Switch
by BoorishBears on Friday May 12, 2017 @11:57AM
(#14325087)
GC doesn't kill constraints for games. Unity3D games have been dealing with the GC for ages now, it's not that bad. Cautious use of memory allocations and calling the GC at convenient times go a long way. But on the other hand Java doesn't have value types, which is pretty terrible.
[ Parent
| on HN ]
Re:Minecraft arrives on the Nintendo Switch
by glenneroo on Friday May 12, 2017 @12:33PM
(#14325425)
I can only speak for Kerbal Space Program, but Unity 5's GC causes stutters on many people's systems, regardless how much RAM is available. There is a wonderful plugin called MemGraph[0] which lets you view GC events and more importantly, to change the time and frequency of GC activation, which has almost completely alleviated stuttering on many systems (my own included).
[0]http://forum.kerbalspaceprogram.com/index.php?/topic/139128-...
Re:Minecraft arrives on the Nintendo Switch
by BoorishBears on Friday May 12, 2017 @01:34PM
(#14325963)
Working with the GC is definitely tricky, but I think it's a feature that works well for the majority of the games made with Unity and really only rears it's head in specific types of games of a specific size. Saying it kills realtime constraints for gaming is definitely a stretch. Open world games with no transitions for example, leave little room for natural GC calls, where as level based games can do things like call the GC at the start of each level and carefully budget allocations through out the level.
The "majority" of games made in Unity are very constrained mechanically and developers have control over the complete experience.
Yes it kills it, there is no big AAA game running on Unity, try to do a Battlefield like game with a GC language where every ms count.
Re:Minecraft arrives on the Nintendo Switch
by BoorishBears on Friday May 12, 2017 @01:30PM
(#14325928)
That's actually exactly my point, "kills real time constraints" is very strong language, you end up having to look at AAA games the size of Battlefield to see where it falls short. Minecraft-like games with similar voxel rendering can, and have been, done in Unity. In fact on the internal Nintendo Wii U dev forums I recall a Minecraft-clone was deep in development in Unity, but I think a lack of demand on the platform killed it
A "demo" (with all the limitations and corner-cutting that demos usually employ) is one thing, a complete product is a different beast.
> Cautious use of memory allocations...
I believe you're arguing against a GC there.
"not that bad" is still something that "I don't want to deal with" when I'm making a game. Get rid of GC pauses and let me allocate memory.
Re:Minecraft arrives on the Nintendo Switch
by BoorishBears on Friday May 12, 2017 @01:40PM
(#14326029)
It's great that works for you, and there's plenty of ways to take that approach outside of Unity. Like anything technology there are trade offs, having a GC while minimizing allocations can save a lot of time and effort upfront. I see it as Python vs Java, or NoSQL vs SQL, or a host of other similar comparisons that rage on in programming.