|
|
|
|
|
by zlynx
1857 days ago
|
|
Your other choices are: - Never GC via using object pools. This code is nastier than C++ because Java is not intended to be used this way. - GC whenever needed randomly. The game will just pause occasionally. Very annoying as a player. - Write the actual game in C++. Make a few JNI calls here and there. On feature phones I only remember this being possible for some vendor apps. |
|
So I think writing a game while profiling allocation rates and paying a bit of attention to not spam new everywhere, one should get decent performance without any framedrops. At most, optimize the hot loops with primitives, arrays.