Cocos2d-x LUA Game development MAC environment build and a little sentiment

Source: Internet
Author: User
Tags lua knowledge base sublime text

Contact Cocos2d-x

Recently, due to the needs of the company's projects, I began to contact Cocos, began to do some simple lightweight games, have not touched this piece of things, but also with this opportunity to learn the development of the game, because the previous contact is all iOS and Android mobile app development, So this whole Cocos study summary of the article will be in the entire process of comparison of their relatively familiar with the iOS and Android comparative learning, if there are similar to my own friends, the next summary of the whole Cocos series of articles may help you, there is insufficient place also want to correct, We make progress together.

At first, since the previous game was developed in C + +, I began to learn to use Cocos2d-x C + + simple Understanding project. I saw some of the most basic cocos, said after the game with JS, and then began to learn JS, and finally decided to use LUA development, maybe this is life .... In fact, the meaning of the above is to summarize some of the development of the game we can have the choice, the development of language has c++,javascript, Lua three choices, they and you really use them to do games like you know OC, Swift. Know Java after the distance between iOS or Android, this can think carefully, understand the distance between these languages and the development of actual projects, and then understand that these languages and the actual game project development between the lack of is cocos2d-x things, to recognize these also understand "How to do the game" the basic question it!

Talk about Cocos.

Cocos is a big concept, and so our specific development used to be the cocos2d-x module of things, to see this Cocos product of a framework:



1:cocos Creator This is a development game for us to do the IDE, the specific can see this Cocos Creator v1.5.x user manual

2:framework This is the core of the development of cocos2d-x, in fact, according to my own understanding, and iOS we often say that the framework is similar, such as you deal with some basic data you need the foundation framework, processing UI things need to Uikit framework, This cocos2d-x is the "frame" we need to develop the game.

3:SDK This part of the ANYSDK is to provide a third-party SDK access solution for the CP vendor, including our commonly used like payment, sharing, statistical analysis and so on. Specific can also look at the SDK documentation, some people may also know the Prism SDK, ANYSDK, easy to connect (1SDk), about these differences, and even when to use which and so on the amount of questions, the following article may be able to explain the problem:

How to Evaluate Prism SDK, ANYSDK, Easy Connect (1SDk), what difference do they have?

4.

Through the above analysis and elaboration can understand Cocos is what this problem can be.

Talk about Cocos Development language

The previous framework mentions the language of game development, that is, C + +, JavaScript, lua three kinds, according to my own little bit of understanding, to say what language is better than the question is not qualified to answer, in the knowledge of the question, have seen such problems, interested can go to see, Perhaps some of these answers will give you a sense of your own:

What is the best language for game development?

Believe that each of the program apes have a certain grasp of C + +, in accordance with their own learning JS and LUA process, they are not very difficult to learn, can be mastered by C relatively easy to win them. So do not worry or fear for you to learn a new language of development, which has the program apes do not need to learn new things to update their knowledge base! Of course this difficulty is also difficult not to fall the great program Ape.

The next thing to say is Lua,lua is a scripting language, and we don't mention the specific LUA syntax, but then again, when it comes to LUA, you need to know about Cocos2d-lua: quick-coco2d-x

The following paragraph is in the network (that is, Quick-coco2d-x official website) of the tutorial said, specifically tell us, what is quick-coco2d-x

First of all, want to understand quick-coco2d-x must first know what cocos2d-x is, but I think about the introduction of cocos2d-x here do not need me to nonsense, after all, so cow game engine should be a bit famous!

Second, since Cocos2d-x is using the C + + language, and C + + has a high demand for developers, developers have gradually started to turn the Cocos2d-x C + + interface into Lua interfaces, thus deriving the Cocos2d-lua version. and Quick (Quick-coco2d-x) is a luxury enhanced and extended version of Cocos2d-lua, which overrides issues such as supporting code, resolving memory leaks, and only using global functions for callbacks. Quick enables developers to write games in a simple, easy-to-understand scripting language, and greatly improves development efficiency. Now the quick team has also taken over the development and maintenance of Cocos2d-lua, so the future of quick and Cocos2d-lua is expected to be completely merged.

I think through the above two paragraphs also understand the relationship between Quick-coco2d-x and Cocos2d-lua! and the following development environment of the building we also say in these two aspects, with Quick-coco2d-lua and Cocos2d-lua a comparison, you can know how the development environment for the developer is the most friendly.

Develop game environment selection and build on Mac

First, through the setting of the environment and a variety of comparisons in this to throw an opinion: At present, I think the more friendly way is Quick-coco2d-x + Sublime Text 3 (2/3 can)

Sublime Text 3 You can go directly to the official website to download the specific quick-coco2d-x you can look at this: Quick community version of the first stable version, Quick-cocos2dx-community 3.6 release released!

It describes in detail the Mac version of the client Paly3 installation, the following is the way a Paly3 run up:

The next Paly3 we will not say, the new project/import project or open the existing projects, and so the belief can be understood. If there are some problems in the installation, I hope you can work on the Internet to solve, of course, I can also add QQ more exchanges.

MAC Build game development environment There are some ways, such as: and the use of Cocos Studio 2, this specific can see its official website: Cocos official website

Look at the download of the official website, I believe that the creation of a basic demo of this kind of thing can not live you.

Run directly as you create in the project, you can also see the demo.

To share a link: quick-cocos2d-x Tutorial summary

Things to do in the following article

In fact, this article pen really is also a long time ago things, their contact Cocos also two months, feel also through the most difficult entry period, recently also really is too busy, not to leave their own summary of this two months of things, yes, National day overtime to now, is really tired!

Do not spread the negative energy, said the back, in fact, really want to carefully put iOS memory management, block and multi-threaded things also a good summary of, recently to the game is responsible for the addition of Apple native payment, so the interaction between Lua and iOS and Apple in the purchase of things also worth a good sum up.

The next step would be to summarize the interaction between Lua and iOS and pay, after all, to write a document to the customer, and by the way, to do it together.

Ape Apes, 1024 happy!!!

Cocos2d-x LUA Game development MAC environment build and a little sentiment

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.