[PIGMI] BlueGin - Android C++ game engine
Dan Venkitachalam
dan at expandingbrain.com
Thu Jan 27 14:33:37 PST 2011
On Thu, Jan 27, 2011 at 6:09 AM, Saxon <saxon at saxon.cx> wrote:
> I've done a tiny amount of Android dev (in Java), so I'm curious about
> the choice of C++. Does it perform significantly better, or is it easier to
> integrate existing C++ libraries, or do you like C++ more, or something
> else?
>
>
The NDK page [1] has an overview of where to expect speed gains but it's
really app dependent. Games stand to benefit from C++ more than your
average app because they have compute heavy workloads.
In my own projects GPU speed has been the real performance bottleneck, so
Java's probably a viable option. But unless you're doing something
pathological you're unlikely to beat C++ for speed.
Personally, I have a love/hate relationship with C++. Mostly hate, so I'm
not using it out of any fondness for the language. The main benefit is
portability - being able to reuse a codebase across platforms. C++
interfaces with Objective C and Java equally well and has strong vendor
support, which is important to me.
Integrating C++ libraries has its ups and downs. It's less work than
porting to Java but the C++ support is sketchy in places, meaning you have
to hack around a lot of restrictions. For example, exceptions and the STL
were only introduced in the latest NDK. But they can't be used together
yet, so you have to either choose libraries that don't use them or patch
heavily. At least the situation's slowly improving.
[1] http://developer.android.com/sdk/ndk/overview.html
Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pigmi.org/pipermail/pigmi-pigmi.org/attachments/20110127/7a457f64/attachment-0002.htm>
More information about the pigmi-pigmi.org
mailing list