[Cocos2d-x 3.0] Game Development win32 configuration environment construction project, cocos2d-xwin32

Source: Internet
Author: User

[Cocos2d-x 3.0] Game Development win32 configuration environment construction project, cocos2d-xwin32

Author:Senlern

Reprinted please note, original link: http://blog.csdn.net/zhang429350061/article/details/37958275

I haven't written a tutorial for a long time. Now I feel that I still need to stick to it. I want to write some of my previous accumulation and talk with you about it. I am also a newbie, I hope you can correct them and learn together!


---------------------------------------- First let's take a look at the environment requirements -----------------------------------------

Build Requirements
------------------

* Mac OS X 10.7 +, Xcode 4.6 +
* Or Ubuntu 12.10 +, CMake 2.6 +
* Or Windows 7 +, VS 2012 +
* Python 2.7.5


Runtime Requirements
--------------------
* IOS 5.0 + for iPhone/iPadgames
* Android 2.3 + for Android games
* Windows Phone 8 + for Windows Phonegames
* OS X v10.6 + for Mac games
* Windows 7 + for Win games

The README. md file in the Engine Directory contains the preceding description. You can check whether your configuration is correct.


------------------------------------- Download the Python configuration environment variable ------------------------------------------------

I downloaded the python-2.7.5.amd64.msi, URL: https://www.python.org/then all the way to nextinstallation.

After the installation is complete, we need to configure the environment variable. I directly installed it on drive C by default, so I added my python installation path to the system environment variable path.



----------------------------- Create a new project --------------------------------------

Windows key + R call up the Run window, then enter the cmd command, cd to your cocos2d-x root directory, and then run setup. py


Through the output, we can see that the script automatically adds some environment variables to us. This is designed to facilitate the creation of new projects, which will be discussed later. Another point is that it will detect our android environment configuration. Here I will skip "Enter" first, and then I will explain in detail how to configure the android environment to compile the project. Note that you need to restart the computer after completion, otherwise the cocos new command cannot be used.


------------------------------- Create a project ----------------------------

Or run cmd to open the command window, and then enter cocos new and press enter, as shown below:


Here we can see some parameter requirements of the cocos new command. so let's create a project as follows:


It will copy the cocos2d-x-related stuff for us to the directory we created, to describe, the-p Parameter refers to the name of the android package, the-d parameter is the directory where you create the xin project.


----------------------------------------- Open the project compilation and run ---------------------------------

Double-click E: \ MyGame \ proj. win32 \ MyGame. sln according to my directory.

Right-click the solution and choose generate solution! The project began to be compiled. As my computer was getting older, it was a long process for me.

Wait until the compilation is complete to see if there are any errors. If there are no errors, it should look like this:


Okay, let's run it, or press the F5 shortcut. Isn't it because our game is so exciting to see this familiar picture ....


---------------------------------------- Remarks ------------------------------------

Limited capabilities. Please contact us. If you have any suggestions, thank you! (Let's talk about it)


Vs2010 build cocos2d-x Development Environment

Hi, I used VS2012 + cocos2d-x and didn't hit you.
Installing cocos2d-x on xcode doesn't matter to you either.
Let me give you a reference.
V.youku.com/v_show/id_xndy4ndcyotq1_html

This brainless cocos2d tutorial is still good. I just read it.
Hope to help you!

Problems with building a cocos2d-x Environment

You don't need to worry about it. Follow the tutorial below to build two methods.
Blog.csdn.net/..408007

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.