I want to build games in C on iphone (I know C# and Java right now, but i can learn C).
I know Android can run on Native Dalvik, can I easily transfer a game from iphone to Android for example..and to JTME.
I have books on android that explain about game development, b开发者_JS百科ut none of them actually talk about developing a game in C (or native dalvik)..
So the question is how easy it is to transfer a game written in C across platforms?
You can use Marmalade SDK take a look here Marmalade SDK
As far as I know, you can use C/C++ on both iPhone and Android for a game's "game" part, however the device related parts should be done with different code, might in Objective C on iPhone or Java on android.
You should try some open source game engine that supports both the platforms, you may check this SO question.
Hope that could be helpful
If you going to written games in basic 'C' language you can use it in android using NDK, for reference check here,
http://developer.android.com/sdk/ndk/overview.html
http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/
but i don`t know whether same code can be used for iphone.
The best approach, in my opinion, us to use C AND openGL code for the bulk of your work. C and opengl work on iphones, androids, and of course, macs and windows.
You will need some wrapper code for each platform. So objective-c for iphone, windows code for MS, and the android native toolkit wrapper code.
Once your app is started, all the "real" game coding in c and openGL will work on all the platforms
精彩评论