The basic interface for the Cricket engine is C++, as is most of the implementation. Objective-C is the primary development language on iOS, and Java is the preferred language on Android, but both platforms support C++ also; C++ code can be compiled alongside Objective-C for iOS, and as of Android 1.5 (“Cupcake”), native C++ code can be used on Android as well using the Native Development Kit (NDK). A C++ interface will let game developers integrate the Cricket engine into cross-platform C++ engines.
What if you’re developing for only one platform, and don’t need to use C++? On Android, there is a Java interface which calls into the native code using JNI. On iOS, while it’s relatively easy to call C++ code from within Objective-C, there will eventually be Objective-C wrappers as well.
On iOS, C++ development has been relatively easy. Most of the APIs I need are C interfaces, such as the Core Audio Audio Unit API. When I need to drop a few lines of Objective-C into my C++ code, all I need to do is rename the file so it has a .mm extension, or set the file type in XCode to “sourcecode.cpp.objcpp”.
On Android, things are a lot more complicated. The standard IDE for Android development is Eclipse, but the Android plugins do not support native development, so everything must be done with command-line tools. The native code is built with makefiles, and debugging is done with the command-line GDB interface. Only a subset of the Android SDK is accessible through the NDK, so to access the rest you need to call the Java SDK via JNI.
I’ve always been a bit of a command-line geek anyway, so this hasn’t been as much of a frustration for me as it might be for some, but I have become used to debugging in an IDE, and it’s taken some time to getting used to GDB again, which I haven’t touched in about 15 years or so. (I am aware of the Eclipse plugin project called Sequoyah, which supposedly supports compilation and debugging of native code, but haven’t yet figured out how to use it; if anyone has any links to useful documentation on how to use it to build native code for Android, I’d love to hear about them!)

About
