Build Cocos2d-x3.1.1 development environment on Win7-Python tutorial

Source: Internet
Author: User
Now, more and more companies use Cocos2d-x3.0 to develop the game, but now this article is not much, so intend to write a series to help beginners quickly grasp the Cocos2d-x3.0. First of all, let's talk about the preparation of development tools from the development environment.
The installation tools required to build the development environment include

Visual Studio
Python --- (this tutorial uses python2.7.3 as an example): http://www.python.org/download/releases/2.7.3 /.
Cocos2d-x --- (this tutorial takes the cocos2d-x-3.0 version as an example),: http://www.cocos2d-x.org/download/version#Cocos2d-x.
Installation and configuration process
The installation process of Visual Studio is not introduced here, the following describes the installation and configuration process of python2.7.3 and cocos2d-x-3.1.1.

Install and configure python2.7.3
1. download and install python2.7.3.

2. configure the environment
Right-click "computer", select "properties" ---- "Advanced System Settings", and select "environment variables" under the "Advanced" tab "!

Select "Path" under "system variables" and click the Edit button below:

In the displayed "edit system variables" dialog box, edit "variable values" and add the Python installation path (D: \ Program Files (x86) after "variable values) \ Python27), separated by a semicolon.

Similarly, Add. PY;. PYM to the variable value of "PATHEXT.

3. check whether the installation is successful
Open the cmd console and enter python. if the following prompt is displayed, the python installation is successful.

Download cocos2d-x-3. 1.1 Engine
Download the cocos2d-x-3.1.1 file and unzip it, open the build directory, and double-click the run cocos2d-win32.vc2012.sln solution.

Set the project you want to run as a startup item and click Run.

You will get the following interface. Congratulations! You have successfully built the development environment for Cocos2d-x on Windows.

Create a project
Go to the ** cocos2d-x-3.1.1/tools/cocos2d-console/bin/cocos. py ** directory in the command line window **

Then run the following script

Cocos. py new HelloTestCpp-p com.coco2dx.org-l cpp-d F: \ projects
Parameter description:

HelloTestCpp is the project name
-P: Next package name
-L (here the letter l) is followed by the development language types, including cpp, lua, and js.
-D directory to which the project is stored

View the project path and you will find the new "HelloTestCpp" project in the directory. In turn, open the "HelloCpp/proj. win32" folder, "HelloCpp. sln" solution, and click run project. If the following interface appears, the project is successfully created.

Now, you have set up the development environment, and you can use the above method to create the project you need.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.