2

I want to develop an cocos2d-x game for android & iphone. I don't know from were to start my development. I know there is an template available for iphone, but after creating it on iphone how build it for android platform?

And what if i want to develop game form the eclipse itself rather then developing on iPhone and then migrating to android

I had already tried various tutorials of ray wenderlich, tutorial on cocos2d-x.org, http://paralaxer.com/cocos2d-x-project-setup/, http://www.multigesture.net/articles/how-to-setup-cocos2d-x-windows-and-android/, http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html, http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/

From all of the above tutorials i am not able to get any proper solution.

Also tell me should i have to develop(code) on iPhone and then build for android?

Thank You in advance

Jay Gajjar
  • 2,661
  • 2
  • 21
  • 35

4 Answers4

5

simple :

-> Framework : cocos2d-X -> Editor : Xcode -> Language : C++

once you complete your Game for iphone then You can port your this game to any platform like Android or Windows. you already have all useful links . still follow this :

Setting_up_Android_Development_Environment_on_Mac_OSX :

http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Setting_up_Android_Development_Environment_on_Mac_OSX

How to port your project to win32,iPhone and Android

http://www.cocos2d-x.org/boards/6/topics/3001

Integrate Cocos2d-x (C++) into an Android application (Java)

http://jpsarda.tumblr.com/post/26000816688/integrate-cocos2d-x-c-into-an-android-application

-> You just have to convert this native code using some JNI or say NDK . -> using Cocos2d-x u can Develop games on Windows, Mac OS and Linux .

Community
  • 1
  • 1
shaqir saiyed
  • 732
  • 1
  • 10
  • 36
0

Personally if you are deploying to multiple platforms your best bet is to use a gaming engine. Currently Unity3D, UDK, and newly released Havok's Anarchy Engine supports deployment to these platforms and more. This way you can develop once and deploy to multiple locations. Cost is free for Havok, UDK if you are a small company, and I believe Unity3D now has free licensing to iOS and Android for their non-Pro versions.

I think going this route is far more promising than using cocos2d

apollosoftware.org
  • 12,161
  • 4
  • 48
  • 69
0

The method I use is to use the templates for both iOS and Android that create projects for Xcode and Eclipse respectively. When you have this, you remove the Classes and Resources folders in for example the Eclipse project and replace those folders with links to the Xcode folders Classes and Resources.

What you now have is two projects, one for iOS and one for Android, that both use the same C++ code and resources. You can now choose which of Xcode and Eclipse that you prefer to use when developing and just switch to the other to compile for that platform and do testing and releasing there.

Hope that helps. :)

Sebastian Ärleryd
  • 1,774
  • 14
  • 19
0

Look in cocos2d-x folder under /tools/project-creator/create-project.py , you should run that and it will create project for many platforms already set-up and from there you can just code in XCode, and platforms will share same source code.

b00yan
  • 1
  • 1