[Game development Log] Cocos2d-x 3.14 Environment Building under windows

Source: Internet
Author: User

General Introduction

Our team uses Cocos2d-x's game development engine, so we need to build the environment for the engine before all the development work.

Building process

Download and installation of VS2013

vs just as a development environment, simply to knock the code, all Chinese, it is very simple, I do not introduce

Figure 1:

You can go to the latest version of Cocos2d-x on the Cocos2d-x website and use vs to open the corresponding project file after download

We download version 3.14.1, after the download is complete, we open the ZIP package

Figure 2:

In addition, we need to install Python because Python is required to compile the engine. I went directly to the Python website for download.

Based on our experience of JDK installation in Java Learning, the current version of Python has been updated to version 3.5, so I downloaded the latest version directly.

Figure 3:

Figure 4:

Shows that the Python installation was successful.

However, at this point we open cocos2d-x, compile, found that there is no way to compile successfully. and an error message appears:

Prompt Error Error 1 MSB3073: command "if not exist

After Baidu, I found it was the Python language problem.

In the tutorial on the web, the Python version we need (tested, usable) is python2.7, and I just downloaded the python3.5. The difference between the two is that the version above python3.0 is not backwards compatible. So it caused the error.

Figure 5:

Figure 5:

After reinstalling the correct version, we compile again.

Run the setup.py file under the engine root directory to install

Figure 6:

After the restart, the environment has been initially set up, followed by further: building the project.

Build a project

setup.py in the Cocos2d-x 3.14 directory can be installed cocos to the system according to environment variables

Execute the New Project command (Windows and iOS same method):

CMD into the \cocos2d-x-3.14\tools\cocos2d-console\bin directory

Then enter the command: Python cocos.py new [project name]-p [package name]-l [using language]-D project Path

For example: Python cocos.py new helloworld-p com.dnyy.helloworld-l cpp-d D:\test\helloworld

Here the CPP can be JS also can be lua~ you can according to their own study to choose ~

We named our group project "Dcgame" and entered the following command:

Python cocos.py new dcgame-p com.dnyy.dcgame-l cpp-d d:\game\DCgame

Finalize all environment configurations:

Figure 8:

Feelings

Setting up the environment is generally not very difficult, mainly to do

1, install the appropriate version

2, ensure that the path name is in English (otherwise there will be coding problems)

3. Be patient with the construction of the environment

[Game development Log] Cocos2d-x 3.14 Environment Building under windows

Related Article

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.