cocos2d-x-2.2.3 and VS2012 Environment Configuration _ Games

Source: Internet
Author: User
Tags goto win32 python script
Cocos2d-x is really a good thing, always wanted to learn, the total feel that C + + can not get it, really regret only recently began. A platform to compile, multi-platform operation, is in the temptation of people, if learning good, you do not have to envy others gorgeous game. Since it is a novice, must start from the most basic environment,
Although there are many tutorials on the network, but most of them are based on the old version, many configurations are not the same, for the novice is really painful, more than a query, bits and pieces of the first study notes, record it
This article is based on cocos2d-x-2.2.3 and vs2012 environments, followed by an environmental configuration on the most troublesome Android side. Start building
1. The website Downloads cocos2d-x-2.2.3 (http://cocostudio.download.appget.cn/Cocos2D-X/2.2.3/cocos2d-x-2.2.3.zip) and extracts the custom directory by itself.
2. Look for and download the VS2012 image and key (many resources) on the Internet, use the virtual CD-ROM to install.

3. In the cocos2d-x-2.2.3 root directory, find Cocos2d-win32.vc2012.sln, double-click will automatically open VS2012




4. In the solution ' cocos2d-win32.vc2012 ' right-> generation solution, wait vs automatically generated, may take some time, depending on machine performance



5. After the completion of the build, select the "Hellocpp" right key-> set as the startup project

6. Start debugging, if all goes well, will see Hellocpp program running Up





Now that the cocos2d-x-2.2.3 and vs2012 environments are configured, how do you create a new project? The previous tutorials were all about installing the cocos2d-x template under VS, but the file they mentioned was not found
Later the query said that the new version canceled template creation, but instead use Python script to create simpler, so need to download Python and configure it as follows:
1. Download and install Python, my version is 2.7.5, not too high, it is said not to use.
2. Configure the environment variable to add the root directory of the installation of Python to the path of the system environment variable (do not repeat, configure yourself)
3. After the configuration, open the cmd command line, enter Python in the interface, if the following prompts will be configured successfully




4. You can then use Python to create a new project, locate the command line in the Cocos2d-x-2.2.3\tools\project-creator file directory, and create a new project in two ways:
① Direct use command: Python create_project.py-project helloworld-package com.eyu.helloword-language cpp
Where HelloWorld is the project name, Com.eyu.helloword is the package name
② yourself to create a batch file, more convenient and quick, you use Notepad to create a Xxx.bat file, the content is as follows:

[HTML] View plain copy <span style= "FONT-SIZE:18PX;" > @echo off set/p projectname= Please enter the project name: if "%projectname%" = "" goto inputerror set/p packagename= Please enter the package name: if "%   Packagename% "=" "goto inputerror create_project.py-project%projectname%-package%packagename%-language cpp Pause   Exit:inputerror @echo Project name or package label name cannot be empty. Pause</span>
Then put the file in the Cocos2d-x-2.2.3\tools\project-creator directory and run it directly on the command line.


The above two methods have the same effect



Finally, we created the project in the Cocos2d-x-2.2.3\projects directory, open just created the HelloWorld, you can see the various platforms of the project



The most basic environment construction and engineering creation step here, and then record the Cocos2d-x and the Android environment to build the configuration


Reprinted web site for http://blog.csdn.net/eyu8874521/article/details/22376589

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.