Current location - Education and Training Encyclopedia - Resume - How to learn a development framework
How to learn a development framework
Most programmers I contact know what it is, but they don't know why. They have been working for several years and don't even know what AVM is. Many programmers regard the rapid development of finished products as their only goal, and think that it is a waste of time to study the underlying knowledge and peripheral technologies. They don't know many things, but they don't want to know.

What's more, if you learn gotoAndPlay, you dare to say that you are familiar with Flash, and if you can knock ls, you dare to say that you are proficient in Linux. A few days ago, a friend sent me a resume that he worshipped for a whole day, which was full of compilation, C/C++, Linux network programming, JAVA EE, Perl, Bash, Python, Windows driver development, single chip microcomputer development, HTML, CSS3, JavaScript, PHP, cocos2d-x, iOS development, Android development ... all projects are proficient!

After reading my resume, I said to my friend: this full-stack god who drives the development of desktop embedded systems before and after web mobile phones has jumped ship eight times in 10 and has never worked in a company for two years. Dare you use it?

= = = = above nonsense, don't watch it.

I just transferred from AS3 to COCOS2D-X. Tell me about my experience.

I. Part II

1. 1 technology selection

From the beginning of the three-hand tour, I was really upset by Adobe's ANE and domestic small platforms, and decided to switch to Cocos2D-X. I struggled for a long time to choose which language to bind, and finally chose Lua: Cocos2Dx+Lua or Cocos2dx+js? The lua binding of cocos2d-x 2.x is not good, so we chose quick-cocos2d-x (which was later acquired by Touch).

1.2 Learning C++

Introduction to Chinese version of C++ (fifth edition) (Douban) is a good introductory book. I suggest watching version 5. I wrote a comparison between the 4th and 5th editions of c++ Primer. It is suggested to draw some mind maps to help you understand and organize your thoughts in the learning process. Like this (incomplete):

1.3 learn DEMO and be familiar with the development platform.

Compile the TestCPP project attached to cocos2d-x and run it all. Familiar with the usage of cocos2d-x API. Remember to use doxygen to generate documents, and it is recommended to browse the functions of various APIs.

Some students may prefer to read the source code directly, which is of course better. However, one advantage of the document is that it can display the inheritance relationship more intuitively.

In the process of learning DEMO, you must be familiar with the IDE of your own development platform. For example, you must be familiar with Visual Studio on Windows, xcode on OS X and Eclipse+CDT on Linux.

Note that quick-cocos2d-x does not support Linux development platform.

20 14-05- 17 update: quick rewrites the player part with QT, but still does not support the Liunx platform.

1.4 Understanding the folder structure of the engine

The document generated based on cocos2d-x source code is not very detailed, and many functions depend on the source code. However, at this stage, I don't suggest that you get too entangled in the source code. Instead, you can entangle the folder structure of cocos2d-x, see where all classes are placed, and see which commonly used macros, constants and enumerations are defined. It won't take too long, but it will give you a deeper understanding of cocos2d-x and a strong sense of accomplishment. This sense of accomplishment dilutes your sense of powerlessness in the face of a large number of source codes and allows you to move on.

The following is my analysis:

1.5 Repeat Step 3 above: Learn the DEMO again.

It may be much easier to watch DEMO at this time, but you will have more problems to struggle with. Such as multi-resolution support? Like a coordinate system? Such as drawing function? Such as hierarchical management system? Like an event delivery system? Wait, wait, wait ... at this time, you can go to Google (be careful not to use search engines such as Baidu) to find documents. Recommend some good documents and blogs I have read:

/File /4809

Cocos2d-x official Chinese document v2.x

IOS development skills & ampBiOM skills

Zi Long Shanren-Blog Park

Hong Haier's Road to Game Programming

Ray Windrich

Cocos2d-x | Cross-platform open source 2d game engine

Many blogs are excellent. Hon Hai Er (later joined Touch) wrote a lot of source code analysis, and each source code has comments. Although I don't quite agree with his thankless method, it is really helpful for beginners.

In addition, you can find the answers to most questions in Stack Overflow. Of course, many questions are directed at cocos2d instead of cocos2d-x, but the usage is the same, so be careful. Many excellent articles are based on cocos2d, so don't mind, you can spend half a day getting familiar with OC grammar and get to know it.

Don't buy Chinese books for the time being I once spent three days watching "cocos2d-x Game Development Technology" and "Cocos2D-X Mobile Game Development-Across iOS, Android and Mobile Platforms", and found that the author actually came to earn the manuscript fee.

