Cocos2d-x framework development environment construction

cocos2d-x is an open source game development framework, how can we use it on our own computer?

(1) The first step:
download the cocos2d-x framework resource compression package from the cocos official website. I downloaded the 3.17 version, because for beginners, I can’t draw inferences by analogy, and many tutorials on the new version are not suitable, so download the old version to facilitate learning. Official website entrance: http://www.cocos.com/

Insert picture description here

(2) The second step:
install python2.7 version. Note that it must be version 2.7, and the new version of python is not supported.
Python2.7 directly download the entry point here .

(3) Step 3:
Run the configuration tool provided by cocos2d-x. Win + R Open the cmd command line window of the computer.
Open the path where you unzipped the resource package and run setup.py under the cocos2d-x-3.17.2 folder. As shown in the figure below, my files are unzipped on the D drive.

Insert picture description here

Enter.
Follow the prompt and press Enter to continue. Until the following interface appears, the environment configuration is complete.

Insert picture description here

(4) Check the environment
. The cmd window is still open. Enter cocos. Enter.
The following interface appears, the environment configuration is complete, and we can start developing games using the cocos2d-x framework on our computer.
Insert picture description here

(5) Use Cocos2dx to create a new game project The
environment is installed, now we use the tools provided by Cocos2dx to create a new game project.
The operation is very simple, open the cmd window.
Enter the following commands (only test examples, readers can set variable parameters by themselves)

cocos new projectName -p packName -l cpp -d F:\Cocos2dxProjects

The format is as follows:

cocos new "your project name" -p "your project package name" -l "development language" -d "folder address for storing generated project files"


See the above interface, indicating that the project was created successfully, find the generated project file in the specified folder, open the proj.win32, and use VS to open the VS project file ending with sln.

Guess you like

Origin blog.csdn.net/weixin_45711556/article/details/108336484