Forums » C++ Framework » Porting ios game to android »
| James Dailey | Porting ios game to android | ||||
|---|---|---|---|---|---|
|
Added by James Dailey almost 2 years ago
Hi, I'm looking to to port my ios cocos2d-iphone game Online Sniper League to Android and I'm considering using cocos2d-x. I learned objective-c on the fly over the past couple years. I'm not a big C or C++ guy but I can pick up different languages fairly well. I have some questions though. My app is based on cocos2d-iphone 0.99.5. Does cocos2d-x support most/everything in there for android too? Is the performance comparable? I would only be supporting devices with 3GS or higher type of processors going forward on both platforms. How much effort is it to port objective-c to c++? My game is basically many layers, many subclasses sprites, and many timers. It has simple animations and some particles. Is this platform mature enough right now for me to jump in or will there be growing pains? Thanks for your help. |
||||
| Zhe Wang | RE: Porting ios game to android | ||||
|
Added by Zhe Wang almost 2 years ago
About 98% features are ported. I cannot say 100% because the thread related APIs haven't been wrapped, async operations are not supported yet, but you can do it by yourself. Please run and check the cocos2d-x/tests, it inclues all features. Here's the published game list in http://www.cocos2d-x.org/projects/cocos2d-x/apps, including many games from big companies. Porting objc to c++ is an easy work, the average speed is about 500~800 lines per man-day, while the guys from "Ah Up" said they ported 3000 lines in just 2 day. The pain is from android ndk debugging. I suggest you to use win32 port first, debug in VisualStudio, and build to android at the last. It will make porting job easier. Enjoy Coding, Enjoy Life. |
||||
| James Dailey | RE: Porting ios game to android | ||||
|
Added by James Dailey almost 2 years ago
Thank you for the information - very helpful. I'm not really using my own threads - everything is handled by the engine. So, compatibility sounds great - nice work! My app is over 21k lines of code though. I wonder if any developers on here would take on the task or help me. I can pay. |
||||
| RosePear Studio Inc | RE: Porting ios game to android | ||||
|
Added by RosePear Studio Inc almost 2 years ago
I managed to port my game, Smart Target (Rock Sliders Lite), to an Android testable working version with only 2 days worth of debugging (didn't have to rewrite any actual code), but all my code is already in C++. I made it work for Win32 first, then used all the C++ code in the iOS project and it worked fine. Then finally, I tried testing the C++ code on the Android project and after some debugging to isolate a silly programming error (don't put floats in place of a GLUByte when doing a setOpacity(GLUBtye somevalue)). The code compiled and worked fine on the Android project without any re-writing of actual code (C++ that is). Haven't submitted the game yet though, but planning to once I finish working on the iPad version. Things I came across that may help: - I agree with Walzer's suggestion to port to win32 first, debug and run in Visual Studio, and then test on the Android device... cuz compiling and running on Android eclipse takes at least 20-30 seconds per compile and run... whereas Visual Studio can compile and run (same small project) within 10 seconds. Same goes for iOS. Hope that helps =] |
||||
| Zhe Wang | RE: Porting ios game to android | ||||
|
Added by Zhe Wang almost 2 years ago
Thanks for RosePear's detailed explanation. Enjoy Coding, Enjoy Life. |
||||
| RosePear Studio Inc | RE: Porting ios game to android | ||||
|
Added by RosePear Studio Inc almost 2 years ago
Hi Walzer, Issue: Notes: Hope that helps =] Let me know if you figure out what's wrong or if you have more questions. Thanks! MissingInfoSummary.jpg (65.6 kB) |
||||
| Isaac Ashdown | RE: Porting ios game to android | ||||
|
Added by Isaac Ashdown almost 2 years ago
Hi James, I'd be interested in helping with your iphone->cocox2d-x port. I recently finished such a port, of the iPhone game Chirp Chirp: https://market.android.com/details?id=com.eyessoft.chirpchirp This was a game originally written in objective C and using cocos2d-iphone, and was release by some friends of mine about a year ago. It's a fairly simple game, about 8000 lines of code, and took about 2 weeks for the initial port, and then another 2 weeks of bug fixing (part time). I've also been working in the Computer Games industry for 3 years, first at Pivotal Games (part of Eidos/SCi) and more recently at an indy studio called Zeroscale, working on Playstation and PC games. Both have unfortunately closed down now, hence my branching out onto Android. Let me know if you're interested - please contact me at [email protected] . |
||||
| Zhe Wang | RE: Porting ios game to android | ||||
|
Added by Zhe Wang almost 2 years ago
@RosePear Studio Thanks, bug #604 is created, it will be fix in the next version Enjoy Coding, Enjoy Life. |
||||
| James Dailey | RE: Porting ios game to android | ||||
|
Added by James Dailey almost 2 years ago
You guys are great! This is a very helpful forum - much like the iphone counterpart. I sent an email to Isaac. I assume googlemail is gmail. |
||||
| Isaac Ashdown | RE: Porting ios game to android | ||||
|
Added by Isaac Ashdown almost 2 years ago
@Walzer - thanks for the support! |
||||
| Zhe Wang | RE: Porting ios game to android | ||||
|
Added by Zhe Wang almost 2 years ago
@RosePear Studio, #604 is fixed today.
For 0.8.5 version, you can simply fix the bug by these steps:
This bug waste me 4 hours to compre different project.pbxproj files, re-create Tests project in both xcode3 & xcode4 many times. And at last I fortunately click the SDK settings and find all things well. Thanks God! Enjoy Coding, Enjoy Life. |
(1-10/10)
