PLEASE Update Setup Documentation


#1

I humbly request Ricardo Quesada and the rest of the Cocos2D-X team if they could improve and update documentation on how to setup Cocos2D-X on Mac, Windows & Linux. The documentation section is a complete mess. Example: There are 9 links under Windows 7 Environment setup. They are all incomplete, outdated, mixed with depreciated steps, and the list goes on.

My recommendation: update the setup documentation with every release cycle, it doesn’t help anyone to click on links with “TBD” or documentation that are outdated.

I’ve spent two days straight days trying to follow the steps in the setup guide(s), cocos2d-x forum, stackoverflow, etc trying to make sense and setup a project. I wish the setup was as easy as Cocos2D (Objective-C version).

Whoever is in charge of managing documentation, please go through the documentation and update it so developers like me and others can spend more time what we like to do, that is make great games and not waste time configuring and crossing fingers that the setup builds without failing, giving another set of errors to go chase after.

I am super excited about the Cocos2D-X project and I really want to use it for my projects and contribute back to the community but if it means spending days just to figure out how to set it up, then I think I’d rather look at another cross platform engine like Unity3D or something else instead.


#2

I think most of that documentation should be removed and replaced with …

  1. Download Cocos2d-x 2.2
  2. Open the Solution in Win32
  3. Drag Cocos2dx into XCode project
  4. Run ndk-build.cmd for Android

I’m really new to Cocos2d-x and found that the best way to get it working, at least for 2.x, is to ignore the documentation :wink:

I’m surprised you found the Cocos2d iPhone setup easy. That thing had me pulling my hair out for days!


#3

Thanks Cory for chiming with me. The Cocos2D setup is very easy. All I had to do was run a script to install the Cocos2D project templates. Once the templates were installed, all I had to do was create a project in Xcode, just like any other apple provided project template and I was good to go.

There was no environment variables, weird or goofy linking whatsoever. Life was simple and I could focus on development. Cocos2D-X would not be that difficult if the developers wrote complete and clear instructions. It seems like half the information is in their head and they just making assumptions without even realising it. I understand they are under pressure from the zynga team to add features but there should be some project mgrs on their team that should be working actively to keep documentation updated. It would definitely reduce the forum posts with folks like myself struggling with setting up the dev environment because of bad user documentation.


#4

I’m sorry, but I think It couldn’t be any simpler than this link
[[http://www.cocos2d-x.org/wiki/How_to_create_a_multi-platform_project_in_one_command_line]]
It describes ‘Hello World’ in any platform. You don’t have to do any linking too…


#5

Hi Jonathan,
I have followed the steps the URL you provided already, but it is not working as the steps are listed.

  • Do you know the path NDK toolchain should point to and also how to select the Android target
  • Do you know how to fix the Win32 Release build for cocos2dx v3. It is broken, I’ve looked in the forum but no real solution posted by anyone.

I still would like to see the documentation cleaned up with clear and complete steps to setup a project with version number the steps are for.


#6

I choose the NDK toolchain set to 4.7 (highest in my ndk r8e toolchain version)
as for how to select Android target, i choose what number of target in android list targets….
I’ve never tried 3.0, as it still pre alpha version. win32 release working with 2.1.4 in my experience……

yeah maybe you’re right about should cleaned up a bit.


#7

Thanks Jonathan, I thought NDK Toolchain environment variable had to be a path to a file/folder location on the hard drive, rather then just a decimal number. Although, I did have to improvise since the multi-platform project instructions were for Cocos2D-X v3 and there were some steps missing like adding a link source to resolve the ‘Cocos2dxActivity.java’ linking issue that fails to build the project in Android.

Another question I have is how to properly link the ‘Classes’ folder. I am getting an error that I cannot add files to the Classes folder. My assumption is that it is not properly linked when project was created when using the python script…


#8

okay, here’s the steps that’s actually missing….

  1. You have figured it out how to link source cocos2d-x source. It also occurs in every other version. I solved it by looking at Ezisocial tutorial.
  2. I deleted my class folder in eclipse. Then right-click project’s properties~~>c++ General~~>Path and Symbol~~>Source locations~~>Link Folder~~>Check ‘link to folder system’~~>then link to Classes folder in your project
  3. Open ‘Android.mk’ Add any cpp files that you include in your Classes folder in LOCAL_SRC_FILES

#9

Seriously. So many links in the documentation are intermixed with instructions for different releases of the core package and dependencies.

I think I might just release a blog post about setup for Android on Eclipse on Windows myself when I know it’s the sure thing.
Right now, the HelloCpp and TestCpp etc are compiling and running, but in my own project I created from create_projects.py (cocos2d-x v2.2.1) is running me into errors when I extend my classes with CCLayerColor or some other class.

I think if every developer writes a sold blog post about their setup for their specific environment, the cocos2d-x team would be supported greatly.


#10

Here is my blog post;