Quick- Cocos2D-X primer

 

At last it was time for toad to come and take a look at Quick-Cocos2D-X.

Software to prepare

cn.cocos2d-x.org/download/

Download the Quick – cocos2d – x

 

1. Compile Player for Windows

Into the.. Quick – 3.3 / quick/player/proj. The win32 directory

Open player. SLN and click “Local Windows Debugger”

Finally, you can view examples throughout the project, etc.

 

 

2. Create projects

Player.exe is running in step 2, as you can see

As shown in Figure 1 below:

\

Just create a new project to create a project, as shown in Figure 2.

 

Click Open… button

Figure 3 below appears

 

     

3. Code IDE scheduling Quick project

        

3.1 Import Quick project into Code IDE

After starting the Code IDE, choose File -> Import -> Cocos -> Import Cocos Project and select the directory where the Quick Project is located.

3.2 Setting Debugging Parameters

In the Lua Projects Explorer interface of the Code IDE, select the project you want to debug. Then select the menu Run -> Debug Configurations to open the Settings screen.

1. Create a configuration item under the CocosLuabinding group on the left of the configuration page

2. Select Target Platform as Remote Debug and set Platform to Mac or Windows

3. Set Host IP and Target IP to 127.0.0.1

You need to start the EXE file in the Runtime directory.

4. Click “Apply” button to save Settings.

\

 

· In Code IDE, set the Lua Code breakpoint

A breakpoint can be added by double-clicking

· Click the Debug button in the Code IDE toolbar to start debugging

3.3 coordinate with Xcode and Code IDE for C++ and Lua

If you want to debug C++ and Lua code, you must open the Mac project of player to debug:

Open the quick with Xcode/player/proj. MAC/player3 xcodeproj project

· Choose Product -> Scheme -> Player3

· Choose Product -> Scheme -> Edit Scheme to open the Scheme dialog box

· Select Run from the left side of the dialog box and Arguments from the right, then click the + button under Arguments Passed On Launch and enter the following debugging parameters:

123 - Debugger -codeide -workdir "project absolute path" -size 960x640

· If portrait is used, change the -size parameter to 640×960 or the desired value.

\

· Run the Player project with Xcode after setting up

· After player starts, switch to Code IDE to set breakpoints and then enable Debug Remote

· During debugging, if you encounter breakpoints set in Lua Code, switch to the Code IDE to see the breakpoints

· if you encounter a C++ breakpoint, switch to Xcode to see the breakpoint