0

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, but 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?

Matrix001
  • 1,272
  • 6
  • 30
  • 51

4 Answers4

1

You can use Marmalade SDK take a look here Marmalade SDK

Andrey
  • 85
  • 4
0

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.

Karthi
  • 13,624
  • 10
  • 53
  • 76
0

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

Community
  • 1
  • 1
Zhao Xiang
  • 1,625
  • 2
  • 23
  • 40
  • so the answer might be using unity. What about using flash and actionscript and embedding it in any platform I want? – Matrix001 Sep 20 '11 at 05:15
  • Unity uses C#, as far as I know. And Flash might have a efficient issue on mobile devices. – Zhao Xiang Sep 20 '11 at 08:17
  • My current project uses [Unreal Engine](http://www.unrealengine.com/), it works on PC, iPhone, Android, as well as many other platforms, however It might be too complicated for a new comer to C/C++. – Zhao Xiang Sep 20 '11 at 08:23
-1

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