Quick-cocos2d-x Study Notes [1] -- engine framework overview and creation projects

Source: Internet
Author: User

Well, I still can't help but want to write some study notes about quick. There are too few tutorials on it on the Internet, so I simply share what I learned, if something is wrong, please make an axe in the class.


First download the engine package. After the touch acquisition of quick, you can now download the Cocos Chinese site home page. Although the 3.0alpha version is released, wait for beta. Here we can go to the latest 2. version 2.2.5 of X. Now, we will take this version for the time being. It is easier to learn from a lower version to a higher version, at least to know how the transition is made.


Simply decompress the file and you can see the structure of the file.


The most common file directories are docs, player, and samples.

Of course, docs is viewing the API.

Player is a simulator developed by quick. Currently, you can only run the code we have compiled to check the effect.

Samples is a rich array of examples, which can be easier to learn.

Framework is the framework of the quick engine.

Lib is mainly cocos2d-x engine library and luabinding, etc.

Template is the template, and all the newly created projects are copied from it.


Let's talk about how to set up its environment. It is a bit difficult to configure a lot of environment variables. For more information, see here.

For writing scripts, we must have a good ide. Otherwise, the efficiency will vomit, but quick is not very good. We don't have our own exclusive editor. I believe it will be faster, however, there are three officially recommended ides. For more information, see here. Of course, I have compared them. I still think sublime text is better, especially for code prompts.


Next, we will create a testgame project. For windows

Open cmd, go to the quick-cocos2d-x-2.2.5 \ bin directory, enter

Create_project.bat-P [package name], for example, create_project.bat-P com. Quick. testgame

The script automatically uses the last name of the package name as the project name. Therefore, a testgame project will be created in the above example. If the prompt is "okokok", the project creation will be OK.



The project is created in the bin directory and can be moved anywhere. So it is better to find a unified place to put all the created projects together.

Next, run this example,

Enter the player directory, there will be a player.exe program under the quick-cocos2d-x-2.2.5 \ player \ windirectory, after the startup is the quick simulator, choose to open the project, select our project folder



It will automatically start the main. Lua file, so click "open project" to see the following results.



Okay, so that we can start to write code later.

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.