Is the NDK required for good performance in the development of an Android Game?
android, android-ndk
Solution
I see 3 main reasons to use NDK:
- you want to reuse C/C++ code base (e.g. game engine written in C++, crossplatform games)
- get more memory (you can use much more memory via NDK)
- your game is very CPU intensive and you need all your device power.
In all other cases you can choose whatever you like. SDK/Java allows you to use OpenGL same way as NDK, so your graphics won't slow. You should be careful with GC to get smooth gameplay. If your game is very CPU intensive you can write some methods in C++ and call them via JNI. By the way, Dalvik has JIT so Java code can be as fast (even faster sometimes) as C code.
Problem
I heard if I develop Android Game without using the NDK, the performance is significantly lower. Is this the truth?