Game Development Reference
In-Depth Information
Figure 11-13. Collision between player's ammunition and an arena object with reaction force calculated natively
Summary
In this chapter, I covered the Android Native Development Kit (NDK). I started with an overview of
what exactly the NDK is and what system requirements, software requirements, and actual Android
hardware requirements are needed to use the NDK. Then, the Java Native Interface, or JNI, was
covered and used to demonstrate how Java functions can call native functions written in C and
how native functions written in C can be used to call Java functions. A simple “Hello World from JNI
and Native Code” hands-on example was then introduced, and you were taken through a
step-by-step implementation of native code into an existing Java program. Finally, another
hands-on example was presented that demonstrated how to integrate native code into our existing
Drone Grid game case study.
 
Search WWH ::




Custom Search