(reproduced) how to learn iphone game development

Recommended for you: Get network issues from WhatsUp Gold. Not end users.




Since the release of "how to learn iphone game development" to now, about half the time. In fact in writing "how to learn iphone game development", I will write down pretty well, that day, to write a "how to learn iphone game development . But now, when I sat down to write this article, still have be very upset, if writing is not good, or not, write the things can't reach the expected effect. But, anyway, I hand my mouth, I put my own experience in the first half of this year to the learning experience, made some summary blogging experience, the hope can give people later bring help. At the same time, I will be at the end of the article, specified for beginners iphone game development some direction, provide a platform with a better communication and have a friend.

    First of all, the foundation is very important. Like the c/c++, especially the pointer and memory management, if did not thoroughly understand, so study up will be very difficult. However, you may ask, “ in iphone game development is not used in Objective-C.? “. Yes, now with the most should be Objective-C, of course with Unity except (which uses C and JS). But, in fact, objc is based on C package features a layer of object oriented, while the suffix expressions we usually familiar to infix expression tried (i.e. grammatical difference). Also, when learning c/c++ people know, memory management is very difficult, but bug basically is in the memory. So, many people don't like C and C + +, turning to the C and Java arms. I am here, do not want to discuss what kind of language well, this topic is too much, further discussion is not interesting. Each language has its advantages and strengths, its fields of application, supporting its company or organization, maintaining its fans. Our programmers do, according to the characteristics of the problem domain, select the appropriate programming environment (including language, tool, SDK etc.).

  Then the objc want to do memory management? At present, is to the. However, in the MAC above, objc 2 into the garbage collection mechanism, and a new version of the SDK ios5, introduced the ARC (automatic reference counting function), perhaps in the future, the app and game ojbc development iPhone the above does not need to manually re memory management. But this automatic management system will certainly bring efficiency problems, as all GC mechanism. So, let us wait and see, what the mechanism of ARC ios5 to show how.

    c/The c++ foundation is good, learning objc very soon, at least I spent 2 weeks on the objc learning. However, if the objc memory management, also is the reference count master the words, it still need time. Here recommend you read some books and blogs. If your c/c++ is not very good, and establish you in learning objc before filling a little C and c++ related knowledge. C and pointer "," the C programming language "," c++ primer "," the c++ programming language "" Thinking in c++ "" c++ program principles and practice "," effective c++ "," more effective c++ "," inside c++ object model "etc. You look at the Internet search, recommend C + + too many books, I cite here only part of a more classic, of course, if you put these books are finished. According to the book behind the Reference can also find out the other good C and C + + Books. I read a book like this, read a good book, and then follow the book references to a local actually book, then read another book, went to see the references. This not only expand their knowledge, but also can grasp the knowledge of the sequence of events. To understand more deeply, you write programs to more heart notes. Of course, there are so many books, for those to work overtime every day of the Bob, it is vulnerable. However, these things, sooner or later we should supplement, if you are still reading university, so more attention should be paid to this aspect. After work, would like to learn it is not so easy. Although I was still in school, but have a look, guys work overtime every day in the roaring ” every day to work overtime have! “ IT, think of is really vulnerable.!

    However, these programming is built up slowly. Even if you read these books, not to practice, is not much use. Programming ability in fact you repeat number to also have a certain relationship, if only on paper, is not able to write a good program. Well, said so much, to talk about objc. If you think c/c++ is good, recommend you a good objc books. Programming in Objective-C 2.0 , Learning Objective-C 2.0 , Objective-C foundation tutorial ", some technical manuals and there is apple. (yes, by the way, please don't ask me to e-books. You only need to open the Google, and then enter the English books Pdf, OK!). Learning objc must not be lazy, must master the method, the reference count management memory because, whether the application is also behind the game, 80% questions, you will be stuck in the memory management. Crash yes or no! EXC_BAD_ACCESS yes or no! Various procedures have be rather baffling hang! (a must be clear Autorelease Pool, Autorelease Pool Stack, Main Loop, Owner ship, the concept is very important, if you are not very understand, see Apple Objective-C memory programming guide. )

   Then, You objc foundation well (I actually do some of the applications of iPhone to practice hand, Because behind the game, A lot of things or to use UIKit and Cocoa Foundation framework), Xcode also felt familiar (to master the breakpoint debugging with Xcode, Can use Zombie to solve the problem of memory, To use the instruments to detect memory leaks and memory allocation, And CPU usage rate, To the new target, Make clear 4 schema), At this time, You can go to learn iphone game development will be easier. At least you for the development environment and development tools are familiar, encounter problems, they would be able to solve, but not all the time go online to ask questions or to group roar. In fact, most of the time, solve a problem yourself, than ask others to get the answer to be an easy job to harvest more. If it is not very familiar with, make a long time did not solve the problem, you take it out again. I will describe the problem more clearly, and discussion of other people, sometimes also can enlighten the ideas, click into place. Some people like to say a question no one answer, in fact, there are many reasons, one is you describe the problem clearly, two is other people don't know the answer, three may be you did not find the problem. So, I hope you encounter problems, try to think of a way to solve, this is absolutely a good but no harm. (use of tools, a few Ray Objective-C write my blog tutorial, you can have a look, in the Objective-C category (do) application, can also listen to the Stanford University iPhone development video now, Netease open class there, you can focus on)

    Next, you is it right? Can I start to learn iphone game development? Don't worry, there are some knowledge you need to add ---- that the code and design patterns. Code is very important, each platform has its own coding style and specification, if you follow these rules, you write the code can easily be read and modify, and you're reading other people's code will feel more cordial, because, they look very close. Here I do not discuss in detail the coding standard, because Google has written, Objective-C code, Apple's Cocoa Coding Guidelines, C + + code. Why is the C + +? Because the back to learn the game physics engine, box2d will be used, it is mixed programming of objc and C + +, some things need attention. Then, we discuss the design pattern. For just getting started with iPhone development of the people, it is best to learn the application development of about half a month, it's good for game development you later. Believe in doing iPhone knows MVC, in the apple world, this pattern is widely used, even every corner is MVC. In fact, MVC is not only a model, a way to organize your code, it is a kind of software design thought. I would recommend cocos2d to everybody, it is an open source 2D game engine. Because engine level program contains a lot of software design and code organizational skills on the inside, so, if I have some sense of what design patterns, to read the source code of cocos2d will have a great help. In design mode, I recommend two books, one is the GOF design pattern "," the foundation of reusable object oriented software, there is an "cocoa design pattern . Of course, if the initial design mode, it is best to look at the "Head first design pattern" and "design pattern . (read here, a children's shoes may wonder, are you a student: how do you know so much? Don't forget, we have Google. If you still don't know how to make full use of cyber source of children's shoes, please have a look I wrote "some ideas how to find information -- I and experience".!)

    Now, (sigh.) let's talk about how to learn cocos2d! Cocos2d is not just a game graphics engine, it also integrates the sound engine and physics engine, and have active community and rich data. Most importantly, it is open source, free of charge. Cocos2d how to learn? Before, everyone is generally recommended to see series tutorial easy to write, I do. So, I'm in "how to learn iphone game development" which is so suggest you. Knows easy tutorial is a timeless classic, although the use of API is old, the demonstration examples are relatively old, causing many beginners in the practice process, various functions can not find, confusion. So, I think, or from the Ray tutorial will be relatively easier to start. Ray are written in English, however, I have put most of his tutorial translation into Chinese.

   Now, I want to rearrange the process of learning cocos2d iphone game development.

   From (translation) how to use cocos2d to do a simple iphone game tutorial (Part 1) this article begins, track down sb. By following clues, the 3 part of this series of tutorials are watching. Then find the cocos2d-iphone download process inside a test example is TomTheTurret, which is located in the CocoDension/TestAndDemos directory. This example is the Ray perfect for this tutorial series.

  Next, I think we can have a look that easy to write examples, the Tankedaizhan Games association. Perceived ease of blog address is:

  1. Perceived ease of Cocos2D-iPhone game development tutorial 001 (341)
  2. Perceived ease of Cocos2D-iPhone game development tutorial 002 (94)
  3. Perceived ease of Cocos2D-iPhone game development tutorial 003 (71)
  4. Perceived ease of Cocos2D-iPhone game development tutorial 004 (73)
  5. Perceived ease of Cocos2D-iPhone game development tutorial 005 (65)
  6. Perceived ease of Cocos2D-iPhone game development tutorial 006 (66)
  7. Perceived ease of Cocos2D-iPhone game development tutorial 007 (102)

  Remember, if you are using the latest version of the cocos2d, so know easy tutorial there may be many class name and function name changed, you do not be afraid, in fact, just some small change. For example, CCColorLayer into CCLayerColor, CCXXXXTransition into CCTransitionXXXX, CCXXXXAction into CCActionXXX, while the CCSpriteSheet into a CCSpriteBatchNode, like some changes. In fact, just some minor reconstruction, to facilitate better use of cocos2d engine. Here, I incidentally, there are many people who write the code name, for some variable name and class name is not in your heart. Want to how naming on how to get, especially after the name is not good, also won't change. Because the original code, citing bad name too much, the one one change is very troublesome. But, in fact, Xcode is a refactor function.

    Next, you can have a look

