Recently due to the cause of the work, have the opportunity to contact the game industry, to tell the truth, I study the original intention of the program is to do the game, so created a cocos2d-x classification to record My Learning cocos2d-x growth process.
First of all, want to learn COCOS2DX the first step is to build the environment, the first step can not build the environment, the creation of the project that all is nonsense.
When it comes to installing Cocos2d-x on Mac, the idea is Xcode+cocos2d-x. Because I am an iOS programmer, I can only use the Xcode software to write a later cocos2d-x program.
1, self-download installation (COCOS2DX official website) package to Mac desktop, if even this installation package to find steps, then please bypass it .
2. Create HelloWorld Project
Search for " terminal " in a.spotlight
B. Open terminal step by step and enter the following command
First Introduction:CD \ filename (can go to the current folder)
ls can view all files of the current path
Do not explain, follow the picture step-by-step to protect you to create a successful (hundred Test Lark):
3. a "HelloWorld" folder will appear on your desktop at this time .
4.
Command parameter Description:
CD-and go to Folder
Cocos ---cocos2d-x command line toolset
New--Create a project
HelloWorld-- project name
-P--- package name
---- development language type CPP/LUA/JS
-D-- Save the project location
Desktop-- desktops
Summary: Use the Cocos command to create a line project with the project name "HelloWorld", the package named com.dj.org,
development language is CPP, Project save location is desktop
To run the project:
A. in the HelloWorld project, locate the Proj.ios_macand open the HelloWorld ( or call helloworld.xcodeproj)
B.xcode Open Project, shortcut key command+r run HelloWorld project
COCOS2DX 3.0 or above build a Mac environment (hundred percent possible)