I forgot the advertisement. My blog (cocos2d-x | zrong's blog) also has some content of cocos2d-x. Welcome to spray.

1.6. Familiarize yourself with the toolset

Now you should be interested in peripheral tools. For example, what is used for frame animation? What is BMFont made of? What about skeletal animation? How to edit plist file? What tools are used to assemble broken drawings? Some projects, you have many choices, or you may not have a choice. Go to Google and see if you have any choice questions, please come and discuss with me.

Second, the quick-cocos2d-x part.

2. 1 It's lua time.

Please read carefully the first, second and third parts of Lua programming (second edition). The fourth part may not be able to watch for the time being.

1.2 Be familiar with the folder structure of Quick-Cocos2d-X.

I believe that with the foundation of cocos2d-x above, this should not be difficult to understand.

1.3 Run all the examples included with Quick-Cocos2d-X.

At the same time, be familiar with all the packages in the framework. You can refer to Aauto Quicker website and Aauto Quicker Wikipedia.

1.4 Learn to export API for Lua.

Export C/C++ API for Lua.

Third, learn OpenGL ES.

After getting familiar with Lua, as a code farmer who is interested in becoming a programmer, he still has to return to C/C++, which is the essence of COCOS2D-X.

Cocos2d-x is rendered by OpenGL ES. If you want to extend the rendering layer of cocos2d-x in any form, you can't avoid OpenGL ES.

Since you can't escape, say to TA, please spread your legs, I'm leaving.

3. 1 Read OpenGL ES 2.0 programming guide.

The following is official website of this book. At present, the version of OpenGL ES 3.0 has been released, and cocos2d-x uses 2.0.

/es2/index.html

This book is easy to understand and is very suitable for beginners. A netizen spent three months translating the Chinese version, but I still advise you not to read it.

The following is the official document of OpenGL ES and the Chinese translation of API.

Of course, you can also buy the famous little red book OpenGL Programming Guide (7th edition), but there are still some differences between OpenGL ES and OpenGL. You should know how to distinguish these differences.

3.2 Try to understand the rendering architecture of COCOS2D-X.

I won't list the related categories, but I am planning to send a series of articles in this field to my blog. If it is finished, I will update it here.

3.3 Write some filters and extensions of drawing functions yourself.

Take this as an example: cocos2d-x-filters.

Fourth, the return project

Here, you can start your project. Although I haven't read the source code yet, I believe the whole architecture can be understood. In the process of doing the project, it is faster and acceptable for me to read more source code, otherwise it will be too boring.

You can also choose tools related to COCOS2D-X. You may have heard of CCB(cocosBuilder) and CCS(cocoStudio). Try to understand them before deciding whether to use them or not.

You already have the foundation of AS3, so many front-end concepts and experiences are already rich. These experiences are also applicable in COCOS2D-X, but it should be noted that cocos2d-x is not AS3, so don't try to use cocos2d-x in the way of AS3.

A code farmer complained to me when he switched from C# to AS3: Why doesn't Flash Builder have this function of Visual Studio?

Then when the code farmer switched from AS3 to Sublime Text (for Lua editing), he complained to me, why doesn't Sublime Text have this function of Flash Builder?

This is a joke.

At the same time, in order to solve some functions that cocos2d-x does not provide, you must learn relevant knowledge. For example, this one uses libcurl to upload files in cocos2d-x (with quick-cocos2d-x package). But now that you have the foundation, it is not difficult to learn these things.

If you have time, you can take a closer look at the fourth part of Lua programming (second edition) mentioned above, learn about the communication mode between Lua and C language, and see how it is implemented in COCOS2D-X.

In addition, some functions you don't need in the engine can also be easily opened (such as this: a LuaSocket package). Maybe what you need is just what others need.

Five, familiar with the publishing platform

Since it is a mobile game, Android and iOS platforms can't escape.

You should be familiar with the characteristics of Android and iOS platforms, the application of JAVA on Android, the application of Objective-C on iOS, Eclipse ADT and XCode (you should be familiar with it).

You should also be familiar with the release process, principles and policies of Google Play and AppStore, in-house purchase access and SDK embedding.

You should learn to deal with programmers, business people and front desk girls of various access platforms (because you often can't find technicians who are really in charge of the SDK you are looking for), and you should be able to tolerate the poor documents, code specifications and programming methods of domestic small platforms.

End, not end.

What I said above is not complete. I should have missed a lot, but I can only say so much. Because my experience ends here.

Wish you success!

Reprinted for reference only, the copyright belongs to the original author. Have a nice day. Please accept it if you are satisfied.