Windows Development Cocos2d-x Series (1)-Environment construction

Source: Internet
Author: User

Objective

I believe every program ape is fond of playing games, what kof,dota,lol accompany us through how much happy time, I am no exception. Colleagues sent a "Cocos2d-x 3.x game development Travel", aroused my interest in the game development, also want to write down their own learning process, to motivate themselves to adhere to, and share the results. (This dick is currently engaged in the development of financial software, want to learn game development is also out of their own interest.) In this also advocates that we usually make some investment and financial management, wish to buy a car early, marry mating) well, to the point, we began to cocos2d-x study it.

Development tools

Cocos2d-x can be learned on the Windows platform or on Mac platforms, and we use the Windows platform. Since it is on the Windows platform, the development tools are not Visual Studio. We recommend that you use the vs2012 or above version.

Download cocos2d

With the development tools, we can go to the official website to download cocos2d-x. Now the latest version of the official web is 3.6, we are still consistent with the book, download version 3.0. : Http://yunpan.cn/Qhvx7piQ5pfwP, access password is 2500.

There's still work to be done.

We also need to download the following tools, which will be used later:

      1. Android SDK:HTTP://YUNPAN.CN/QHY24Y89PAQJZ, access password is 7020
      2. Android Ndk:http://yunpan.cn/qhyeb3swvv7f7, access password is 50DD
      3. ANT:HTTP://YUNPAN.CN/QIJDMX3VGQXLM, access password is C8F5
Semi-automatic configuration environment variables

Next we need to install the Python environment: https://www.python.org/download/releases/2.7.6. After the installation is finished, we unzip the cocos2d just downloaded (here to prompt, unzip the path of not exist in Chinese, otherwise open the project will error when compiling, here pit me for a long time), execute folder named "setup.py" file. This is a Python script, it is used to configure the environment variables, we are based on its prompt to enter the Android SDK, Android NDK, Ant Path, now do these things, after the transplant game to Android can be easier, the diagram convenient, You can now also press ENTER to skip.

Run the official demo

After doing this, we can open the official demo to learn. Open the Cocos2d-x-3.0\build\cocos2d-win32.vc2012.sln file, set the project "Cpp-tests" as the startup item and run! About 10 minutes to compile ...

Summary

Here, the environment is finished, we can happily start to write code, but there seems to be nothing. OK, we have already opened a good head, follow us to start the classic HelloWorld.

Windows Development Cocos2d-x Series (1)-Environment construction

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.