(translation) how to use animation and spritesheet in cocos2d.

     (translation) cocos2d wizard tutorial: the first part
     (translation) cocos2d menu tutorial: the first part
     (translation) how to use the cocos2d Tile Map game tutorial based: the first part

    Here to write the first part, that is a series of tutorials, you can follow the course of the navigation way to see the past. Believe that learning these things later, you for the sprite, menu, layer, scene, spritesheet, spriteBatchNode, tiledMap should have some knowledge and understanding.

    Then, we can continue to learn in my blog, there are many other tutorial. Establishment of everyone from the primary game tutorial look, and then is advanced, and then look at the game physical classification tutorial.

   At the same time, at this time, you should go and see some books. Here's 2 book, before also recommended a "Learn iPhone and iPad Cocos2D Game Development" and Leaning Cocos2d .

   If you take my blog on the translation is finished, at the same time, the above mentioned two book and read the words. Of course, it is important to understand, but also hands-on practice!!! Don't order quantity and chaos, more haste, less speed! Next, it is best to take some project practice. If it is to work for the company, the best, the direct use of company can project practice. If the individual learning, recommendations from the series of tutorials available to start, because a lot of pictures and audio materials have, you can expand on this basis, achieve more, the function of cool. If you want to share your findings with me, may I take your results in the tutorial, which there will be more people will benefit from it.

    Then, decide on what path to follow? I think there are 2 options:

   1 continue to in-depth study of cocos2d frame, a careful reading of cocos2d source code, experience and ideas to achieve the design of the code. Then learn OpenGLES, try to extend the cocos2d framework, on the basis of cocos2d customized to meet your company out of frame. Learning OpenGLES, I also recommend some books Learning iOS Game Programming , Oreilly.iPhone.3D.Programming.May.2010 , OpenGL ES 2.0 Programming Guide    .

   2 try cocos2d-x. This is an open source project, led by the Chinese people using C + +, can cross the IOS, Android, Le phone, Win32, Linux and other platforms. At the same time, the cocos2d-x also provides a Lua interface. Why choose cocos2d-x? Now IOS above the competition fierce, if your game can run on multiple platforms, believe that the suction gold source a few will benefit.?

   Of course, if you want to in game development and learning much further down this road then, suggestions for further learning of mathematics and physics, computer graphics, artificial intelligence, data structure and algorithm. I have seen an expert blog, said the game, finally is only in mathematics and physics. I myself, in the development process, also feel mathematics is very important.

    (long ah, come on over!) In the future we must focus on the Ray blog, paid attention to this website, the website author is making a game development new package Kobold2D. He took the cocos2d related resources are integrated into the kobold2d inside, now in the preview stage, believe that after the release will bring a lot of convenience to the developers. By the way, the author of the site with more resources, top navigation links there, also have the right link, we go around! Of course, there are actually a very important place to study, that is cocos2d's Web site:, and forum, not because the text is E would not go, see E talent is the kingly way! Also, I almost forgot, must learn to use Git!

    Also, in order to avoid the copyright issues, the Ray has said that only allows the people he wrote 5 tutorial, although I wrote a disclaimer, however, there are still concerns. So, I will be on the Ray tutorial will do some “ micro innovation &ldquo, using cocos2d-x to achieve again. Because the cocos2d-x data is too small. So, if you want to see the objc version, directly on the Ray web site to see it, to see the C + + version, just watch me.

