Hacker News new | ask | show | jobs
by mwd_ 5101 days ago
This is what I do for Android games -- design things to be mutable and pre-allocate however many I'll need during a level. You also have to avoid foreach because it creates objects.

This is an area where C# is better. You can create classes or structs and structs go on the stack. Structs are a lot more appropriate for objects like rects.