Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi all,
I know ObjC is the most suitable for iOS and Java for Android, for desktops there are more choice; and OpenGL / OpenGL ES is available on most of these platforms. Now how could I make a cross platform 2D game runs on iOS, Android and desktop (Windows PC might)? Suggestions and tips are appreciated.
Posted

You could write your game in standard C++ and use OpenGL ES for graphics. This way, your game will be (easily) portable to iOS, Android, Windows, Linux and Mac. The iOS version would have an Objective-C wrapper to communicate with the iOS platform. The Android version would use the Android NDK[^]. There are many resources for C++ development on all these platforms, you just need to Google it. Best of luck! :)
 
Share this answer
 
Comments
paladin_t 20-Feb-11 23:04pm    
Thank you!
BTW, does Android NDK support C++ standards consummately? May I use exception, template, STL as my desires on it?
Francis Xavier Pulikotil 21-Feb-11 1:52am    
See this for more info on C++ support with the Android NDK:
http://docs.huihoo.com/android/ndk/r5/CPLUSPLUS-SUPPORT.html

I've not gone into the details, but from a quick glance, it seems like you should be able to use exceptions, STL and RTTI in your Android project.
This question is far too wide for this forum. Try doing some research into the subjects you are interested in and come back here when you have a more specific problem.
 
Share this answer
 
Comments
paladin_t 20-Feb-11 4:12am    
Thank you for reply! I'll keep on researching on it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900