Hacker News new | past | comments | ask | show | jobs | submit login

I was once working on a solo indie game using C# with OpenGL bindings. If you create it along the normal program lines of object instantiate/use/destroy (and repeat), then you're soon going to run into serious issues.

At the time I had many issues with the GC, Large Object Heap and fragmentation (although this had still been in a much older .NET version).

For a game project, both for speed and memory, you want as much as possible to be pre-allocated (and all at once). During run-time you want as few objects as possible being instantiated, that way you save cycles on both the objects, and eventually on the GC. Of course it's not always that easy.

After that it depends on your targets, you'll never fit a Unity C# game as tightly into any target as a native app, but it's a trade-off that's worth making in many cases.




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

Search: