4 ms·
Game programmers mostly want tight control of object layout and lifecycle. GC doesn't matter much when use ECS all over your codebase. As long as they can run t
by xfer 5y ago
Game programmers mostly want tight control of object layout and lifecycle. GC doesn't matter much when use ECS all over your codebase. As long as they can run the GC when they want and can layout the objects flat without needing pointer indirection it would be very suitable.
I think C# is popular because it allows the above. When Java has proper value types it might be suitable for writing games.
- throwaway894345 5y ago> As long as they can run the GC when they want and can layout the objects flat without needing pointer indirection it would be very suitable. To be clear, the problem isn’t pointer indirection, but rather lots of objects on the heap, right? Pointers should be fine as long as there aren’t many allocations (e.g., pointers into an arena)? > I think C# is popular because it allows the above. When Java has proper value types it might be suitable for writing games. Go also has value types, FWIW, and they are a lot more idiomatic than in C# from what I’ve observed.