Finally, several friends talk, established a special forum: calm tutorial, starting from the provision of learning exchanges, a better platform for everyone. Below is the forum founder statement:




  Tairan forum team by a group of have a common goal of iOS development lovers. We found that technology forum home are more or less the lack of some resources, especially when doing some 3D programs and games, especially the OpenGL ES resource is very scarce, so the initiation of a thought: in several projects on hand with studio completed, established himself as one of the forum, provides a platform for the common ideal for developers and we. In September this year, the last one after the completion of the project, we decided to the realization of the promise.  

  The beginning of the main forum, we set the direction is OpenGL ES, because our project experience, can write some related tutorials, let you start than we did hard. Later, we told the people the idea of Longshan, found that all the ideas are very consistent, through mutual understanding after a period of time, we decided to create a new stride Forum.

  In the future, the accumulation of experience before the project and test equipment, Tairan forum will bring OpenGL ES tutorial, CocosD-iPnone and Cocos2D-x tutorial (later will continue expanding); different from the previous blog is, we will vigorously develop the original tutorial, including cross platform Cocos2D-x tutorial.

  First of all, we emphasize the Tairan forum will be a free and open forum, we do not take the business operation.

  Secondly, the forum will have some advertising, we plan to advertising is open to everyone, if you have a new app, later can contact us, we will be free for your app arrangement with BBS advertising, to help you through the difficult process of APP initial.

  Finally, if you have good suggestions or comments, please tell us, this will let us grow together. Contact email




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Becky at November 28, 2013 - 12:18 PM